teknoraver / rpms / systemd

Forked from rpms/systemd 3 months ago
Clone

Blame SOURCES/0034-test-fstab-generator-adjust-PATH-for-fsck.patch

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