tests: tighten sigaction check
authorDmitry V. Levin <ldv@altlinux.org>
Sat, 8 Feb 2014 00:37:48 +0000 (00:37 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Sat, 8 Feb 2014 00:50:10 +0000 (00:50 +0000)
* tests/sigaction.awk: Check that input conatins all expected lines.

tests/sigaction.awk

index ff89e3e11db06bc67811e1fee74d17bf02c5d3b3..2c4eab6877a21deaea1b0ffed50d6e333fadbe8c 100644 (file)
@@ -24,7 +24,13 @@ NR == 3 && /^rt_sigaction\(SIGUSR2, {SIG_DFL, \[\], 0}, {0x[0-9a-f]+, \[QUIT TER
 NR == 4 && /^\+\+\+ exited with 0 \+\+\+$/ {next}
 
 {
-  print "Line " NR " does not match:"
-  print
+  print "Line " NR " does not match: " $0
   exit 1
 }
+
+END {
+  if (NR != 4) {
+    print "Expected 4 lines, found " NR " line(s)."
+    exit 1
+  }
+}