From: Frantisek Sumsal Date: Wed, 8 Sep 2021 11:33:34 +0000 (+0200) Subject: test: rename `dracut_install` to `image_install` X-Git-Tag: v250-rc1~713 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=39e175367333fe57bcebcfe2a1784c4e7f123a7b;p=thirdparty%2Fsystemd.git test: rename `dracut_install` to `image_install` The `dracut_install` is a misnomer, since the systemd integration test suite is based on the original dracut's test suite, and not all the references to dracut has been edited out. Let's fix that. --- diff --git a/test/TEST-06-SELINUX/test.sh b/test/TEST-06-SELINUX/test.sh index 978c930b71a..d65d273055f 100755 --- a/test/TEST-06-SELINUX/test.sh +++ b/test/TEST-06-SELINUX/test.sh @@ -46,11 +46,11 @@ test_append_files() { cp systemd_test.te "$workspace/systemd-test-module" cp systemd_test.if "$workspace/systemd-test-module" cp systemd_test.fc "$workspace/systemd-test-module" - dracut_install -o sesearch - dracut_install runcon - dracut_install checkmodule semodule semodule_package m4 make load_policy sefcontext_compile - dracut_install -o /usr/libexec/selinux/hll/pp # Fedora/RHEL/... - dracut_install -o /usr/lib/selinux/hll/pp # Debian/Ubuntu/... + image_install -o sesearch + image_install runcon + image_install checkmodule semodule semodule_package m4 make load_policy sefcontext_compile + image_install -o /usr/libexec/selinux/hll/pp # Fedora/RHEL/... + image_install -o /usr/lib/selinux/hll/pp # Debian/Ubuntu/... ) } diff --git a/test/TEST-13-NSPAWN-SMOKE/test.sh b/test/TEST-13-NSPAWN-SMOKE/test.sh index faba5ba0c49..e7e6371fb6b 100755 --- a/test/TEST-13-NSPAWN-SMOKE/test.sh +++ b/test/TEST-13-NSPAWN-SMOKE/test.sh @@ -17,12 +17,12 @@ test_append_files() { inst_simple "$busybox" "$(dirname $busybox)/busybox" if selinuxenabled >/dev/null; then - dracut_install selinuxenabled + image_install selinuxenabled cp -ar /etc/selinux "$workspace/etc/selinux" fi "$TEST_BASE_DIR/create-busybox-container" "$workspace/testsuite-13.nc-container" - initdir="$workspace/testsuite-13.nc-container" dracut_install nc ip md5sum + initdir="$workspace/testsuite-13.nc-container" image_install nc ip md5sum ) } diff --git a/test/TEST-55-OOMD/test.sh b/test/TEST-55-OOMD/test.sh index 6f7e776c3c9..8e75651a22f 100755 --- a/test/TEST-55-OOMD/test.sh +++ b/test/TEST-55-OOMD/test.sh @@ -11,7 +11,7 @@ test_append_files() { # Create a swap device ( mkswap "${LOOPDEV:?}p2" - dracut_install swapon swapoff + image_install swapon swapoff cat >>"${initdir:?}/etc/fstab" <"$asan_wrapper" <&1 >/dev/null | sed -n '/calling init: .*libnss_/ {s!^.* /!/!; p}') - dracut_install "${NSS_LIBS[@]}" + image_install "${NSS_LIBS[@]}" } install_dbus() { @@ -1613,7 +1613,7 @@ install_pam() { # pam_unix depends on unix_chkpwd. # see http://www.linux-pam.org/Linux-PAM-html/sag-pam_unix.html - dracut_install -o unix_chkpwd + image_install -o unix_chkpwd # set empty root password for easy debugging sed -i 's/^root:x:/root::/' "${initdir:?}/etc/passwd" @@ -1682,7 +1682,7 @@ install_terminfo() { for terminfodir in /lib/terminfo /etc/terminfo /usr/share/terminfo; do [ -f "${terminfodir}/l/linux" ] && break done - dracut_install -o "${terminfodir}/l/linux" + image_install -o "${terminfodir}/l/linux" } has_user_dbus_socket() { @@ -1759,7 +1759,7 @@ inst_libs() { dfatal "Missing a shared library required by $bin." dfatal "Run \"ldd $bin\" to find out what it is." dfatal "$line" - dfatal "dracut cannot create an initrd." + dfatal "Cannot create a test image." exit 1 fi done < <(LC_ALL=C ldd "$bin" 2>/dev/null) @@ -2149,7 +2149,7 @@ inst_binary() { dfatal "Missing a shared library required by $bin." dfatal "Run \"ldd $bin\" to find out what it is." dfatal "$line" - dfatal "dracut cannot create an initrd." + dfatal "Cannot create a test image." exit 1 fi done < <(LC_ALL=C ldd "$bin" 2>/dev/null) @@ -2209,7 +2209,7 @@ inst_rule_programs() { fi #dinfo "Installing $_bin due to it's use in the udev rule $(basename $1)" - dracut_install "$bin" + image_install "$bin" done } @@ -2297,10 +2297,10 @@ inst_any() { return 1 } -# dracut_install [-o ] [ ... ] -# Install to the initramfs image +# image_install [-o ] [ ... ] +# Install to the test image # -o optionally install the and don't fail, if it is not there -dracut_install() { +image_install() { local optional=no local prog="${1:?}"