ryantimwilson / rpms / systemd

Forked from rpms/systemd a month ago
Clone
8d419f
From 3a58ce9a0ff042f9d5e2c4b75462490a3868bd13 Mon Sep 17 00:00:00 2001
8d419f
From: Frantisek Sumsal <frantisek@sumsal.cz>
8d419f
Date: Mon, 6 Jun 2022 14:45:11 +0200
8d419f
Subject: [PATCH] test: set $ASAN_RT_PATH along with $LD_PRELOAD to the ASan
8d419f
 runtime DSO
8d419f
8d419f
Since we unset $LD_PRELOAD in the testsuite-* units (due to another
8d419f
issue), let's store the path to the ASan DSO in another env variable, so
8d419f
we can easily access it in the testsuite scripts when needed.
8d419f
8d419f
(cherry picked from commit 3ea18a2e36a5b8ac60c76e407f9dd38800455725)
8d419f
8d419f
Related: #2087652
8d419f
---
8d419f
 test/test-functions | 2 +-
8d419f
 1 file changed, 1 insertion(+), 1 deletion(-)
8d419f
8d419f
diff --git a/test/test-functions b/test/test-functions
8d419f
index 34aeac339f..a9ff561083 100644
8d419f
--- a/test/test-functions
8d419f
+++ b/test/test-functions
8d419f
@@ -820,7 +820,7 @@ mount -o remount,rw /
8d419f
 
8d419f
 # A lot of services (most notably dbus) won't start without preloading libasan
8d419f
 # See https://github.com/systemd/systemd/issues/5004
8d419f
-DEFAULT_ENVIRONMENT="\$DEFAULT_ENVIRONMENT LD_PRELOAD=$ASAN_RT_PATH"
8d419f
+DEFAULT_ENVIRONMENT="\$DEFAULT_ENVIRONMENT LD_PRELOAD=$ASAN_RT_PATH ASAN_RT_PATH=$ASAN_RT_PATH"
8d419f
 
8d419f
 if [[ "$ASAN_COMPILER" == "clang" ]]; then
8d419f
   # Let's add the ASan DSO's path to the dynamic linker's cache. This is pretty