[nagiosplug] check_procs: fix test with sleeping processes
"Nagios Plugin Development" <[email protected]> Tue, 17 Sep 2013 08:20:24 +0000
| Newsgroups | gmane.network.nagios.plugins.cvs |
|---|---|
| Message-ID | <[email protected]> |
Module: nagiosplug
Branch: master
Commit: adc9d71b4b2c622b26e6403b16f8299a280dab54
Author: Sven Nierlein <[email protected]>
Committer: Sven Nierlein <[email protected]>
Date: Mon Sep 16 13:39:47 2013 +0200
URL: http://nagiosplug.git.sf.net/git/gitweb.cgi?p=nagiosplug/nagiosplug;a=commit;h=adc9d71
check_procs: fix test with sleeping processes
at least on freebsd, there are a processes with state 'S', they always
use two character status.
---
plugins/t/check_procs.t | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/plugins/t/check_procs.t b/plugins/t/check_procs.t
index a1a2883..1dea564 100644
--- a/plugins/t/check_procs.t
+++ b/plugins/t/check_procs.t
@@ -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" );
------------------------------------------------------------------------------
LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint
2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes
Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13.
http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk