]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
tests: update mountpoint return code chack
authorKarel Zak <kzak@redhat.com>
Fri, 12 Mar 2021 10:39:12 +0000 (11:39 +0100)
committerKarel Zak <kzak@redhat.com>
Fri, 12 Mar 2021 10:39:23 +0000 (11:39 +0100)
This is necessary due to e0ecd196414c03699cd8e8dd2c6f4fe533999837.

Signed-off-by: Karel Zak <kzak@redhat.com>
tests/ts/mount/move

index e828a8942c19949e7d40e5b6177eeb7d8cfad5b2..9d2723a751929edc856788b8905c86eea7bc5678 100755 (executable)
@@ -68,6 +68,11 @@ mount_and_check --move $DIR_A $DIR_B
 for f in `find $DIR_PRIVATE2 $DIR_PRIVATE`; do
        xo="$($TS_CMD_MOUNTPOINT -q "$f" 2>&1)"
        x=$?
+       # mountpoint(1) returns 32 if mountpoint does not exist, map it to 1 to
+       # be compatible with findmnt(8)
+       if [ "$x" = "32" ]; then
+               x=1
+       fi
        yo="$($TS_CMD_FINDMNT --kernel --mountpoint "$f" 2>&1)"
        y=$?