'make check' cannot be run as super-user or it fails

Bug #775195 reported by JVD on 2011-05-01
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
libnih
Undecided
Unassigned

Bug Description

Hi - building libnih-1.0.3 with
  $ ./configure .... && make && make check
fails because I was building as the root user and some tests fail :

...
...with stat failure and no error handler
BAD: wrong value for logger_called, expected 1 got 0
        at tests/test_file.c:934 (test_dir_walk).
/bin/sh: line 5: 15332 Aborted ${dir}$tst
FAIL: test_file
....
...with error with sub-directory
BAD: wrong value for logger_called, expected TRUE got FALSE
        at tests/test_watch.c:504 (test_new).
/bin/sh: line 5: 15337 Aborted ${dir}$tst
FAIL: test_watch
...
...with failure to write to temporary file
BAD: wrong value for ret, expected less than 0 got 0
        at tests/test_main.c:417 (test_write_pidfile).
/bin/sh: line 5: 15342 Aborted ${dir}$tst
FAIL: test_main
...
==================================================
3 of 17 tests failed
Please report to http://bugs.launchpad.net/libnih/
==================================================

So I'm reporting it .

These tests do not fail when run as a non-super-user .

The "INSTALL" file states only :
" 2. Type `make' to compile the package.

  3. Optionally, type `make check' to run any self-tests that come with
     the package, generally using the just-built uninstalled binaries.

  4. Type `make install' to install the programs
"

Please either:
 o skip the tests that fail if run as root
 o if running as root, drop relevant capabilities or setuid to a non-root user for these tests
 o at least update the documentation on this issue .

All tests pass if run as non-root user.

No other complaints - thanks for libnih !

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers