From: Frantisek Sumsal Date: Fri, 26 Nov 2021 15:21:51 +0000 (+0100) Subject: test: create a dummy LSan suppression file in the minimal image X-Git-Tag: v250-rc1~136 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=72f9e485ce3a8669e762e8b08629c7b70ed08267;p=thirdparty%2Fsystemd.git test: create a dummy LSan suppression file in the minimal image otherwise gcc's ASan complains (unlike clang's) when the image is used - e.g. in TEST-29 or TEST-50. ``` [ 17.328705] testsuite-29.sh[361]: + portablectl --profile=trusted attach --now --runtime /usr/share/minimal_0.raw app0 ... [ 20.978649] systemd[1]: Starting app0-foo.service... [ 21.104844] kernel: loop0: detected capacity change from 0 to 24960 [ 20.999559] systemd[1]: Starting app0.service... [ 21.126022] kernel: loop1: detected capacity change from 0 to 24960 ... [ 21.861087] cat[422]: AddressSanitizer: failed to read suppressions file '/systemd-lsan.supp' [ 21.868634] cat[421]: AddressSanitizer: failed to read suppressions file '/systemd-lsan.supp' [ 21.877941] systemd[1]: app0.service: Control process exited, code=exited, status=1/FAILURE [ 21.878836] systemd[1]: app0.service: Failed with result 'exit-code'. [ 21.905712] systemd[1]: Failed to start app0.service. ``` Follow-up to f201f3447796a5424372d32b338bc3b907516c28. --- diff --git a/test/test-functions b/test/test-functions index 0a3745de529..d8b549a1dc8 100644 --- a/test/test-functions +++ b/test/test-functions @@ -588,6 +588,10 @@ install_verity_minimal() { # missing $LD_PRELOAD libraries. inst_libs "$ASAN_RT_PATH" inst_library "$ASAN_RT_PATH" + # Create a dummy LSan suppression file otherwise gcc's ASan + # complains as it doesn't exist in the minimal image + # (i.e. when running TEST-29 or TEST-50 under sanitizers) + touch "$initdir/systemd-lsan.supp" fi cp "$os_release" "$initdir/usr/lib/os-release" ln -s ../usr/lib/os-release "$initdir/etc/os-release"