# HG changeset patch # User Dmitry V. Levin # Date 1326314946 -14400 # Node ID 8c89b3a442f2d7a5202641a3fd1cc6ace2311535 # Parent 12711a0db059d7d3d24f000e2a7908daa69eca8e getloadavg test: skip the test on GNU/Linux without /proc mounted GNU libc implements getloadavg(3) on Linux by parsing /proc/loadavg file. When /proc is not mounted, it always fails with ENOENT. * tests/test-getloadavg.c (main): Treat ENOENT return code from getloadavg(3) the same way as ENOSYS and ENOTSUP. diff --git a/ChangeLog b/ChangeLog --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2012-01-11 Dmitry V. Levin + + getloadavg test: skip the test on GNU/Linux without /proc mounted + GNU libc implements getloadavg(3) on Linux by parsing /proc/loadavg + file. When /proc is not mounted, it always fails with ENOENT. + * tests/test-getloadavg.c (main): Treat ENOENT return code from + getloadavg(3) the same way as ENOSYS and ENOTSUP. + 2012-01-10 Bruno Haible regex: Avoid link error on MSVC 9. diff --git a/tests/test-getloadavg.c b/tests/test-getloadavg.c --- a/tests/test-getloadavg.c +++ b/tests/test-getloadavg.c @@ -60,7 +60,7 @@ int loads = getloadavg (avg, 3); if (loads == -1) { - if (! (errno == ENOSYS || errno == ENOTSUP)) + if (! (errno == ENOSYS || errno == ENOTSUP || errno == ENOENT)) return 1; perror ("Skipping test; load average not supported"); return 77;