From 8f764b32eabd3d39abfc0f4eaffd282223df4768 Mon Sep 17 00:00:00 2001 From: Richard Maw Date: Mon, 27 Nov 2023 17:48:24 +0000 Subject: [PATCH] test: Create analyze chroot with --rbind The systemd-analyze integration test also tests chroots. It builds its chroot by bind-mounting /, but since /usr might be a separate mountpoint it should create the chroot with --rbind. --- test/units/testsuite-65.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/units/testsuite-65.sh b/test/units/testsuite-65.sh index 6c819dfe4a4..64157346510 100755 --- a/test/units/testsuite-65.sh +++ b/test/units/testsuite-65.sh @@ -179,7 +179,7 @@ systemd-analyze security --json=short | jq if [[ ! -v ASAN_OPTIONS ]]; then # check that systemd-analyze cat-config paths work in a chroot mkdir -p /tmp/root - mount --bind / /tmp/root + mount --rbind / /tmp/root systemd-analyze cat-config systemd/system-preset >/tmp/out1 chroot /tmp/root systemd-analyze cat-config systemd/system-preset >/tmp/out2 diff /tmp/out{1,2} -- 2.47.3