From: Michael R Sweet Date: Tue, 4 Dec 2018 21:52:56 +0000 (-0500) Subject: Fix ASAN support on Linux, drop suppressions file and just disable leak tests. X-Git-Tag: v2.3b6~23 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e5daa5b780a3253546b4c2a5222e9c5f11e2d67d;p=thirdparty%2Fcups.git Fix ASAN support on Linux, drop suppressions file and just disable leak tests. ASAN on Linux also requires us to build with --disable-shared. Which means the test script should not try to preload the .so files... --- diff --git a/test/asan-suppressions.txt b/test/asan-suppressions.txt deleted file mode 100644 index e21665448e..0000000000 --- a/test/asan-suppressions.txt +++ /dev/null @@ -1 +0,0 @@ -leak:main diff --git a/test/run-stp-tests.sh b/test/run-stp-tests.sh index dc4d3bff59..56e3d85f3c 100755 --- a/test/run-stp-tests.sh +++ b/test/run-stp-tests.sh @@ -575,32 +575,35 @@ if test "x$ASAN_OPTIONS" = x; then # which is basically useless - in general, programs do not need to free # every object before exit since the OS will recover the process's # memory. - ASAN_OPTIONS="suppressions=$root/test/asan-suppressions.txt" + ASAN_OPTIONS="detect_leaks=false" + export ASAN_OPTIONS fi -if test "x$LD_LIBRARY_PATH" = x; then - LD_LIBRARY_PATH="$root/cups" -else - LD_LIBRARY_PATH="$root/cups:$LD_LIBRARY_PATH" -fi +if test -f "$root/cups/libcups.so.2"; then + if test "x$LD_LIBRARY_PATH" = x; then + LD_LIBRARY_PATH="$root/cups" + else + LD_LIBRARY_PATH="$root/cups:$LD_LIBRARY_PATH" + fi -LD_PRELOAD="$root/cups/libcups.so.2:$root/cups/libcupsimage.so.2" -if test `uname` = SunOS -a -r /usr/lib/libCrun.so.1; then - LD_PRELOAD="/usr/lib/libCrun.so.1:$LD_PRELOAD" + LD_PRELOAD="$root/cups/libcups.so.2:$root/cups/libcupsimage.so.2" + if test `uname` = SunOS -a -r /usr/lib/libCrun.so.1; then + LD_PRELOAD="/usr/lib/libCrun.so.1:$LD_PRELOAD" + fi fi -if test -f $root/cups/libcups.2.dylib; then +if test -f "$root/cups/libcups.2.dylib"; then if test "x$DYLD_INSERT_LIBRARIES" = x; then DYLD_INSERT_LIBRARIES="$root/cups/libcups.2.dylib:$root/cups/libcupsimage.2.dylib" else DYLD_INSERT_LIBRARIES="$root/cups/libcups.2.dylib:$root/cups/libcupsimage.2.dylib:$DYLD_INSERT_LIBRARIES" fi -fi -if test "x$DYLD_LIBRARY_PATH" = x; then - DYLD_LIBRARY_PATH="$root/cups" -else - DYLD_LIBRARY_PATH="$root/cups:$DYLD_LIBRARY_PATH" + if test "x$DYLD_LIBRARY_PATH" = x; then + DYLD_LIBRARY_PATH="$root/cups" + else + DYLD_LIBRARY_PATH="$root/cups:$DYLD_LIBRARY_PATH" + fi fi # These get exported because they don't have side-effects...