summaryrefslogtreecommitdiffstats
path: root/test/units/testsuite-58.sh
diff options
context:
space:
mode:
authorDaan De Meyer <daan.j.demeyer@gmail.com>2023-02-20 16:39:34 +0100
committerDaan De Meyer <daan.j.demeyer@gmail.com>2023-02-22 12:44:39 +0100
commit4d8ff4e8688c352167d258d748008a96fa853c95 (patch)
treeb4894f910fb37115018cb06c8f0b9e31921df679 /test/units/testsuite-58.sh
parentcopy: Support both inode exclusion and contents exclusion (diff)
downloadsystemd-4d8ff4e8688c352167d258d748008a96fa853c95.tar.xz
systemd-4d8ff4e8688c352167d258d748008a96fa853c95.zip
repart: Exclude APIVFS mountpoint directories
Also exclude APIVFS and temporary files directories from the copy operation so that these files don't accidentally end up in images.
Diffstat (limited to '')
-rwxr-xr-xtest/units/testsuite-58.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/units/testsuite-58.sh b/test/units/testsuite-58.sh
index 99f6223d40..c58465356c 100755
--- a/test/units/testsuite-58.sh
+++ b/test/units/testsuite-58.sh
@@ -852,6 +852,8 @@ test_exclude_files() {
runas testuser mkdir "$root/usr"
runas testuser touch "$root/usr/def"
runas testuser touch "$root/usr/qed"
+ runas testuser mkdir "$root/tmp"
+ runas testuser touch "$root/tmp/prs"
runas testuser tee "$defs/00-root.conf" <<EOF
[Partition]
@@ -890,6 +892,10 @@ EOF
assert_rc 0 ls "$imgs/mnt/usr"
assert_rc 2 ls "$imgs/mnt/usr/def"
+ # Test that /tmp/prs did not end up in the root partition but /tmp did.
+ assert_rc 0 ls "$imgs/mnt/tmp"
+ assert_rc 2 ls "$imgs/mnt/tmp/prs"
+
# Test that /usr/qed did not end up in the usr partition but /usr/def did.
mount -t ext4 "${loop}p2" "$imgs/mnt/usr"
assert_rc 0 ls "$imgs/mnt/usr/def"