From deaa4fb41b0be83526310a12b888d4d6b7cd1ecb Mon Sep 17 00:00:00 2001 From: Daan De Meyer Date: Wed, 15 May 2024 08:48:46 +0200 Subject: [PATCH] test: Rename "shutdown initrd" to "exitrd" --- test/TEST-08-INITRD/test.sh | 30 +++++++++++++++--------------- test/units/TEST-08-INITRD.sh | 2 +- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/test/TEST-08-INITRD/test.sh b/test/TEST-08-INITRD/test.sh index badb6cb31a1..cbbe82080f1 100755 --- a/test/TEST-08-INITRD/test.sh +++ b/test/TEST-08-INITRD/test.sh @@ -14,11 +14,11 @@ TEST_NO_NSPAWN=1 test_append_files() { local workspace="${1:?}" - local sd_initrd file dir + local exitrd file dir - # Create a shutdown initrd + # Create an exitrd # - # This should provide coverage for shutdown initrd related issues, see: + # This should provide coverage for exitrd related issues, see: # - https://github.com/systemd/systemd/issues/28645 # - https://github.com/systemd/systemd/pull/28648 # - https://github.com/systemd/systemd/pull/28793 @@ -26,25 +26,25 @@ test_append_files() { # This is a bit messier than I originally anticipated, as installing our own libraries # is handled implicitly by install_systemd() which I don't want to use here, since # I need only the systemd-shutdown binary - sd_initrd="$workspace/shutdown-initrd" - mkdir -p "$sd_initrd/etc" "$sd_initrd/usr" - initdir="$sd_initrd" image_install bash /usr/lib/os-release - ln -srf "$sd_initrd/usr/lib/os-release" "$sd_initrd/etc/initrd-release" - initdir="$sd_initrd" inst_binary "$workspace/usr/lib/systemd/systemd-shutdown" "/usr/lib/systemd/systemd-shutdown" - initdir="$sd_initrd" inst_libs "$sd_initrd/usr/lib/systemd/systemd-shutdown" + exitrd="$workspace/exitrd" + mkdir -p "$exitrd/etc" "$exitrd/usr" + initdir="$exitrd" image_install bash /usr/lib/os-release + ln -srf "$exitrd/usr/lib/os-release" "$exitrd/etc/initrd-release" + initdir="$exitrd" inst_binary "$workspace/usr/lib/systemd/systemd-shutdown" "/usr/lib/systemd/systemd-shutdown" + initdir="$exitrd" inst_libs "$exitrd/usr/lib/systemd/systemd-shutdown" # We need to deal with libsystemd stuff explicitly, as we don't call install_systemd() here while read -r file; do - initdir="$sd_initrd" inst_library "$file" "${file##"$workspace"}" - initdir="$sd_initrd" inst_libs "$file" + initdir="$exitrd" inst_library "$file" "${file##"$workspace"}" + initdir="$exitrd" inst_libs "$file" done < <(find "$workspace/usr/" -name "libsystemd*.so*") # Call systemd-shutdown indirectly, so we can show a message that we can check for - # later to make sure the shutdown initrd was actually executed - cat >"$sd_initrd/shutdown" <<\EOF + # later to make sure the exitrd was actually executed + cat >"$exitrd/shutdown" <<\EOF #!/usr/bin/bash -eu -echo "Hello from shutdown initrd" +echo "Hello from exitrd" exec /usr/lib/systemd/systemd-shutdown "$@" EOF - chmod +x "$sd_initrd/shutdown" + chmod +x "$exitrd/shutdown" } check_result_qemu_hook() { diff --git a/test/units/TEST-08-INITRD.sh b/test/units/TEST-08-INITRD.sh index 58d9bea195f..2f9ec7a2bcc 100755 --- a/test/units/TEST-08-INITRD.sh +++ b/test/units/TEST-08-INITRD.sh @@ -25,6 +25,6 @@ mountpoint /run/initrd-mount-target # Copy the prepared shutdown initrd to its intended location. Check the respective # test.sh file for details mkdir -p /run/initramfs -cp -r /shutdown-initrd/* /run/initramfs/ +cp -r /exitrd/* /run/initramfs/ touch /testok -- 2.47.3