diff --git a/test/test-fstab-generator.sh b/test/test-fstab-generator.sh index a27c397cce..0c977645e3 100755 --- a/test/test-fstab-generator.sh +++ b/test/test-fstab-generator.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash # SPDX-License-Identifier: LGPL-2.1-or-later -set -ex +set -e if [[ -n "$1" ]]; then generator=$1 @@ -30,7 +30,9 @@ for f in "$src"/test-*.input; do sed -i -e 's:ExecStart=/lib/systemd/systemd-fsck:ExecStart=/usr/lib/systemd/systemd-fsck:' "$out"/systemd-fsck-root.service fi - if ! diff -u "$out" "${f%.input}.expected"; then + # We store empty files rather than symlinks, so that they don't get pruned when packaged up, so compare + # the list of filenames rather than their content + if ! diff -u <(find "$out" -printf '%P\n' | sort) <(find "${f%.input}.expected" -printf '%P\n' | sort); then echo "**** Unexpected output for $f" exit 1 fi diff --git a/test/test-fstab-generator/test-01-dev-nfs.expected/initrd-usr-fs.target.requires/sysroot.mount b/test/test-fstab-generator/test-01-dev-nfs.expected/initrd-usr-fs.target.requires/sysroot.mount deleted file mode 120000 index 0c969cdbd4..0000000000 --- a/test/test-fstab-generator/test-01-dev-nfs.expected/initrd-usr-fs.target.requires/sysroot.mount +++ /dev/null @@ -1 +0,0 @@ -../sysroot.mount \ No newline at end of file diff --git a/test/test-fstab-generator/test-01-dev-nfs.expected/initrd-usr-fs.target.requires/sysroot.mount b/test/test-fstab-generator/test-01-dev-nfs.expected/initrd-usr-fs.target.requires/sysroot.mount new file mode 100644 index 0000000000..e69de29bb2 diff --git a/test/test-fstab-generator/test-02-dhcp.expected/initrd-usr-fs.target.requires/sysroot.mount b/test/test-fstab-generator/test-02-dhcp.expected/initrd-usr-fs.target.requires/sysroot.mount deleted file mode 120000 index 0c969cdbd4..0000000000 --- a/test/test-fstab-generator/test-02-dhcp.expected/initrd-usr-fs.target.requires/sysroot.mount +++ /dev/null @@ -1 +0,0 @@ -../sysroot.mount \ No newline at end of file diff --git a/test/test-fstab-generator/test-02-dhcp.expected/initrd-usr-fs.target.requires/sysroot.mount b/test/test-fstab-generator/test-02-dhcp.expected/initrd-usr-fs.target.requires/sysroot.mount new file mode 100644 index 0000000000..e69de29bb2 diff --git a/test/test-fstab-generator/test-03-dhcp6.expected/initrd-usr-fs.target.requires/sysroot.mount b/test/test-fstab-generator/test-03-dhcp6.expected/initrd-usr-fs.target.requires/sysroot.mount deleted file mode 120000 index 0c969cdbd4..0000000000 --- a/test/test-fstab-generator/test-03-dhcp6.expected/initrd-usr-fs.target.requires/sysroot.mount +++ /dev/null @@ -1 +0,0 @@ -../sysroot.mount \ No newline at end of file diff --git a/test/test-fstab-generator/test-03-dhcp6.expected/initrd-usr-fs.target.requires/sysroot.mount b/test/test-fstab-generator/test-03-dhcp6.expected/initrd-usr-fs.target.requires/sysroot.mount new file mode 100644 index 0000000000..e69de29bb2 diff --git a/test/test-fstab-generator/test-04-nfs.expected/initrd-usr-fs.target.requires/sysroot.mount b/test/test-fstab-generator/test-04-nfs.expected/initrd-usr-fs.target.requires/sysroot.mount deleted file mode 120000 index 0c969cdbd4..0000000000 --- a/test/test-fstab-generator/test-04-nfs.expected/initrd-usr-fs.target.requires/sysroot.mount +++ /dev/null @@ -1 +0,0 @@ -../sysroot.mount \ No newline at end of file diff --git a/test/test-fstab-generator/test-04-nfs.expected/initrd-usr-fs.target.requires/sysroot.mount b/test/test-fstab-generator/test-04-nfs.expected/initrd-usr-fs.target.requires/sysroot.mount new file mode 100644 index 0000000000..e69de29bb2 diff --git a/test/test-fstab-generator/test-05-nfs4.expected/initrd-usr-fs.target.requires/sysroot.mount b/test/test-fstab-generator/test-05-nfs4.expected/initrd-usr-fs.target.requires/sysroot.mount deleted file mode 120000 index 0c969cdbd4..0000000000 --- a/test/test-fstab-generator/test-05-nfs4.expected/initrd-usr-fs.target.requires/sysroot.mount +++ /dev/null @@ -1 +0,0 @@ -../sysroot.mount \ No newline at end of file diff --git a/test/test-fstab-generator/test-05-nfs4.expected/initrd-usr-fs.target.requires/sysroot.mount b/test/test-fstab-generator/test-05-nfs4.expected/initrd-usr-fs.target.requires/sysroot.mount new file mode 100644 index 0000000000..e69de29bb2 diff --git a/test/test-fstab-generator/test-06-ipv4.expected/initrd-usr-fs.target.requires/sysroot.mount b/test/test-fstab-generator/test-06-ipv4.expected/initrd-usr-fs.target.requires/sysroot.mount deleted file mode 120000 index 0c969cdbd4..0000000000 --- a/test/test-fstab-generator/test-06-ipv4.expected/initrd-usr-fs.target.requires/sysroot.mount +++ /dev/null @@ -1 +0,0 @@ -../sysroot.mount \ No newline at end of file diff --git a/test/test-fstab-generator/test-06-ipv4.expected/initrd-usr-fs.target.requires/sysroot.mount b/test/test-fstab-generator/test-06-ipv4.expected/initrd-usr-fs.target.requires/sysroot.mount new file mode 100644 index 0000000000..e69de29bb2 diff --git a/test/test-fstab-generator/test-07-ipv6.expected/initrd-usr-fs.target.requires/sysroot.mount b/test/test-fstab-generator/test-07-ipv6.expected/initrd-usr-fs.target.requires/sysroot.mount deleted file mode 120000 index 0c969cdbd4..0000000000 --- a/test/test-fstab-generator/test-07-ipv6.expected/initrd-usr-fs.target.requires/sysroot.mount +++ /dev/null @@ -1 +0,0 @@ -../sysroot.mount \ No newline at end of file diff --git a/test/test-fstab-generator/test-07-ipv6.expected/initrd-usr-fs.target.requires/sysroot.mount b/test/test-fstab-generator/test-07-ipv6.expected/initrd-usr-fs.target.requires/sysroot.mount new file mode 100644 index 0000000000..e69de29bb2 diff --git a/test/test-fstab-generator/test-08-implicit-nfs.expected/initrd-usr-fs.target.requires/sysroot.mount b/test/test-fstab-generator/test-08-implicit-nfs.expected/initrd-usr-fs.target.requires/sysroot.mount deleted file mode 120000 index 0c969cdbd4..0000000000 --- a/test/test-fstab-generator/test-08-implicit-nfs.expected/initrd-usr-fs.target.requires/sysroot.mount +++ /dev/null @@ -1 +0,0 @@ -../sysroot.mount \ No newline at end of file diff --git a/test/test-fstab-generator/test-08-implicit-nfs.expected/initrd-usr-fs.target.requires/sysroot.mount b/test/test-fstab-generator/test-08-implicit-nfs.expected/initrd-usr-fs.target.requires/sysroot.mount new file mode 100644 index 0000000000..e69de29bb2 diff --git a/test/test-fstab-generator/test-09-cifs.expected/initrd-usr-fs.target.requires/sysroot.mount b/test/test-fstab-generator/test-09-cifs.expected/initrd-usr-fs.target.requires/sysroot.mount deleted file mode 120000 index 0c969cdbd4..0000000000 --- a/test/test-fstab-generator/test-09-cifs.expected/initrd-usr-fs.target.requires/sysroot.mount +++ /dev/null @@ -1 +0,0 @@ -../sysroot.mount \ No newline at end of file diff --git a/test/test-fstab-generator/test-09-cifs.expected/initrd-usr-fs.target.requires/sysroot.mount b/test/test-fstab-generator/test-09-cifs.expected/initrd-usr-fs.target.requires/sysroot.mount new file mode 100644 index 0000000000..e69de29bb2 diff --git a/test/test-fstab-generator/test-10-iscsi.expected/initrd-usr-fs.target.requires/sysroot.mount b/test/test-fstab-generator/test-10-iscsi.expected/initrd-usr-fs.target.requires/sysroot.mount deleted file mode 120000 index 0c969cdbd4..0000000000 --- a/test/test-fstab-generator/test-10-iscsi.expected/initrd-usr-fs.target.requires/sysroot.mount +++ /dev/null @@ -1 +0,0 @@ -../sysroot.mount \ No newline at end of file diff --git a/test/test-fstab-generator/test-10-iscsi.expected/initrd-usr-fs.target.requires/sysroot.mount b/test/test-fstab-generator/test-10-iscsi.expected/initrd-usr-fs.target.requires/sysroot.mount new file mode 100644 index 0000000000..e69de29bb2 diff --git a/test/test-fstab-generator/test-11-live.expected/initrd-usr-fs.target.requires/sysroot.mount b/test/test-fstab-generator/test-11-live.expected/initrd-usr-fs.target.requires/sysroot.mount deleted file mode 120000 index 0c969cdbd4..0000000000 --- a/test/test-fstab-generator/test-11-live.expected/initrd-usr-fs.target.requires/sysroot.mount +++ /dev/null @@ -1 +0,0 @@ -../sysroot.mount \ No newline at end of file diff --git a/test/test-fstab-generator/test-11-live.expected/initrd-usr-fs.target.requires/sysroot.mount b/test/test-fstab-generator/test-11-live.expected/initrd-usr-fs.target.requires/sysroot.mount new file mode 100644 index 0000000000..e69de29bb2 diff --git a/test/test-fstab-generator/test-12-dev-sdx.expected/initrd-root-fs.target.requires/sysroot.mount b/test/test-fstab-generator/test-12-dev-sdx.expected/initrd-root-fs.target.requires/sysroot.mount deleted file mode 120000 index 0c969cdbd4..0000000000 --- a/test/test-fstab-generator/test-12-dev-sdx.expected/initrd-root-fs.target.requires/sysroot.mount +++ /dev/null @@ -1 +0,0 @@ -../sysroot.mount \ No newline at end of file diff --git a/test/test-fstab-generator/test-12-dev-sdx.expected/initrd-root-fs.target.requires/sysroot.mount b/test/test-fstab-generator/test-12-dev-sdx.expected/initrd-root-fs.target.requires/sysroot.mount new file mode 100644 index 0000000000..e69de29bb2 diff --git a/test/test-fstab-generator/test-12-dev-sdx.expected/initrd-usr-fs.target.requires/sysroot.mount b/test/test-fstab-generator/test-12-dev-sdx.expected/initrd-usr-fs.target.requires/sysroot.mount deleted file mode 120000 index 0c969cdbd4..0000000000 --- a/test/test-fstab-generator/test-12-dev-sdx.expected/initrd-usr-fs.target.requires/sysroot.mount +++ /dev/null @@ -1 +0,0 @@ -../sysroot.mount \ No newline at end of file diff --git a/test/test-fstab-generator/test-12-dev-sdx.expected/initrd-usr-fs.target.requires/sysroot.mount b/test/test-fstab-generator/test-12-dev-sdx.expected/initrd-usr-fs.target.requires/sysroot.mount new file mode 100644 index 0000000000..e69de29bb2 diff --git a/test/test-fstab-generator/test-13-label.expected/initrd-root-fs.target.requires/sysroot.mount b/test/test-fstab-generator/test-13-label.expected/initrd-root-fs.target.requires/sysroot.mount deleted file mode 120000 index 0c969cdbd4..0000000000 --- a/test/test-fstab-generator/test-13-label.expected/initrd-root-fs.target.requires/sysroot.mount +++ /dev/null @@ -1 +0,0 @@ -../sysroot.mount \ No newline at end of file diff --git a/test/test-fstab-generator/test-13-label.expected/initrd-root-fs.target.requires/sysroot.mount b/test/test-fstab-generator/test-13-label.expected/initrd-root-fs.target.requires/sysroot.mount new file mode 100644 index 0000000000..e69de29bb2 diff --git a/test/test-fstab-generator/test-13-label.expected/initrd-usr-fs.target.requires/sysroot.mount b/test/test-fstab-generator/test-13-label.expected/initrd-usr-fs.target.requires/sysroot.mount deleted file mode 120000 index 0c969cdbd4..0000000000 --- a/test/test-fstab-generator/test-13-label.expected/initrd-usr-fs.target.requires/sysroot.mount +++ /dev/null @@ -1 +0,0 @@ -../sysroot.mount \ No newline at end of file diff --git a/test/test-fstab-generator/test-13-label.expected/initrd-usr-fs.target.requires/sysroot.mount b/test/test-fstab-generator/test-13-label.expected/initrd-usr-fs.target.requires/sysroot.mount new file mode 100644 index 0000000000..e69de29bb2 diff --git a/test/test-fstab-generator/test-14-uuid.expected/initrd-root-fs.target.requires/sysroot.mount b/test/test-fstab-generator/test-14-uuid.expected/initrd-root-fs.target.requires/sysroot.mount deleted file mode 120000 index 0c969cdbd4..0000000000 --- a/test/test-fstab-generator/test-14-uuid.expected/initrd-root-fs.target.requires/sysroot.mount +++ /dev/null @@ -1 +0,0 @@ -../sysroot.mount \ No newline at end of file diff --git a/test/test-fstab-generator/test-14-uuid.expected/initrd-root-fs.target.requires/sysroot.mount b/test/test-fstab-generator/test-14-uuid.expected/initrd-root-fs.target.requires/sysroot.mount new file mode 100644 index 0000000000..e69de29bb2 diff --git a/test/test-fstab-generator/test-14-uuid.expected/initrd-usr-fs.target.requires/sysroot.mount b/test/test-fstab-generator/test-14-uuid.expected/initrd-usr-fs.target.requires/sysroot.mount deleted file mode 120000 index 0c969cdbd4..0000000000 --- a/test/test-fstab-generator/test-14-uuid.expected/initrd-usr-fs.target.requires/sysroot.mount +++ /dev/null @@ -1 +0,0 @@ -../sysroot.mount \ No newline at end of file diff --git a/test/test-fstab-generator/test-14-uuid.expected/initrd-usr-fs.target.requires/sysroot.mount b/test/test-fstab-generator/test-14-uuid.expected/initrd-usr-fs.target.requires/sysroot.mount new file mode 100644 index 0000000000..e69de29bb2 diff --git a/test/test-fstab-generator/test-15-partuuid.expected/initrd-root-fs.target.requires/sysroot.mount b/test/test-fstab-generator/test-15-partuuid.expected/initrd-root-fs.target.requires/sysroot.mount deleted file mode 120000 index 0c969cdbd4..0000000000 --- a/test/test-fstab-generator/test-15-partuuid.expected/initrd-root-fs.target.requires/sysroot.mount +++ /dev/null @@ -1 +0,0 @@ -../sysroot.mount \ No newline at end of file diff --git a/test/test-fstab-generator/test-15-partuuid.expected/initrd-root-fs.target.requires/sysroot.mount b/test/test-fstab-generator/test-15-partuuid.expected/initrd-root-fs.target.requires/sysroot.mount new file mode 100644 index 0000000000..e69de29bb2 diff --git a/test/test-fstab-generator/test-15-partuuid.expected/initrd-usr-fs.target.requires/sysroot.mount b/test/test-fstab-generator/test-15-partuuid.expected/initrd-usr-fs.target.requires/sysroot.mount deleted file mode 120000 index 0c969cdbd4..0000000000 --- a/test/test-fstab-generator/test-15-partuuid.expected/initrd-usr-fs.target.requires/sysroot.mount +++ /dev/null @@ -1 +0,0 @@ -../sysroot.mount \ No newline at end of file diff --git a/test/test-fstab-generator/test-15-partuuid.expected/initrd-usr-fs.target.requires/sysroot.mount b/test/test-fstab-generator/test-15-partuuid.expected/initrd-usr-fs.target.requires/sysroot.mount new file mode 100644 index 0000000000..e69de29bb2 diff --git a/test/test-fstab-generator/test-16-tmpfs.expected/initrd-root-fs.target.requires/sysroot.mount b/test/test-fstab-generator/test-16-tmpfs.expected/initrd-root-fs.target.requires/sysroot.mount deleted file mode 120000 index 0c969cdbd4..0000000000 --- a/test/test-fstab-generator/test-16-tmpfs.expected/initrd-root-fs.target.requires/sysroot.mount +++ /dev/null @@ -1 +0,0 @@ -../sysroot.mount \ No newline at end of file diff --git a/test/test-fstab-generator/test-16-tmpfs.expected/initrd-root-fs.target.requires/sysroot.mount b/test/test-fstab-generator/test-16-tmpfs.expected/initrd-root-fs.target.requires/sysroot.mount new file mode 100644 index 0000000000..e69de29bb2 diff --git a/test/test-fstab-generator/test-16-tmpfs.expected/initrd-usr-fs.target.requires/sysroot.mount b/test/test-fstab-generator/test-16-tmpfs.expected/initrd-usr-fs.target.requires/sysroot.mount deleted file mode 120000 index 0c969cdbd4..0000000000 --- a/test/test-fstab-generator/test-16-tmpfs.expected/initrd-usr-fs.target.requires/sysroot.mount +++ /dev/null @@ -1 +0,0 @@ -../sysroot.mount \ No newline at end of file diff --git a/test/test-fstab-generator/test-16-tmpfs.expected/initrd-usr-fs.target.requires/sysroot.mount b/test/test-fstab-generator/test-16-tmpfs.expected/initrd-usr-fs.target.requires/sysroot.mount new file mode 100644 index 0000000000..e69de29bb2