Skip to contentSkip to conversation

xfs/021: filter out detailed array element info from xfs_db

PATCH In review Eryu Guan 3 participants 3 messages Nov 10, 2016 – Nov 13, 2016

lore
Share & tools
lore

Eryu Guan

author
#0 lore raw

PATCH v2 1/1 xfs/021: filter out detailed array element info from xfs_db

Starting from xfsprogs commit 384283555871 ("xfs_db: print one array element per line"), xfs_db prints one array element per line. This breaks the filter in xfs/021, which now fails as:

hdr.freemap[0-2] = [base,size] [FREEMAP..]
+0:[104,1892]
+1:[0,0]
+2:[0,0]
entries[0-2] = [hashval,nameidx,incomplete,root,local] [ENTRIES..]

So we have extra lines that need to be filtered out,

---
- be more precise on matching the array output, address Zorro's comment

 tests/xfs/021 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tests/xfs/021 +1 -1
index 67a4346..0471b95 100755
@@ -151,7 +151,7 @@ s/^(hdr.info.magic =) 0x3bee/\1 0xfbee/;
 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;'
+	print unless /^\d+:\[.*/;'
 
 echo "*** done"
 exit
Signature · 1 line
2.7.4
Reviewed-by on v2 1/1
#1 lore raw
Quoted 10 lines · Eryu Guan

Starting from xfsprogs commit 384283555871 ("xfs_db: print one array element per line"), xfs_db prints one array element per line. This breaks the filter in xfs/021, which now fails as:

hdr.freemap[0-2] = [base,size] [FREEMAP..]
+0:[104,1892]
+1:[0,0]
+2:[0,0]
entries[0-2] = [hashval,nameidx,incomplete,root,local] [ENTRIES..]

Quoted 4 lines

So we have extra lines that need to be filtered out,

---

V2 looks better to me,

Quoted 25 lines

- be more precise on matching the array output, address Zorro's comment

 tests/xfs/021 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tests/xfs/021 +1 -1
index 67a4346..0471b95 100755
@@ -151,7 +151,7 @@ s/^(hdr.info.magic =) 0x3bee/\1 0xfbee/;
 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;'
+	print unless /^\d+:\[.*/;'
 
 echo "*** done"
 exit
Signature · 6 lines
2.7.4

--
To unsubscribe from this list: send the line "unsubscribe fstests" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html