From 25bc4697275ba5ef395160c716ca3e7f63d3eaba Mon Sep 17 00:00:00 2001 From: Frantisek Sumsal Date: Wed, 7 Jun 2023 15:19:44 +0200 Subject: [PATCH 1/3] test: rebuild the ldconfig cache after changing its configuration Follow-up to ba79e8c2cc. --- test/test-functions | 1 + 1 file changed, 1 insertion(+) diff --git a/test/test-functions b/test/test-functions index d3de275758..b37bb21ba3 100644 --- a/test/test-functions +++ b/test/test-functions @@ -931,6 +931,7 @@ create_asan_wrapper() { # runtime ASan DSO is in a non-standard (library) path. mkdir -p "${initdir:?}/etc/ld.so.conf.d/" echo "${ASAN_RT_PATH%/*}" >"${initdir:?}/etc/ld.so.conf.d/asan-path-override.conf" + ldconfig -r "$initdir" fi # Create a simple environment file which can be included by systemd services From 93b896e90e6da99c0436ab69dfaf384784358605 Mon Sep 17 00:00:00 2001 From: Frantisek Sumsal Date: Wed, 7 Jun 2023 15:21:10 +0200 Subject: [PATCH 2/3] test: drop $SKIP_INITRD It's pointless nowadays, since we always need an initrd for the test VMs as we require modules that are usually not compiled in the kernel. --- test/TEST-16-EXTEND-TIMEOUT/test.sh | 1 - test/test-functions | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/test/TEST-16-EXTEND-TIMEOUT/test.sh b/test/TEST-16-EXTEND-TIMEOUT/test.sh index fd1b072c63..4d480d753b 100755 --- a/test/TEST-16-EXTEND-TIMEOUT/test.sh +++ b/test/TEST-16-EXTEND-TIMEOUT/test.sh @@ -3,7 +3,6 @@ set -e TEST_DESCRIPTION="EXTEND_TIMEOUT_USEC=usec start/runtime/stop tests" -SKIP_INITRD=yes TEST_NO_QEMU=1 # shellcheck source=test/test-functions diff --git a/test/test-functions b/test/test-functions index b37bb21ba3..663578c629 100644 --- a/test/test-functions +++ b/test/test-functions @@ -295,7 +295,6 @@ IS_BUILT_WITH_COVERAGE=$(is_built_with_coverage && echo yes || echo no) if get_bool "$IS_BUILT_WITH_ASAN"; then PATH_TO_INIT="$ROOTLIBDIR/systemd-under-asan" - SKIP_INITRD="${SKIP_INITRD:-yes}" QEMU_MEM="${QEMU_MEM:-2G}" QEMU_SMP="${QEMU_SMP:-4}" @@ -577,7 +576,7 @@ run_qemu() { kernel_params+=("${user_kernel_append[@]}") fi - if [[ "$INITRD" ]] && ! get_bool "$SKIP_INITRD"; then + if [[ -n "$INITRD" ]]; then qemu_options+=(-initrd "$INITRD") fi From 8e81885531b23b3f6787cfe29d952469b31976ed Mon Sep 17 00:00:00 2001 From: Frantisek Sumsal Date: Wed, 7 Jun 2023 16:26:21 +0200 Subject: [PATCH 3/3] test: wrap agetty & getfacl when running with sanitizers The list is getting slightly ridiculous. --- test/test-functions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test-functions b/test/test-functions index 663578c629..8baf16d335 100644 --- a/test/test-functions +++ b/test/test-functions @@ -2733,7 +2733,7 @@ inst_binary() { # nsswitch.conf uses [SUCCESS=merge] (like on Arch Linux) # delv, dig - pull in nss_resolve if `resolve` is in nsswitch.conf # tar - called by machinectl in TEST-25 - bin_rx='/(chown|delv|dig|getent|id|login|ls|mkfs\.[a-z0-9]+|mksquashfs|mkswap|setfacl|setpriv|stat|su|tar|useradd|userdel)$' + bin_rx='/(agetty|chown|delv|dig|getfacl|getent|id|login|ls|mkfs\.[a-z0-9]+|mksquashfs|mkswap|setfacl|setpriv|stat|su|tar|useradd|userdel)$' if get_bool "$IS_BUILT_WITH_ASAN" && [[ "$bin" =~ $bin_rx ]]; then wrap_binary=1 fi