Skip to contentSkip to conversation

iotests: Hide timestamps for skipped tests

PATCH Applied Max Reitz 4 participants 4 messages Jun 13, 2019 – Jun 14, 2019

lore
Share & tools
lore

Max Reitz

author
#0 lore raw

PATCH 1/1 iotests: Hide timestamps for skipped tests

Currently, the "thistime" variable is not reinitialized on every loop iteration. This leads to tests that do not yield a run time (because they failed or were skipped) printing the run time of the previous test that did. Fix that by reinitializing "thistime" for every test.

---
 tests/qemu-iotests/check | 1 +
 1 file changed, 1 insertion(+)
tests/qemu-iotests/check +1 -0
index 44ebf24080..f925606cc5 100755
@@ -773,6 +773,7 @@ do
     printdiff=false # show diff to reference output?
     status=""       # test result summary
     results=""      # test result details
+    thistime=""     # time the test took
 
     if [ -n "$TESTS_REMAINING_LOG" ] ; then
         sed -e "s/$seq//" -e 's/  / /' -e 's/^ *//' $TESTS_REMAINING_LOG > $TESTS_REMAINING_LOG.tmp
Signature · 1 line
2.21.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 9 lines · Max Reitz

Currently, the "thistime" variable is not reinitialized on every loop iteration. This leads to tests that do not yield a run time (because they failed or were skipped) printing the run time of the previous test that did. Fix that by reinitializing "thistime" for every test.

---
 tests/qemu-iotests/check | 1 +
 1 file changed, 1 insertion(+)
Quoted 14 lines
tests/qemu-iotests/check +1 -0
index 44ebf24080..f925606cc5 100755
@@ -773,6 +773,7 @@ do
     printdiff=false # show diff to reference output?
     status=""       # test result summary
     results=""      # test result details
+    thistime=""     # time the test took
 
     if [ -n "$TESTS_REMAINING_LOG" ] ; then
         sed -e "s/$seq//" -e 's/  / /' -e 's/^ *//' $TESTS_REMAINING_LOG > $TESTS_REMAINING_LOG.tmp
Signature · 3 lines
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org
Reviewed-by on v1 1/1
#2 lore raw
In reply to Max Reitz
Quoted 16 lines · Max Reitz

Currently, the "thistime" variable is not reinitialized on every loop iteration. This leads to tests that do not yield a run time (because they failed or were skipped) printing the run time of the previous test that did. Fix that by reinitializing "thistime" for every test.

---
 tests/qemu-iotests/check | 1 +
 1 file changed, 1 insertion(+)
tests/qemu-iotests/check +0 -0
index 44ebf24080..f925606cc5 100755

tests/qemu-iotests/check do · line 779

Quoted 7 lines
tests/qemu-iotests/check +1 -0
@@ -773,6 +773,7 @@ do
     printdiff=false # show diff to reference output?
     status=""       # test result summary
     results=""      # test result details
+    thistime=""     # time the test took
 
     if [ -n "$TESTS_REMAINING_LOG" ] ; then
         sed -e "s/$seq//" -e 's/  / /' -e 's/^ *//' $TESTS_REMAINING_LOG > $TESTS_REMAINING_LOG.tmp
Applied
#3 lore raw
In reply to Max Reitz

Am 13.06.2019 um 20:37 hat Max Reitz geschrieben:

Quoted 6 lines

Currently, the "thistime" variable is not reinitialized on every loop iteration. This leads to tests that do not yield a run time (because they failed or were skipped) printing the run time of the previous test that did. Fix that by reinitializing "thistime" for every test.

Thanks, applied to the block branch.

Kevin