[Nagiosplug-devel] patch for check_load.t
Mathew Ericson
mathew_ericson at agilent.com
Thu May 15 18:20:08 CEST 2003
Dear nagiosdevel,
Here is a patch to let check_load.t succeed on debianlinux and HPUX. How
can I get this verified and checked-in?
--- check_load.t.orig 2003-05-16 10:56:03.000000000 +1000
+++ check_load.t 2003-05-16 11:21:47.000000000 +1000
@@ -15,13 +15,13 @@
$str = `$cmd`;
$t += ok $?>>8,0;
print "Test was: $cmd\n" if ($?);
-$t += ok $str, '/^load average: +[\.0-9]+, +[\.0-9]+, +[\.0-9]+$/';
+$t += ok $str, '/^[O|o]?[K|k]?\s?\-?\s?load
average:\s[0-9]?\.?[0-9]+,\s[0-9]?\.?[0-9]+,\s[0-9]?\.?[0-9]+/';
$cmd = "./check_load 0 0 0 0 0 0";
$str = `$cmd`;
$t += ok $?>>8,2;
print "Test was: $cmd\n" unless ($?);
-$t += ok $str, '/^load average: +[\.0-9]+, +[\.0-9]+, +[\.0-9]+
CRITICAL$/';
+$t += ok $str, '/^CRITICAL\s\-\sload average:\s[0-9]?[\.0-9]+,
[0-9?][\.0-9]+, [0-9]?[\.0-9]/';
exit(0) if defined($Test::Harness::VERSION);
exit($tests - $t);
--
Mathew Ericson
CC/Unix System Administrator
Agilent Technologies, Inc.
613 9210 5956 Tel
More information about the Devel
mailing list