tests: check_proc tests fail if uid -2 does not map to nobody

so make sure our tests only run if -2 maps to nobody

Signed-off-by: Sven Nierlein <Sven.Nierlein@consol.de>
This commit is contained in:
Sven Nierlein 2014-06-13 15:57:21 +02:00
parent 93901d5ff1
commit 4102eaae0e

View file

@ -50,6 +50,7 @@ SKIP: {
SKIP: {
skip 'user with uid -2 required', 8 unless getpwuid(-2);
skip 'uid -2 must have name "nobody"', 8 unless getpwuid(-2) eq 'nobody';
$result = NPTest->testCmd( "$command -u -2 -w 2:2" );
is( $result->return_code, 1, "Checking processes with userid=-2" );