2aacef
From 054da791c98fba7e11079e94c9b9fe0b1ca4e8d4 Mon Sep 17 00:00:00 2001
2aacef
From: =?UTF-8?q?Christian=20G=C3=B6ttsche?= <cgzones@googlemail.com>
2aacef
Date: Fri, 4 Nov 2022 15:48:50 +0100
2aacef
Subject: [PATCH] test: fstab-generator: adjust PATH for fsck
2aacef
2aacef
fsck(8) is located in /usr/sib/ on Debian sid:
2aacef
2aacef
    stdout:
2aacef
    *** Running /home/christian/Coding/workspaces/systemd/test/testdata/test-fstab-generator/test-01-dev-nfs.input
2aacef
    *** Running /home/christian/Coding/workspaces/systemd/test/testdata/test-fstab-generator/test-02-dhcp.input
2aacef
    *** Running /home/christian/Coding/workspaces/systemd/test/testdata/test-fstab-generator/test-03-dhcp6.input
2aacef
    *** Running /home/christian/Coding/workspaces/systemd/test/testdata/test-fstab-generator/test-04-nfs.input
2aacef
    *** Running /home/christian/Coding/workspaces/systemd/test/testdata/test-fstab-generator/test-05-nfs4.input
2aacef
    *** Running /home/christian/Coding/workspaces/systemd/test/testdata/test-fstab-generator/test-06-ipv4.input
2aacef
    *** Running /home/christian/Coding/workspaces/systemd/test/testdata/test-fstab-generator/test-07-ipv6.input
2aacef
    *** Running /home/christian/Coding/workspaces/systemd/test/testdata/test-fstab-generator/test-08-implicit-nfs.input
2aacef
    *** Running /home/christian/Coding/workspaces/systemd/test/testdata/test-fstab-generator/test-09-cifs.input
2aacef
    *** Running /home/christian/Coding/workspaces/systemd/test/testdata/test-fstab-generator/test-10-iscsi.input
2aacef
    *** Running /home/christian/Coding/workspaces/systemd/test/testdata/test-fstab-generator/test-11-live.input
2aacef
    *** Running /home/christian/Coding/workspaces/systemd/test/testdata/test-fstab-generator/test-12-dev-sdx.input
2aacef
    --- /dev/fd/63  2022-11-04 15:39:13.131532174 +0100
2aacef
    +++ /dev/fd/62  2022-11-04 15:39:13.131532174 +0100
2aacef
    @@ -6,3 +6,4 @@
2aacef
     initrd-usr-fs.target.requires
2aacef
     initrd-usr-fs.target.requires/sysroot.mount
2aacef
     sysroot.mount
2aacef
    +systemd-fsck-root.service
2aacef
    **** Unexpected output for /home/christian/Coding/workspaces/systemd/test/testdata/test-fstab-generator/test-12-dev-sdx.input
2aacef
    stderr:
2aacef
    Skipping root directory handling, as root on NFS was requested.
2aacef
    Skipping root directory handling, as root on NFS was requested.
2aacef
    Skipping root directory handling, as root on NFS was requested.
2aacef
    Skipping root directory handling, as root on NFS was requested.
2aacef
    Skipping root directory handling, as root on NFS was requested.
2aacef
    Skipping root directory handling, as root on NFS was requested.
2aacef
    Skipping root directory handling, as root on NFS was requested.
2aacef
    Skipping root directory handling, as root on NFS was requested.
2aacef
    Skipping root directory handling, as root on CIFS was requested.
2aacef
    Skipping root directory handling, as root on iSCSI was requested.
2aacef
    Skipping root directory handling, as root on live image was requested.
2aacef
    Found entry what=/dev/sdx1 where=/sysroot type=n/a opts=ro
2aacef
    Checking was requested for /dev/sdx1, but the fsck command does not exist.
2aacef
2aacef
(cherry picked from commit a45efc9e4b574a85176610496f2ac7ae769364bb)
2aacef
2aacef
Related #2138081
2aacef
---
2aacef
 test/test-fstab-generator.sh | 3 +++
2aacef
 1 file changed, 3 insertions(+)
2aacef
2aacef
diff --git a/test/test-fstab-generator.sh b/test/test-fstab-generator.sh
2aacef
index 0c977645e3..7c060dfac7 100755
2aacef
--- a/test/test-fstab-generator.sh
2aacef
+++ b/test/test-fstab-generator.sh
2aacef
@@ -14,6 +14,9 @@ fi
2aacef
 
2aacef
 src="$(dirname "$0")/testdata/test-fstab-generator"
2aacef
 
2aacef
+# fsck(8) is located in /usr/sbin on Debian
2aacef
+PATH=$PATH:/usr/sbin
2aacef
+
2aacef
 for f in "$src"/test-*.input; do
2aacef
     echo "*** Running $f"
2aacef