]> granicus.if.org Git - strace/commitdiff
llseek.test: robustify against libcs invoking _llseek syscall on their own
authorDmitry V. Levin <ldv@altlinux.org>
Fri, 15 Jan 2016 00:10:00 +0000 (00:10 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Fri, 15 Jan 2016 00:10:00 +0000 (00:10 +0000)
* tests/llseek.test: Filter out _llseek calls made with non-negative
descriptor arguments.

tests/llseek.test

index bb7595103292c137b989d5927071bfb4a55bf322..2c0ee51233ac47662a2de2ba10b8028bf6223ab6 100755 (executable)
@@ -4,10 +4,15 @@
 
 . "${srcdir=.}/init.sh"
 
-run_prog > /dev/null
 OUT="$LOG.out"
-run_strace -e_llseek $args > "$OUT"
-match_diff "$LOG" "$OUT"
-rm -f "$OUT"
+EXP="$LOG.exp"
+
+check_prog grep
+run_prog > /dev/null
+run_strace -e_llseek $args > "$EXP"
+grep -v '^lseek([0-9]' < "$LOG" > "$OUT"
+match_diff "$OUT" "$EXP"
+
+rm -f "$EXP" "$OUT"
 
 exit 0