From f5ab1de2b40c14d30832b161f275466efa3c8013 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Thomas=20Wei=C3=9Fschuh?= Date: Mon, 17 Apr 2023 05:21:47 +0200 Subject: [PATCH] fadvise: (tests) skip test on tmpfs MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit On tmpfs files are always in RAM, which is reflected in mincore(). Signed-off-by: Thomas Weißschuh --- tests/ts/fadvise/drop | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/ts/fadvise/drop b/tests/ts/fadvise/drop index 877d5ab6b5..7c7eee5dc2 100755 --- a/tests/ts/fadvise/drop +++ b/tests/ts/fadvise/drop @@ -8,6 +8,7 @@ ts_init "$*" ts_check_test_command "$TS_CMD_FADVISE" ts_check_test_command "$TS_CMD_FINCORE" +ts_check_test_command "$TS_CMD_FINDMNT" ts_check_prog "dd" ts_check_prog "sleep" @@ -18,6 +19,11 @@ FILE="ddtest" BS=4k 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" +fi + create_file() { dd if=/dev/zero of="$FILE" bs=$BS count=$COUNT conv=fsync >& /dev/null } -- 2.47.2