xfs
[Top] [All Lists]

[PATCH] xfstests 068: Add mmap load

To: xfs-oss <xfs@xxxxxxxxxxx>
Subject: [PATCH] xfstests 068: Add mmap load
From: Eric Sandeen <sandeen@xxxxxxxxxx>
Date: Thu, 27 Sep 2012 22:33:45 -0500
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:15.0) Gecko/20120907 Thunderbird/15.0.1
Test 068 is the go-to test for freeze deadlock coverage;
unfortunately it only uses fsstress, which doesn't do any mmap
IO.

Using the existing fstest binary gets us a cheap mmap exerciser
as well.

Signed-off-by: Eric Sandeen <sandeen@xxxxxxxxxx>
---

I think it's fair to modify this test vs. making a new one -
it's never passed yet, and will only start passing in kernel 3.6,
so it shouldn't cause new test regressions to add mmap ops.

And I can verify that this finds mmap bugs; I had a backport
which messed up ext4's freeze vs. mmap handling, and this exposes
it.  :)


diff --git a/068 b/068
index 617420c..a0bf425 100755
--- a/068
+++ b/068
@@ -90,6 +90,21 @@ touch $tmp.running
     rmdir $STRESS_DIR
 } &
 
+# start fstest -m loop in a background block; this gets us mmap coverage
+{
+    FSTEST_DIR="$SCRATCH_MNT/fstest_test_dir"
+    mkdir "$FSTEST_DIR"
+
+    procs=2
+    while [ -f "$tmp.running" ]
+      do
+      src/fstest -m -p $FSTEST_DIR  -n $procs -f 4 > /dev/null 2>&1
+    done
+
+    rm -rf $FSTEST_DIR/*
+    rmdir $FSTEST_DIR
+} &
+
 i=0
 let ITERATIONS=$ITERATIONS-1
 

<Prev in Thread] Current Thread [Next in Thread>