[Top] [All Lists]

[PATCH 3/4] xfstests: make 016 work with delaylog

To: xfs@xxxxxxxxxxx
Subject: [PATCH 3/4] xfstests: make 016 work with delaylog
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Tue, 25 Jan 2011 14:58:56 +1100
In-reply-to: <1295927937-20634-1-git-send-email-david@xxxxxxxxxxxxx>
References: <1295927937-20634-1-git-send-email-david@xxxxxxxxxxxxx>
From: Dave Chinner <dchinner@xxxxxxxxxx>

Test 016 fails with delaylog because it measures log traffic to disk
and delaylog writes almost nothing to the log for the given test. TO
make it work, add sync calls to the work loop to cause the log to be
flushed reliably for both delaylog and nodelaylog and hence contain
the same nuumber of log records.

As a result, the log space consumed by the test is not changed by
the delaylog option and the test passes. The test is not
significantly slowed down by the addition of the sync calls (takes
15s to run on a single SATA drive).

Signed-off-by: Dave Chinner <dchinner@xxxxxxxxxx>
 016 |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/016 b/016
index 980eb0b..32d8b19 100755
--- a/016
+++ b/016
@@ -101,7 +101,9 @@ _log_traffic()
     while [ $count -ge 0 ]
         touch $out
+       sync
         rm $out
+       sync
         let "count = count - 1"

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