]> granicus.if.org Git - strace/commitdiff
tests: fix another regression in qual_syscall.test
authorDmitry V. Levin <ldv@altlinux.org>
Mon, 3 Oct 2016 12:13:19 +0000 (12:13 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Mon, 3 Oct 2016 12:13:19 +0000 (12:13 +0000)
* tests/qual_syscall.test: Fix pattern_nonabbrev_verbose pattern.
(check_output_mismatch): Print the pattern that triggered match failure.

tests/qual_syscall.test

index 4a29f5a5ef3911538926e1d7222959f9869e7178..f7eb06d5a8be2d8c62ff06fbc2d676cbe4b670f1 100755 (executable)
@@ -7,7 +7,7 @@
 
 run_prog ./umovestr
 pattern_abbrev_verbose='execve("\./umovestr", \["\./umovestr"\], \[/\* [[:digit:]]* vars \*/\]) = 0'
-pattern_nonabbrev_verbose='execve("\./umovestr", \["\./umovestr"\], \[".*\"\]) = 0'
+pattern_nonabbrev_verbose='execve("\./umovestr", \["\./umovestr"\], \[".*\"\(\.\.\.\)\?\]) = 0'
 pattern_nonverbose='execve("\./umovestr", 0x[[:xdigit:]]*, 0x[[:xdigit:]]*) = 0'
 pattern_raw='execve(0x[[:xdigit:]]*, 0x[[:xdigit:]]*, 0x[[:xdigit:]]*) = 0'
 
@@ -16,8 +16,11 @@ check_output_mismatch()
        local pattern
        pattern="$1"; shift
        run_strace "$@" ./umovestr
-       LC_ALL=C grep -x "$pattern" "$LOG" > /dev/null ||
+       LC_ALL=C grep -x "$pattern" "$LOG" > /dev/null || {
+               printf '%s\n%s\n' \
+                       'Failed patterns of expected output:' "$pattern"
                dump_log_and_fail_with "$STRACE $args output mismatch"
+       }
 }
 
 check_output_mismatch "$pattern_abbrev_verbose" -e execve