systemd/test/TEST-82-SOFTREBOOT/test.sh
Daan De Meyer 3c0a1b1e70 core: Imply DefaultDependencies=no for credential mounts
Currently, on soft-reboot, /run/credentials/@system is unmounted
because it has DefaultDependencies=yes and as such will have
Conflicts=umount.target and Before=umount.target. Let's make sure
credential mounts survive soft-reboot by implying DefaultDependencies=no
for credential mounts.
2024-05-14 12:42:45 +02:00

29 lines
761 B
Bash
Executable file

#!/usr/bin/env bash
# SPDX-License-Identifier: LGPL-2.1-or-later
set -e
TEST_DESCRIPTION="Test Soft-Rebooting"
# We temporarily remount rootfs read-only, so ignore any missing coverage
IGNORE_MISSING_COVERAGE=yes
# Prevent shutdown in test suite, the expect script does that manually.
TEST_SKIP_SHUTDOWN=yes
IMAGE_NAME="softreboot"
TEST_NO_NSPAWN=1
TEST_INSTALL_VERITY_MINIMAL=1
KERNEL_APPEND="${KERNEL_APPEND:-} systemd.set_credential=kernelcmdlinecred:uff"
# shellcheck source=test/test-functions
. "$TEST_BASE_DIR/test-functions"
test_require_bin mksquashfs veritysetup sfdisk
test_append_files() {
instmods squashfs =squashfs
instmods dm_verity =md
install_dmevent
generate_module_dependencies
install_verity_minimal
}
do_test "$@"