]> git.notmuchmail.org Git - notmuch/commitdiff
test: put shim at end of LD_PRELOAD path
authorDavid Bremner <david@tethera.net>
Sat, 13 Mar 2021 12:43:37 +0000 (08:43 -0400)
committerDavid Bremner <david@tethera.net>
Fri, 16 Apr 2021 12:06:39 +0000 (09:06 -0300)
Certain tools like the address-sanitizer fail if they are not the
first LD_PRELOADed library. It does not seem to matter for our shims,
as long as they are loaded before libnotmuch.

test/test-lib.sh

index 1f438042909d7115778ef19efe47c37ef709b0c4..098d69da347cffc689cb986761421f3ad2444250 100644 (file)
@@ -1128,7 +1128,7 @@ notmuch_with_shim () {
     base_name="$1"
     shift
     shim_file="${base_name}.so"
-    LD_PRELOAD=./${shim_file}${LD_PRELOAD:+:$LD_PRELOAD} notmuch-shared "$@"
+    LD_PRELOAD=${LD_PRELOAD:+:$LD_PRELOAD}:./${shim_file} notmuch-shared "$@"
 }
 
 # Creates a script that counts how much time it is executed and calls