xfs
[Top] [All Lists]

xfstests: what's the difference between generic/043 and generic/044

To: "xfs" <xfs@xxxxxxxxxxx>
Subject: xfstests: what's the difference between generic/043 and generic/044
From: "Wang Sheng-Hui" <shhuiw@xxxxxxxxxxx>
Date: Mon, 4 May 2015 09:49:20 +0800
Delivered-to: xfs@xxxxxxxxxxx
Hi,

I'm reading the source code of generic/044 in xfstests, and I cannot figure out 
the
difference compared with 043 testcase:
-------------------------------------------------------------------------------
$ diff -Nu 043 044
--- 043 2015-03-09 10:03:48.013887582 +0800
+++ 044 2015-03-09 10:03:48.013887582 +0800
@@ -1,5 +1,5 @@
 #! /bin/bash
-# FSQA Test No. 043
+# FSQA Test No. 044
 #
 # Test for NULL files problem
 #
@@ -56,6 +56,12 @@
                echo error creating/writing file $file
                exit
        fi
+       xfs_io -c "truncate 64k" $file &gt; /dev/null
+       if [ $? -ne 0 ]
+       then
+               echo error truncating file $file
+               exit
+       fi
        let i=$i+1
 done


But before the 'truncate 64K', only 64K sized files are created:
                 xfs_io -f -c "pwrite -b 64k -S 0xff 0 64k" $file &gt; /dev/null
So I think it's useless here, or some typo e.g smaller truncate needed?


Regards,
Wang Sheng-Hui
<Prev in Thread] Current Thread [Next in Thread>