diff options
author | Dmitry V. Levin <ldv@altlinux.org> | 2015-04-06 22:17:28 +0000 |
---|---|---|
committer | Dmitry V. Levin <ldv@altlinux.org> | 2015-04-06 22:17:28 +0000 |
commit | a402810530e0a28df91dc3fa9b070572ed791f98 (patch) | |
tree | 550e5ca98d9f33751552f0b2990fe32486194135 | |
parent | 87af1935fb17ce3253ff2a573815ac88e1b48c31 (diff) | |
download | android_external_strace-a402810530e0a28df91dc3fa9b070572ed791f98.tar.gz android_external_strace-a402810530e0a28df91dc3fa9b070572ed791f98.tar.bz2 android_external_strace-a402810530e0a28df91dc3fa9b070572ed791f98.zip |
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.
-rw-r--r-- | tests/umovestr2.c | 3 | ||||
-rwxr-xr-x | tests/umovestr2.test | 9 |
2 files changed, 8 insertions, 4 deletions
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 |