From: Chris Hofstaedtler Date: Wed, 13 Nov 2024 13:51:37 +0000 (+0100) Subject: Skip tmpfs-sensitive tests if fstype cannot be determined X-Git-Tag: v2.42-start~154^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=83359a297911f39245343e270f8b9ea587df23f2;p=thirdparty%2Futil-linux.git Skip tmpfs-sensitive tests if fstype cannot be determined 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 --- diff --git a/tests/ts/fadvise/drop b/tests/ts/fadvise/drop index 45dcb9110b..ac7ce012a0 100755 --- a/tests/ts/fadvise/drop +++ b/tests/ts/fadvise/drop @@ -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() { diff --git a/tests/ts/fincore/count b/tests/ts/fincore/count index caf9c3a9cf..8a5fffe364 100755 --- a/tests/ts/fincore/count +++ b/tests/ts/fincore/count @@ -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