[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
I: coreutils tests/misc/nproc-avail fails on GNU/Linux without /proc and
From: |
Dmitry V. Levin |
Subject: |
I: coreutils tests/misc/nproc-avail fails on GNU/Linux without /proc and /sys mounted |
Date: |
Sun, 10 Jan 2010 02:32:46 +0300 |
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.
--
ldv
pgp0bSYLgjtuB.pgp
Description: PGP signature
- I: coreutils tests/misc/nproc-avail fails on GNU/Linux without /proc and /sys mounted,
Dmitry V. Levin <=