bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: I: coreutils tests/misc/nproc-avail fails on GNU/Linux without /proc


From: Giuseppe Scrivano
Subject: Re: I: coreutils tests/misc/nproc-avail fails on GNU/Linux without /proc and /sys mounted
Date: Sun, 10 Jan 2010 02:14:01 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.91 (gnu/linux)

when --all fails for any reason, I think we should try with the number
of available processing units, at least it is a more accurate value than
return 1 (and document this behaviour).

Bruno, Jim, what do you think?


Cheers,
Giuseppe



"Dmitry V. Levin" <address@hidden> writes:

> Hi,
>
> The recently introduced nproc utility outputs wrong result when run in
> --all mode inside a /proc-less /sys-less GNU/Linux chroot on a system
> with several CPUs.  In this environment, "nproc --all" always outputs 1
> while plain "nproc" outputs correct number of available CPUs.
> The underlying num_processors() function from gnulib relies on
> sysconf (_SC_NPROCESSORS_CONF) which always return 1 when neither /sys
> nor /proc is mounted.
>
> I'm not sure whether this limitation is unavoidable (and have to be
> documented) or it should be treated as a bug.  In the first case,
> tests/misc/nproc-avail also needs to be adjusted to call skip_test_
> when the OS is GNU/Linux and neither /sys nor /proc is mounted.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]