# 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" <<EOF
+[Mount]
+What=tmpfs
+Where=/issue2730
+Type=tmpfs
+
+[Install]
+WantedBy=local-fs.target
+Alias=issue2730-alias.mount
+EOF
+ "${SYSTEMCTL:?}" enable --root="$workspace" issue2730.mount
+ ln -svrf "$workspace/etc/systemd/system/issue2730.mount" "$workspace/etc/systemd/system/issue2730-alias.mount"
+}
+
do_test "$@"
+++ /dev/null
-../TEST-01-BASIC/Makefile
\ No newline at end of file
+++ /dev/null
-#!/usr/bin/env bash
-# SPDX-License-Identifier: LGPL-2.1-or-later
-set -e
-
-TEST_DESCRIPTION="https://github.com/systemd/systemd/issues/2730"
-IMAGE_NAME="test08"
-TEST_NO_NSPAWN=1
-
-# shellcheck source=test/test-functions
-. "${TEST_BASE_DIR:?}/test-functions"
-
-TEST_FORCE_NEWIMAGE=1
-
-do_test "$@"
install_data(kbd_model_map,
install_dir : testdata_dir + '/test-keymap-util')
- testsuite08_dir = testdata_dir + '/testsuite-08.units'
- install_data('testsuite-08.units/-.mount',
- install_dir : testsuite08_dir)
- install_data('testsuite-08.units/systemd-remount-fs.service',
- install_dir : testsuite08_dir)
- meson.add_install_script(meson_make_symlink,
- './-.mount',
- testsuite08_dir + '/root.mount')
- meson.add_install_script(meson_make_symlink,
- '../-.mount',
- testsuite08_dir + '/local-fs.target.wants/-.mount')
-
if conf.get('HAVE_ZSTD') == 1 and efi_arch != ''
install_subdir('test-bcd',
exclude_files : '.gitattributes',
+++ /dev/null
-# SPDX-License-Identifier: LGPL-2.1-or-later
-[Unit]
-Before=local-fs.target
-
-[Mount]
-What=/dev/sda1
-Where=/
-Options=noatime
-
-[Install]
-WantedBy=local-fs.target
-Alias=root.mount
+++ /dev/null
-../-.mount
\ No newline at end of file
+++ /dev/null
--.mount
\ No newline at end of file
+++ /dev/null
-# SPDX-License-Identifier: LGPL-2.1-or-later
-[Unit]
-DefaultDependencies=no
-Conflicts=shutdown.target
-After=systemd-fsck-root.service
-Before=local-fs-pre.target local-fs.target shutdown.target
-Wants=local-fs-pre.target
-
-[Service]
-Type=oneshot
-RemainAfterExit=yes
-ExecStart=/bin/systemctl reload /
: >/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"
+++ /dev/null
-# 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