make test work for variable blocksizes.
authorfsgqa <fsgqa>
Fri, 10 May 2002 02:33:23 +0000 (02:33 +0000)
committerfsgqa <fsgqa>
Fri, 10 May 2002 02:33:23 +0000 (02:33 +0000)
021
021.out

diff --git a/021 b/021
index 657e3c08422adbd5166e0f6ae0c9740ed7ba7867..ebe6d3952aa094daf4209ecd17bdf5588d360b9c 100755 (executable)
--- a/021
+++ b/021
@@ -80,6 +80,11 @@ _getfattr()
     return $exit
 }
 
+_filter_xfsdb2()
+{
+       sed -e 
+}
+
 # real QA test starts here
 _require_scratch
 
@@ -108,7 +113,7 @@ echo "*** make test file 2"
 touch $testfile.2
 echo "value_1" | _attr -s "a1" $testfile.2 >/dev/null
 echo "value_2" | _attr -s "a2-----" $testfile.2 >/dev/null
-(echo start ; dd if=/dev/zero bs=65525 count=1 ; echo end ) \
+( echo start ; dd if=/dev/zero bs=65525 count=1 ; echo end ) \
     | _attr -s "a3" $testfile.2 >/dev/null
 _getfattr --absolute-names $testfile.2
 
@@ -133,7 +138,12 @@ xfs_db -r -c "inode $inum_1" -c "print a.sfattr" $SCRATCH_DEV
 
 echo "*** dump attributes (2)"
 
-xfs_db -r -c "inode $inum_2" -c "a a.bmx[0].startblock" -c "print" $SCRATCH_DEV
-    
+xfs_db -r -c "inode $inum_2" -c "a a.bmx[0].startblock" -c print $SCRATCH_DEV \
+    | perl -ne '
+s/^(hdr.firstused =) (\d+)/\1 FIRSTUSED/;
+s/^(hdr.freemap\[0-2] = \[base,size]).*/\1 [FREEMAP..]/;
+s/^(entries\[0-2] = \[hashval,nameidx,incomplete,root,local]).*/\1 [ENTRIES..]/;
+    print;'
+
 echo "*** done"
 exit
diff --git a/021.out b/021.out
index 8a871c168442213c7e51711fc7025bbf918d80d9..9872418e929217bf1c9360debe5c37519dfd7678 100644 (file)
--- a/021.out
+++ b/021.out
@@ -37,10 +37,10 @@ hdr.info.back = 0
 hdr.info.magic = 0xfbee
 hdr.count = 3
 hdr.usedbytes = 52
-hdr.firstused = 4044
+hdr.firstused = FIRSTUSED
 hdr.holes = 0
-hdr.freemap[0-2] = [base,size] 0:[56,3988] 1:[0,0] 2:[0,0]
-entries[0-2] = [hashval,nameidx,incomplete,root,local] 0:[0x30b1,4080,0,0,1] 1:[0x30b3,4044,0,0,0] 2:[0xd5aad33f,4060,0,0,1]
+hdr.freemap[0-2] = [base,size] [FREEMAP..]
+entries[0-2] = [hashval,nameidx,incomplete,root,local] [ENTRIES..]
 nvlist[0].valuelen = 8
 nvlist[0].namelen = 2
 nvlist[0].name = "a1"