qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] tests/acceptance: bound the size of readline in s390_ccw_virtio
@ 2021-01-05 12:44 Alex Bennée
  2021-01-05 12:47 ` Daniel P. Berrangé
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Alex Bennée @ 2021-01-05 12:44 UTC (permalink / raw)
  To: qemu-devel
  Cc: thuth, Philippe Mathieu-Daudé, Cornelia Huck,
	Wainer dos Santos Moschetta, Halil Pasic, Christian Borntraeger,
	open list:S390 Virtio-ccw, Cleber Rosa, Alex Bennée

The read binary data as text via a PPM export of the frame buffer
seems a bit sketchy and it did blow up in the real world when the
assertion failed:

  https://gitlab.com/qemu-project/qemu/-/jobs/943183183

However short of cleaning up the test to be more binary focused at
least limit the attempt to dump the whole file as hexified zeros in
the logs.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 tests/acceptance/machine_s390_ccw_virtio.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/acceptance/machine_s390_ccw_virtio.py b/tests/acceptance/machine_s390_ccw_virtio.py
index 0f81af9950..5141d6abb2 100644
--- a/tests/acceptance/machine_s390_ccw_virtio.py
+++ b/tests/acceptance/machine_s390_ccw_virtio.py
@@ -241,7 +241,7 @@ class S390CCWVirtioMachine(Test):
             self.assertEqual(line, b"1024 768\n")
             line = ppmfile.readline()
             self.assertEqual(line, b"255\n")
-            line = ppmfile.readline()
+            line = ppmfile.readline(size=256)
             self.assertEqual(line, b"The quick fox jumps over a lazy dog\n")
 
         # Hot-plug a virtio-crypto device and see whether it gets accepted
-- 
2.20.1



^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-01-06 12:13 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-01-05 12:44 [PATCH] tests/acceptance: bound the size of readline in s390_ccw_virtio Alex Bennée
2021-01-05 12:47 ` Daniel P. Berrangé
2021-01-05 13:52 ` Willian Rampazzo
2021-01-05 15:06 ` Halil Pasic
2021-01-06 12:11 ` Thomas Huth

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).