From b6d8ff21df92e6686ce37b047c70c43967b8a2c1 Mon Sep 17 00:00:00 2001 From: Frantisek Sumsal Date: Wed, 10 May 2023 13:07:26 +0200 Subject: [PATCH] test: merge TEST-08-ISSUE-2730 into TEST-07-PID1 (cherry picked from commit cd62ba42a40e5d87a83a98bc421419bd2778d4ec) Related: #2213521 --- test/TEST-07-PID1/test.sh | 19 +++++++++++++++++++ test/TEST-08-ISSUE-2730/Makefile | 1 - test/TEST-08-ISSUE-2730/test.sh | 14 -------------- test/meson.build | 12 ------------ test/testsuite-08.units/-.mount | 12 ------------ .../local-fs.target.wants/-.mount | 1 - test/testsuite-08.units/root.mount | 1 - .../systemd-remount-fs.service | 12 ------------ test/units/testsuite-07.sh | 4 ++++ test/units/testsuite-08.service | 8 -------- 10 files changed, 23 insertions(+), 61 deletions(-) delete mode 120000 test/TEST-08-ISSUE-2730/Makefile delete mode 100755 test/TEST-08-ISSUE-2730/test.sh delete mode 100644 test/testsuite-08.units/-.mount delete mode 120000 test/testsuite-08.units/local-fs.target.wants/-.mount delete mode 120000 test/testsuite-08.units/root.mount delete mode 100644 test/testsuite-08.units/systemd-remount-fs.service delete mode 100644 test/units/testsuite-08.service diff --git a/test/TEST-07-PID1/test.sh b/test/TEST-07-PID1/test.sh index 2b9dd418b8..c241840327 100755 --- a/test/TEST-07-PID1/test.sh +++ b/test/TEST-07-PID1/test.sh @@ -7,4 +7,23 @@ TEST_DESCRIPTION="Tests for core PID1 functionality" # shellcheck source=test/test-functions . "${TEST_BASE_DIR:?}/test-functions" +test_append_files() { + local workspace="${1:?}" + + # Issue: https://github.com/systemd/systemd/issues/2730 + mkdir -p "$workspace/etc/systemd/system/" + cat >"$workspace/etc/systemd/system/issue2730.mount" </failed +# Issue: https://github.com/systemd/systemd/issues/2730 +# See TEST-07-PID1/test.sh for the first "half" of the test +mountpoint /issue2730 + for script in "${0%.sh}".*.sh; do echo "Running $script" "./$script" diff --git a/test/units/testsuite-08.service b/test/units/testsuite-08.service deleted file mode 100644 index d6937663e2..0000000000 --- a/test/units/testsuite-08.service +++ /dev/null @@ -1,8 +0,0 @@ -# SPDX-License-Identifier: LGPL-2.1-or-later -[Unit] -Description=TEST-08-ISSUE-2730 - -[Service] -ExecStartPre=rm -f /failed /testok -ExecStart=sh -x -c 'mount -o remount,rw /dev/sda1 && echo OK >/testok; systemctl poweroff' -Type=oneshot