From 1d82751e2ca03084db4cb06c0b4eaf73036082d8 Mon Sep 17 00:00:00 2001 From: Pádraig Brady Date: Thu, 25 Jun 2015 13:21:28 +0100 Subject: tests: avoid false failures with LD_PRELOAD=libasan.so.2 The LD_PRELOAD checks by -fsanitize=address are overly strict: https://groups.google.com/forum/#!topic/address-sanitizer/jEvOJgkDqQk A workaround is to first export LD_PRELOAD=libasan.so.2 The tests below are adjusted so that workaround is not discarded. * tests/cp/no-ctx.sh: Append to $LD_PRELOAD. * tests/df/no-mtab-status.sh: Likewise. * tests/df/skip-duplicates.sh: Likewise. * tests/ls/getxattr-speedup.sh: Likewise. * tests/rm/r-root.sh: Likewise. * tests/cp/nfs-removal-race.sh: Likewise. Also check that LD_PRELOAD is effective to aid future maintainability and avoid false failure if libasan.so.2 is not preloaded. --- tests/ls/getxattr-speedup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/ls') diff --git a/tests/ls/getxattr-speedup.sh b/tests/ls/getxattr-speedup.sh index f84c9da61..be43c50e4 100755 --- a/tests/ls/getxattr-speedup.sh +++ b/tests/ls/getxattr-speedup.sh @@ -55,7 +55,7 @@ gcc_shared_ k.c k.so \ seq 20 | xargs touch || framework_failure_ # Finally, run the test: -LD_PRELOAD=./k.so ls --color=always -l . || fail=1 +LD_PRELOAD=$LD_PRELOAD:./k.so ls --color=always -l . || fail=1 test -f x || skip_ "internal test failure: maybe LD_PRELOAD doesn't work?" -- cgit v1.2.3-70-g09d2