check_procs: fix test with sleeping processes

at least on freebsd, there are a processes with state 'S', they always
use two character status.
This commit is contained in:
Sven Nierlein 2013-09-16 13:39:47 +02:00 committed by Sven Nierlein
parent c001fb98ff
commit adc9d71b4b

View file

@ -34,7 +34,7 @@ $result = NPTest->testCmd( "./check_procs -w 0 -c 0" );
is( $result->return_code, 2, "Checking critical if processes > 0" );
like( $result->output, '/^PROCS CRITICAL: [0-9]+ process(es)? | procs=[0-9]+;0;0;0;$/', "Output correct" );
$result = NPTest->testCmd( "./check_procs -w 0 -c 0 -s S" );
$result = NPTest->testCmd( "./check_procs -w 0 -c 0 -s Ss" );
is( $result->return_code, 2, "Checking critical if sleeping processes" );
like( $result->output, '/^PROCS CRITICAL: [0-9]+ process(es)? with /', "Output correct" );