]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
fadvise: (tests) sync data to disk before dropping pages
authorThomas Weißschuh <thomas@t-8ch.de>
Sun, 16 Apr 2023 08:16:53 +0000 (10:16 +0200)
committerThomas Weißschuh <thomas@t-8ch.de>
Mon, 17 Apr 2023 07:32:35 +0000 (09:32 +0200)
The test fails if pages are not dropped because they are not yet written
back to disk.
So force a writeback before continuing.

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
tests/ts/fadvise/drop

index 142fbf028b39356f33b88fcb1e1734ef368c3ad5..877d5ab6b5067175374ee14e3e5f0c47d5518370 100755 (executable)
@@ -19,7 +19,7 @@ BS=4k
 COUNT=8
 
 create_file() {
-    dd if=/dev/zero of="$FILE" bs=$BS count=$COUNT >& /dev/null
+    dd if=/dev/zero of="$FILE" bs=$BS count=$COUNT conv=fsync >& /dev/null
 }
 
 {