From: Jim Meyering Date: Sun, 12 Nov 2006 07:22:46 +0000 (+0100) Subject: Avoid false-positive when testing via valgrind. X-Git-Tag: COREUTILS-6_5~21 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=28c7ef509e56e5fc1619afcdcf2fc3243bf2da36;p=thirdparty%2Fcoreutils.git Avoid false-positive when testing via valgrind. * tests/mv/atomic: Grep strace output for a more specific pattern than just "unlink", since that got a false positive when testing under valgrind: unlink("/tmp/valgrind_proc_9657_cmdline_A51E9991") = 0 * tests/mv/Makefile.am (TESTS_ENVIRONMENT): Define EGREP. --- diff --git a/ChangeLog b/ChangeLog index 0a1dcef892..bc5797f8f0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2006-11-12 Jim Meyering + + Avoid false-positive when testing via valgrind. + * tests/mv/atomic: Grep strace output for a more specific pattern + than just "unlink", since that got a false positive when testing + under valgrind: unlink("/tmp/valgrind_proc_9657_cmdline_A51E9991") = 0 + * tests/mv/Makefile.am (TESTS_ENVIRONMENT): Define EGREP. + 2006-10-28 Jim Meyering * Makefile.maint (patch-check): Make it easier to regenerate diff --git a/tests/mv/Makefile.am b/tests/mv/Makefile.am index 927bac89b4..57581cd880 100644 --- a/tests/mv/Makefile.am +++ b/tests/mv/Makefile.am @@ -46,5 +46,6 @@ TESTS = \ EXTRA_DIST = $(TESTS) vfat TESTS_ENVIRONMENT = \ PERL="$(PERL)" \ + EGREP="$(EGREP)" \ PATH="$(VG_PATH_PREFIX)`pwd`/../../src$(PATH_SEPARATOR)$$PATH" \ PROG=mv diff --git a/tests/mv/atomic b/tests/mv/atomic index bb761bdc49..1fa07360f9 100755 --- a/tests/mv/atomic +++ b/tests/mv/atomic @@ -58,7 +58,7 @@ fi fail=0 strace -qe unlink mv -T s1 s2 > out 2>&1 || fail=1 -grep unlink out && fail=1 +$EGREP 'unlink.*"s1"' out && fail=1 # Ensure that the source, s1, is gone. ls -dl s1 > /dev/null 2>&1 && fail=1