]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
tests: skip subdir test if unshared session
authorKarel Zak <kzak@redhat.com>
Fri, 28 Apr 2023 09:01:01 +0000 (11:01 +0200)
committerKarel Zak <kzak@redhat.com>
Fri, 28 Apr 2023 09:01:01 +0000 (11:01 +0200)
Addresses: https://github.com/util-linux/util-linux/pull/2197
Signed-off-by: Karel Zak <kzak@redhat.com>
tests/ts/mount/subdir

index 04ba6dc1cd402238bbea731c5613320e77302981..c099200312ea3696383774f3899bf1b2bae81928 100755 (executable)
@@ -22,9 +22,13 @@ TS_DESC="X-mount.subdir"
 ts_init "$*"
 
 ts_check_test_command "$TS_CMD_MOUNT"
+ts_check_test_command "$TS_CMD_FINDMNT"
 ts_skip_nonroot
 ts_check_losetup
 
+prop=$($TS_CMD_FINDMNT --task "$$" -n -o PROPAGATION "/")
+[ "$prop" == "private" ] && ts_skip "unshared session"
+
 ts_device_init
 DEVICE=$TS_LODEV