discard rbd error output when not relevant in qemu-iotests
PATCH 1/1 discard rbd error output when not relevant in qemu-iotests
Stash the rbd stderr and stdout because it also contains human readable progress messages : Removing image: 3% complete... in addition to potential error messages.
Display the stashed output if rbd exits on error.
--- tests/qemu-iotests/common.rc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
tests/qemu-iotests/common.rc +5 -1
@@ -189,7 +189,11 @@ _cleanup_test_img() ;; rbd) - rbd rm "$TEST_DIR/t.$IMGFMT" > /dev/null + if ! rbd rm "$TEST_DIR/t.$IMGFMT" > $TEST_DIR/rbd.out 2>&1 + then + cat $TEST_DIR/rbd.out + fi + rm $TEST_DIR/rbd.out ;; sheepdog)
Signature · 1 line
1.8.3.2
Quoted 18 lines · Loic Dachary
Stash the rbd stderr and stdout because it also contains human readable progress messages : Removing image: 3% complete... in addition to potential error messages.
Display the stashed output if rbd exits on error.
Signed-off-by Loic Dachary <[email protected]>--- tests/qemu-iotests/common.rc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)tests/qemu-iotests/common.rc +0
-0@@ -189,7 +189,11 @@ _cleanup_test_img() ;;
tests/qemu-iotests/common.rc _cleanup_test_img() · line 199
Quoted 10 lines
tests/qemu-iotests/common.rc +5
-1rbd) - rbd rm "$TEST_DIR/t.$IMGFMT" > /dev/null + if ! rbd rm "$TEST_DIR/t.$IMGFMT" > $TEST_DIR/rbd.out 2>&1 + then + cat $TEST_DIR/rbd.out + fi + rm $TEST_DIR/rbd.out ;; sheepdog)
Hi Loïc,
Maybe you could filter by modifying _filter_qemu_io.
Best regards
Benoît
Quoted 4 lines
Signature · 1 line
1.8.3.2
Hi Benoît,
If I understand correctly common.filter is designed to transform the output and remove variance. In the case of rbd displaying the progress of removal, it is something we probably want to get rid of entirely. Please let me know if I'm missing something and I'll update the patch according to your suggestion.
Cheers
Quoted 44 lines · Benoît Canet
Quoted 18 lines · Loic Dachary
Stash the rbd stderr and stdout because it also contains human readable progress messages : Removing image: 3% complete... in addition to potential error messages.
Display the stashed output if rbd exits on error.
Signed-off-by Loic Dachary <[email protected]>--- tests/qemu-iotests/common.rc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)tests/qemu-iotests/common.rc +0
-0@@ -189,7 +189,11 @@ _cleanup_test_img() ;;tests/qemu-iotests/common.rc _cleanup_test_img() · line 199
Quoted 10 lines
tests/qemu-iotests/common.rc +5
-1rbd) - rbd rm "$TEST_DIR/t.$IMGFMT" > /dev/null + if ! rbd rm "$TEST_DIR/t.$IMGFMT" > $TEST_DIR/rbd.out 2>&1 + then + cat $TEST_DIR/rbd.out + fi + rm $TEST_DIR/rbd.out ;; sheepdog)Hi Loïc,
Maybe you could filter by modifying
_filter_qemu_io.Best regards
Benoît
Quoted 4 lines
Signature · 1 line
1.8.3.2
Signature · 1 line
Loïc Dachary, Artisan Logiciel Libre
tests/qemu-iotests/common.rc _cleanup_test_img() · line 192
Quoted 9 lines · Loic Dachary
tests/qemu-iotests/common.rc +0
-1@@ -189,7 +189,11 @@ _cleanup_test_img() ;; rbd) - rbd rm "$TEST_DIR/t.$IMGFMT" > /dev/null
stderr will be displayed. Why isn't this enough?
Quoted 8 lines · Stefan Hajnoczi
Quoted 7 lines · Loic Dachary
tests/qemu-iotests/common.rc +0
-0@@ -189,7 +189,11 @@ _cleanup_test_img() ;;
Quoted 5 lines
tests/qemu-iotests/common.rc _cleanup_test_img() · line 192
Quoted 2 lines
tests/qemu-iotests/common.rc +0
-1rbd) - rbd rm "$TEST_DIR/t.$IMGFMT" > /dev/nullstderr will be displayed. Why isn't this enough?
Because the progress of the removal operation will be displayed on stderr. rbd outputs on stderr even when there is no error.
Happy new year !
Signature · 1 line
Loïc Dachary, Artisan Logiciel Libre
Quoted 11 lines · Loic Dachary
Quoted 8 lines · Stefan Hajnoczi
Quoted 7 lines · Loic Dachary
tests/qemu-iotests/common.rc +0
-0@@ -189,7 +189,11 @@ _cleanup_test_img() ;;
Quoted 7 lines
Quoted 5 lines
tests/qemu-iotests/common.rc _cleanup_test_img() · line 192
Quoted 2 lines
tests/qemu-iotests/common.rc +0
-1rbd) - rbd rm "$TEST_DIR/t.$IMGFMT" > /dev/nullstderr will be displayed. Why isn't this enough?
Because the progress of the removal operation will be displayed on stderr. rbd outputs on stderr even when there is no error.
Is that a bug in the rbd tool which should be fixed? Either by printing progress to stdout or by adding a --quiet option?
Quoted 18 lines · Stefan Hajnoczi
Quoted 17 lines · Loic Dachary
Quoted 13 lines · Stefan Hajnoczi
tests/qemu-iotests/common.rc _cleanup_test_img() · line 192
Quoted 9 lines · Loic Dachary
tests/qemu-iotests/common.rc +0
-1@@ -189,7 +189,11 @@ _cleanup_test_img() ;; rbd) - rbd rm "$TEST_DIR/t.$IMGFMT" > /dev/nullstderr will be displayed. Why isn't this enough?
Quoted 4 lines
Quoted 1 line
Because the progress of the removal operation will be displayed on stderr. rbd outputs on stderr even when there is no error.
Is that a bug in the rbd tool which should be fixed? Either by printing progress to stdout or by adding a --quiet option?
In my opinion, yes. But Josh may disagree ;-)
Signature · 1 line
Loïc Dachary, Artisan Logiciel Libre
PATCH v2 1/1 discard rbd error output when not relevant in qemu-iotests
In reply to Loic DacharySuppress rbd progress messages with --no-progress so they are not confused with an error output when comparing test results ( progress is displayed on stderr ).
--- tests/qemu-iotests/common.rc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tests/qemu-iotests/common.rc +1 -1
@@ -189,7 +189,7 @@ _cleanup_test_img() ;; rbd) - rbd rm "$TEST_DIR/t.$IMGFMT" > /dev/null + rbd --no-progress rm "$TEST_DIR/t.$IMGFMT" > /dev/null ;; sheepdog)
Signature · 1 line
1.8.3.2
Quoted 15 lines · Loic Dachary
Suppress rbd progress messages with --no-progress so they are not confused with an error output when comparing test results ( progress is displayed on stderr ).
Signed-off-by Loic Dachary <[email protected]>--- tests/qemu-iotests/common.rc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)tests/qemu-iotests/common.rc +0
-0
tests/qemu-iotests/common.rc _cleanup_test_img() · line 195
Quoted 8 lines
tests/qemu-iotests/common.rc +1
-1@@ -189,7 +189,7 @@ _cleanup_test_img() ;; rbd) - rbd rm "$TEST_DIR/t.$IMGFMT" > /dev/null + rbd --no-progress rm "$TEST_DIR/t.$IMGFMT" > /dev/null ;; sheepdog)
This flag was added in ceph 0.61. I doubt anyone is interested in running these tests against earlier versions of ceph (the current stable releases are 0.67 and 0.72).
Quoted 8 lines · Loic Dachary
Suppress rbd progress messages with --no-progress so they are not confused with an error output when comparing test results ( progress is displayed on stderr ).
Signed-off-by Loic Dachary <[email protected]>--- tests/qemu-iotests/common.rc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Thanks!
Quoted 5 lines · Stefan Hajnoczi
Quoted 4 lines · Loic Dachary
Suppress rbd progress messages with --no-progress so they are not confused with an error output when comparing test results ( progress is displayed on stderr ).
Quoted 9 lines
Quoted 4 lines
Signed-off-by Loic Dachary <[email protected]>--- tests/qemu-iotests/common.rc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)Thanks!
Reviewed-by Stefan Hajnoczi <[email protected]>
Should this be merged before 2.0 ?
Best regards
Benoît
Stefan Hajnoczi
AppliedQuoted 8 lines · Loic Dachary
Suppress rbd progress messages with --no-progress so they are not confused with an error output when comparing test results ( progress is displayed on stderr ).
Signed-off-by Loic Dachary <[email protected]>--- tests/qemu-iotests/common.rc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Thanks, applied to my block tree:
https://github.com/stefanha/qemu/commits/block
Stefan