From 93eaabde61cf048660a01dc2b5f55c061fd73e6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20Benn=C3=A9e?= Date: Tue, 5 Jan 2021 12:44:05 +0000 Subject: [PATCH] tests/acceptance: bound the size of readline in s390_ccw_virtio MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Daniel P. Berrangé Reviewed-by: Willian Rampazzo Acked-by: Halil Pasic Acked-by: Thomas Huth Message-Id: <20210105124405.15424-1-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..eccf26b262 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(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