Skip to contentSkip to conversation

qemu-iotests: Use -nographic in 182

PATCH In review Kevin Wolf 3 participants 5 messages Oct 29, 2017 – Oct 30, 2017

lore
Share & tools
lore

Kevin Wolf

author
#0 lore raw

PATCH 1/1 qemu-iotests: Use -nographic in 182

This avoids that random UI frontend error messages end up in the output. In particular, we were seeing this line in CI error logs:

+Unable to init server: Could not connect: Connection refused

---
 tests/qemu-iotests/182 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tests/qemu-iotests/182 +1 -1
index 2e078ceed8..4b31592fb8 100755
@@ -62,7 +62,7 @@ _launch_qemu -drive file=$TEST_IMG,if=none,id=drive0,file.locking=on \
 
 echo
 echo "Starting a second QEMU using the same image should fail"
-echo 'quit' | $QEMU -monitor stdio \
+echo 'quit' | $QEMU -nographic -monitor stdio \
     -drive file=$TEST_IMG,if=none,id=drive0,file.locking=on \
     -device $virtioblk,drive=drive0 2>&1 | _filter_testdir 2>&1 |
     _filter_qemu |
Signature · 1 line
2.13.6
Reviewed-by on v1 1/1
#1 lore raw
Quoted 15 lines · Kevin Wolf

This avoids that random UI frontend error messages end up in the output. In particular, we were seeing this line in CI error logs:

+Unable to init server: Could not connect: Connection refused

---
 tests/qemu-iotests/182 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tests/qemu-iotests/182 +0 -0
index 2e078ceed8..4b31592fb8 100755

tests/qemu-iotests/182 _launch_qemu -drive file=$TEST_IMG,if=none,id=drive0,file.locking=on \ · line 65

Quoted 5 lines
tests/qemu-iotests/182 +1 -1
@@ -62,7 +62,7 @@ _launch_qemu -drive file=$TEST_IMG,if=none,id=drive0,file.locking=on \
 
 echo
 echo "Starting a second QEMU using the same image should fail"
-echo 'quit' | $QEMU -monitor stdio \
+echo 'quit' | $QEMU -nographic -monitor stdio \

Isn't "-display none" preferred instead of "-nographic"?

Assuming you'll change it to "-display none":

[...]

Signature · 1 line
/kashyap
author
#2 lore raw

Am 30.10.2017 um 09:39 hat Kashyap Chamarthy geschrieben:

Quoted 24 lines · Kevin Wolf
Quoted 15 lines

This avoids that random UI frontend error messages end up in the output. In particular, we were seeing this line in CI error logs:

+Unable to init server: Could not connect: Connection refused

---
 tests/qemu-iotests/182 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tests/qemu-iotests/182 +0 -0
index 2e078ceed8..4b31592fb8 100755

tests/qemu-iotests/182 _launch_qemu -drive file=$TEST_IMG,if=none,id=drive0,file.locking=on \ · line 65

Quoted 5 lines
tests/qemu-iotests/182 +1 -1
@@ -62,7 +62,7 @@ _launch_qemu -drive file=$TEST_IMG,if=none,id=drive0,file.locking=on \
 
 echo
 echo "Starting a second QEMU using the same image should fail"
-echo 'quit' | $QEMU -monitor stdio \
+echo 'quit' | $QEMU -nographic -monitor stdio \

Isn't "-display none" preferred instead of "-nographic"?

Quoted 3 lines

Assuming you'll change it to "-display none":

It's not the same thing, -nographic does more than just that, like redirecting the serial port to stdio. In this specific case, -display none should actually be enough, but for consistency I just did the same thing as other qemu-iotest cases are doing.

Kevin

Reviewed-by
#3 lore raw
Quoted 2 lines · Kevin Wolf

Am 30.10.2017 um 09:39 hat Kashyap Chamarthy geschrieben:

Quoted 1 line · Kevin Wolf

[...]

Quoted 6 lines
Quoted 6 lines

tests/qemu-iotests/182 _launch_qemu -drive file=$TEST_IMG,if=none,id=drive0,file.locking=on \ · line 65

Quoted 4 lines

echo
echo "Starting a second QEMU using the same image should fail"

tests/qemu-iotests/182 +1 -1
-echo 'quit' | $QEMU -monitor stdio \
+echo 'quit' | $QEMU -nographic -monitor stdio \

Isn't "-display none" preferred instead of "-nographic"?

[...]

Quoted 2 lines

It's not the same thing, -nographic does more than just that, like redirecting the serial port to stdio.

True, because in this test case the monitor is being sent explicitly to 'stdio'. To your point, I now vaguely recall Paolo saying on IRC that '-nographic' is a shorthand for:

'-serial mon:stdio -machine graphics=off -display none'

Quoted 3 lines

In this specific case, -display
none should actually be enough, but for consistency I just did the same thing as other qemu-iotest cases are doing.

Ah, okay. At any rate:

Signature · 1 line
/kashyap
Reviewed-by on v1 1/1
#4 lore raw
In reply to Kevin Wolf
Quoted 27 lines · Kevin Wolf

This avoids that random UI frontend error messages end up in the output. In particular, we were seeing this line in CI error logs:

+Unable to init server: Could not connect: Connection refused

---
 tests/qemu-iotests/182 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tests/qemu-iotests/182 +1 -1
index 2e078ceed8..4b31592fb8 100755
@@ -62,7 +62,7 @@ _launch_qemu -drive file=$TEST_IMG,if=none,id=drive0,file.locking=on \
 
 echo
 echo "Starting a second QEMU using the same image should fail"
-echo 'quit' | $QEMU -monitor stdio \
+echo 'quit' | $QEMU -nographic -monitor stdio \
     -drive file=$TEST_IMG,if=none,id=drive0,file.locking=on \
     -device $virtioblk,drive=drive0 2>&1 | _filter_testdir 2>&1 |
     _filter_qemu |
Signature · 1 line
2.13.6