Skip to contentSkip to conversation

xfsqa 166 failure

DISCUSSION Christoph Hellwig 2 participants 3 messages May 1, 2008 – May 2, 2008

lore
Share & tools
lore
#0 lore raw

Looks like the awk on my system (mawk-1.3.3-11 from Debian unstable) doesn't like the regex used in there. I guess it's some kind of GNU awk extension:

166 [ 2583.856446] XFS mounting filesystem hdd

[ 2583.871549] Ending clean XFS mount for filesystem: hdd
 - output mismatch (see 166.out.bad)

2,6c2,3
< 0: [AA..BB] XX..YY AG (AA..BB) RIGHT GOOD
< 1: [AA..BB] XX..YY AG (AA..BB) RIGHT GOOD
< 2: [AA..BB] XX..YY AG (AA..BB) RIGHT GOOD
< 3: [AA..BB] XX..YY AG (AA..BB) RIGHT GOOD
< 4: [AA..BB] XX..YY AG (AA..BB) RIGHT GOOD
---

Quoted 1 line

awk: line 9: regular expression compile failed (missing operand)

* is the extent unwritten? *

#1 lore raw
Quoted 14 lines · Christoph Hellwig

Looks like the awk on my system (mawk-1.3.3-11 from Debian unstable) doesn't like the regex used in there. I guess it's some kind of GNU awk extension:

166 [ 2583.856446] XFS mounting filesystem hdd

[ 2583.871549] Ending clean XFS mount for filesystem: hdd
 - output mismatch (see 166.out.bad)

2,6c2,3
< 0: [AA..BB] XX..YY AG (AA..BB) RIGHT GOOD
< 1: [AA..BB] XX..YY AG (AA..BB) RIGHT GOOD
< 2: [AA..BB] XX..YY AG (AA..BB) RIGHT GOOD
< 3: [AA..BB] XX..YY AG (AA..BB) RIGHT GOOD
< 4: [AA..BB] XX..YY AG (AA..BB) RIGHT GOOD
---

Quoted 2 lines
Quoted 1 line

awk: line 9: regular expression compile failed (missing operand)

* is the extent unwritten? *

gawk supports C comment syntax inside procedure blocks and doesn't interpret them as regexes. I think the standard comment syntax is supposed to be like bash - use "#". Of course, the gawk man page doesn't define comment syntax at all, but mawk does.

Does the patch below fix it?

Cheers,

Dave.

Signature · 22 lines
Dave Chinner
Principal Engineer
SGI Australian Software Group


---
 xfstests/166 |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: xfs-cmds/xfstests/166
===================================================================
--- xfs-cmds.orig/xfstests/166	2008-04-28 13:54:14.000000000 +1000
+++ xfs-cmds/xfstests/166	2008-05-02 08:39:46.746511614 +1000
@@ -40,7 +40,7 @@ _filter_blocks()
 		unwritten2 = ((1048576/512) / 2) - 2 * written_size
 	}
 
-	/* is the extent unwritten? */
+	# is the extent unwritten?
 	unwritten_ext = 0;
 	if ($7 >= 10000)
 		unwritten_ext = 1;
#2 lore raw
Quoted 6 lines · David Chinner

gawk supports C comment syntax inside procedure blocks and doesn't interpret them as regexes. I think the standard comment syntax is supposed to be like bash - use "#". Of course, the gawk man page doesn't define comment syntax at all, but mawk does.

Does the patch below fix it?

Yes, this fixes it.