]> sourceware.org Git - systemtap.git/commitdiff
testsuite: make stap_run[23] more verbose when failing
authorFrank Ch. Eigler <fche@redhat.com>
Mon, 29 Oct 2012 02:39:36 +0000 (22:39 -0400)
committerFrank Ch. Eigler <fche@redhat.com>
Mon, 29 Oct 2012 02:49:40 +0000 (22:49 -0400)
If a stap_run[23] test case fails, in that the actual output varies
from the expected output, all remaining actual output lines were
neither compared nor reported in systemtap.log.

* testsuite/lib/stap_run2.exp (stap_run3): In case of a line mismatch,
  report any remaining actual lines.

testsuite/lib/stap_run2.exp

index c3bfb7a5124021a400c0d226bc73993d2de1c28d..66ff3ece4257c55e501306940dd0e029c1ce3711 100644 (file)
@@ -40,6 +40,13 @@ proc stap_run3 { TEST_NAME TEST_FILE args } {
            fail "$TEST_NAME"
            send_log "line [expr $n + 1]: expected \"[lindex $expected $n]\"\n"
            send_log "Got \"$line\"\n"
+            set m 0
+            foreach line2 [split $res "\n"] {
+                if {$m > $n} {
+                    send_log "    \"$line2\"\n"
+                }
+                incr m
+            }
            return
        }
        incr n
This page took 0.031381 seconds and 5 git commands to generate.