From: Dmitry V. Levin Date: Mon, 6 Apr 2015 22:17:28 +0000 (+0000) Subject: tests: rewrite umovestr2.test without using grep X-Git-Tag: v4.11~527 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a402810530e0a28df91dc3fa9b070572ed791f98;p=strace tests: rewrite umovestr2.test without using grep The regular expression generated by umovestr2.c on systems with large page size is too big for GNU grep. Rewrite the test to use diff instead of grep. * tests/umovestr2.test: Use match_diff instead of match_grep. * tests/umovestr2.c (main): Convert output from regexp to plain text. --- diff --git a/tests/umovestr2.c b/tests/umovestr2.c index a1ca9fd1..c7bd42f9 100644 --- a/tests/umovestr2.c +++ b/tests/umovestr2.c @@ -23,8 +23,9 @@ main(void) char *envp[] = { addr, NULL }; execve("", argv, envp); - printf("execve\\(\"\", \\[\\], \\[\"%0*u\"\\]\\) = -1 .*\n", + printf("execve(\"\", [], [\"%0*u\"]) = -1 ENOENT (No such file or directory)\n", (int) tail_len - 1, 0); + puts("+++ exited with 0 +++"); return 0; } diff --git a/tests/umovestr2.test b/tests/umovestr2.test index 70589387..2e9fee44 100755 --- a/tests/umovestr2.test +++ b/tests/umovestr2.test @@ -5,11 +5,14 @@ . "${srcdir=.}/init.sh" OUT="$LOG.out" +EXP="$LOG.exp" run_prog > /dev/null -run_strace -veexecve -s262144 $args > "$OUT" -match_grep "$LOG" "$OUT" +run_strace -veexecve -s262144 $args > "$EXP" +check_prog sed +sed 1d < "$LOG" > "$OUT" +match_diff "$OUT" "$EXP" -rm -f "$OUT" +rm -f "$EXP" "$OUT" exit 0