ltp/fsx: drop caches if we're doing closeopen
[xfstests-dev.git] / ltp / fsx.c
index c74b13c27b841b88b601def02fce020a5029d8b3..120f4374c95b403d7cce60a761c6334ace85d6f1 100644 (file)
--- a/ltp/fsx.c
+++ b/ltp/fsx.c
@@ -1778,10 +1778,14 @@ docloseopen(void)
                prterr("docloseopen: close");
                report_failure(180);
        }
+       if (system("echo 3 > /proc/sys/vm/drop_caches")) {
+               prterr("docloseopen: drop_caches");
+               report_failure(181);
+       }
        fd = open(fname, O_RDWR|o_direct, 0);
        if (fd < 0) {
                prterr("docloseopen: open");
-               report_failure(181);
+               report_failure(182);
        }
 }