xfs/021: filter out detailed array element info from xfs_db
authorEryu Guan <eguan@redhat.com>
Fri, 4 Nov 2016 16:16:10 +0000 (00:16 +0800)
committerEryu Guan <eguan@redhat.com>
Sun, 13 Nov 2016 06:01:07 +0000 (14:01 +0800)
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,

Reviewed-by: Zorro Lang <zlang@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
tests/xfs/021

index 67a4346bbff12f2db7e3978a54821a9709e6ce16..0471b9539af7c72d6613916a055407b9cb2503ed 100755 (executable)
@@ -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