Skip to contentSkip to conversation

generic/499: filter fsx stderr output

PATCH In review Zorro Lang 2 participants 2 messages Jul 10, 2018

lore
Share & tools
lore

Zorro Lang

author
#0 lore raw

PATCH v2 1/1 generic/499: filter fsx stderr output

On some old kernel which supports COLLAPSE_RANGE and ZERO_RANGE, but doesn't support INSERT_RANGE, this case alway fails as:

QA output created by 499
+main: filesystem does not support fallocate mode FALLOC_FL_INSERT_RANGE, disabling!
Silence is golden

fsx print one more line to break the golden image.

To fix this issue, redirect both fsx stdout and stderr to a file, then check the return value.

---

Hi,

V1 as below (thanks Lukas):
https://marc.info/?l=fstests&m=153122545923371&w=2

V2 use "2>&1" to instead of "-I".

Thanks,
Zorro

 tests/generic/499 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tests/generic/499 +1 -1
index 99d6d308..773eab2e 100755
@@ -50,7 +50,7 @@ ENDL
 
 victim=$SCRATCH_MNT/a
 touch $victim
-$here/ltp/fsx --replay-ops $tmp.fsxops $victim > $tmp.output || cat $tmp.output
+$here/ltp/fsx --replay-ops $tmp.fsxops $victim > $tmp.output 2>&1 || cat $tmp.output
 
 echo "Silence is golden"
 status=0
Signature · 1 line
2.14.4
Reviewed-by on v2 1/1
#1 lore raw
Quoted 11 lines · Zorro Lang

On some old kernel which supports COLLAPSE_RANGE and ZERO_RANGE, but doesn't support INSERT_RANGE, this case alway fails as:

QA output created by 499
+main: filesystem does not support fallocate mode FALLOC_FL_INSERT_RANGE, disabling!
Silence is golden

fsx print one more line to break the golden image.

To fix this issue, redirect both fsx stdout and stderr to a file, then check the return value.

Looks good, thanks.

Quoted 37 lines

---

Hi,

V1 as below (thanks Lukas):
https://marc.info/?l=fstests&m=153122545923371&w=2

V2 use "2>&1" to instead of "-I".

Thanks,
Zorro

 tests/generic/499 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tests/generic/499 +1 -1
index 99d6d308..773eab2e 100755
@@ -50,7 +50,7 @@ ENDL
 
 victim=$SCRATCH_MNT/a
 touch $victim
-$here/ltp/fsx --replay-ops $tmp.fsxops $victim > $tmp.output || cat $tmp.output
+$here/ltp/fsx --replay-ops $tmp.fsxops $victim > $tmp.output 2>&1 || cat $tmp.output
 
 echo "Silence is golden"
 status=0
Signature · 6 lines
2.14.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