]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
Skip tmpfs-sensitive tests if fstype cannot be determined
authorChris Hofstaedtler <zeha@debian.org>
Wed, 13 Nov 2024 13:51:37 +0000 (14:51 +0100)
committerChris Hofstaedtler <chris@hofstaedtler.name>
Fri, 15 Nov 2024 11:22:38 +0000 (12:22 +0100)
In certain isolation environments (f.e. Debian's sbuild+unshare),
`/proc/mounts` does not have an entry for the directory we're building in.

Then, findmnt as used in the tests returns nothing. As the build directory
might very well be on tmpfs (and often is, in Debian), disable the two tests
known to fail on tmpfs.

In yet another scenario, if ran in a Docker/podman container, the fstype
will read "overlay", which in the end can also be tmpfs, and we see problems
there, too.

This was noticed because torvalds/linux@e88e0d366f9cfbb810b0c8509dc5d130d5a53e02
changed the behaviour of the underlying syscalls on tmpfs in Linux 6.6.

Closes: #3266
Debian bug #1086706

Signed-off-by: Chris Hofstaedtler <zeha@debian.org>
tests/ts/fadvise/drop
tests/ts/fincore/count

index 45dcb9110beabc891fd3506c855f38ce8d2a904f..ac7ce012a02f6279eb342e2dbc497eb360b80136 100755 (executable)
@@ -19,9 +19,9 @@ FILE="ddtest"
 BS=65536
 COUNT=8
 
-FILE_FS="$("$TS_CMD_FINDMNT" -nr -o FSTYPE -T "$PWD")"
-if [[ "$FILE_FS" = "tmpfs" ]]; then
-       ts_skip "fincore does not work on tmpfs"
+FS="$("$TS_CMD_FINDMNT" -nr -o FSTYPE -T "$PWD")"
+if [[ "$FS" = "tmpfs" || "$FS" = "overlay" || "$FS" = "" ]]; then
+       ts_skip "fincore does not work on tmpfs or unknown fs"
 fi
 
 create_file() {
index caf9c3a9cfd0e859cc8d83c44799f8d868f60c39..8a5fffe364aa4229503af43e5ec966cdcbe762d4 100755 (executable)
@@ -10,8 +10,8 @@ ts_check_test_command "$TS_CMD_FINDMNT"
 ts_check_test_command "$TS_HELPER_SYSINFO"
 
 FS="$("$TS_CMD_FINDMNT" -nr -o FSTYPE -T "$PWD")"
-if [[ "$FS" = "tmpfs" ]]; then
-       ts_skip "fincore does not work on tmpfs"
+if [[ "$FS" = "tmpfs" || "$FS" = "overlay" || "$FS" = "" ]]; then
+       ts_skip "fincore does not work on tmpfs or unknown fs"
 fi
 
 function footer