From: WanBingjiang Date: Thu, 7 May 2026 07:27:31 +0000 (+0800) Subject: tests: skip fallocate/zero-range test when /proc/sys/vm/drop_caches is not writable X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5cba9f09e84a5195fa68389a57cea7ed97115015;p=thirdparty%2Futil-linux.git tests: skip fallocate/zero-range test when /proc/sys/vm/drop_caches is not writable The build (compat, ubuntu:18.04) CI job runs inside a Docker container where /proc/sys/vm/drop_caches is read-only. Falling back to fallocate --report-holes with stale VFS cache yields 0 holes instead of 1, causing the test to fail. --- diff --git a/tests/ts/fallocate/zero-range b/tests/ts/fallocate/zero-range index ecf9e924e..b685ee8ef 100755 --- a/tests/ts/fallocate/zero-range +++ b/tests/ts/fallocate/zero-range @@ -20,6 +20,7 @@ TS_DESC="zero-range" . "$TS_TOPDIR"/functions.sh ts_init "$*" ts_skip_nonroot +[ -w /proc/sys/vm/drop_caches ] || ts_skip "/proc/sys/vm/drop_caches not writable" ts_check_test_command "$TS_CMD_FALLOCATE" ts_check_test_command "$TS_CMD_FINDMNT"