xfs
[Top] [All Lists]

[PATCH 4/4] xfstests: handle filesystems without FIEMAP support

To: xfs@xxxxxxxxxxx
Subject: [PATCH 4/4] xfstests: handle filesystems without FIEMAP support
From: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Date: Fri, 15 Oct 2010 18:29:24 -0400
In-reply-to: <20101015222820.GA3655@xxxxxxxxxxxxx>
References: <20101015222820.GA3655@xxxxxxxxxxxxx>
User-agent: Mutt/1.5.20 (2009-08-17)
Do a _notrun in 225 if we get EOPNOSUPP back from FIEMAP instead
of failing the test.

Signed-off-by: Christoph Hellwig <hch@xxxxxx>

--- a/225
+++ b/225
@@ -49,13 +49,19 @@ _supported_os Linux
 _setup_testdir
 
 fiemapfile=$TEST_DIR/fiemap.$$
+fiemaplog=$TEST_DIR/fiemap.$$.log
 
 [ -x $here/src/fiemap-tester ] || _notrun "fiemap-tester not built"
 
 echo "fiemap run without preallocation"
-$here/src/fiemap-tester -q -p 0 -r 200 $TEST_DIR/fiemapfile
+$here/src/fiemap-tester -q -p 0 -r 200 $TEST_DIR/fiemapfile 2>&1 | tee 
$fiemaplog
+
+if grep -q "Operation not supported" $fiemaplog; then
+      _notrun "FIEMAP not supported by this filesystem type: $FSTYP"
+fi
 
 rm -f $fiemapfile
+rm -f $fiemaplog
 rm -f $seq.full
 
 status=0

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