script/show_testsuite_time: error out if number argument is not a decimal number
authorMichael Adam <obnox@samba.org>
Mon, 27 Oct 2014 22:29:25 +0000 (23:29 +0100)
committerMichael Adam <obnox@samba.org>
Thu, 30 Oct 2014 19:25:04 +0000 (20:25 +0100)
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
script/show_testsuite_time

index 13ae0b66949408e257a93a4ff637b145c2f1dae6..d4379f4597e497f6b672fd853f0a2be078f50c68 100755 (executable)
@@ -17,6 +17,9 @@ if ($#ARGV >= 0) {
 }
 if ($#ARGV >= 1) {
        $max = $ARGV[1];
 }
 if ($#ARGV >= 1) {
        $max = $ARGV[1];
+       if ($max =~ /\D/) {
+               die "not a decimal number: '$max'";
+       }
 }
 
 while(<$fh>)
 }
 
 while(<$fh>)