From patchwork Tue Jan 5 12:44:05 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 11998797 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-21.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2FEC1C433E0 for ; Tue, 5 Jan 2021 12:46:03 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 858EB229C5 for ; Tue, 5 Jan 2021 12:46:02 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 858EB229C5 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:41678 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kwlir-0005Zr-0L for qemu-devel@archiver.kernel.org; Tue, 05 Jan 2021 07:46:01 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:54754) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kwlhM-0004r7-JG for qemu-devel@nongnu.org; Tue, 05 Jan 2021 07:44:28 -0500 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]:39905) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kwlhJ-0001j4-LM for qemu-devel@nongnu.org; Tue, 05 Jan 2021 07:44:28 -0500 Received: by mail-wr1-x434.google.com with SMTP id c5so36034731wrp.6 for ; Tue, 05 Jan 2021 04:44:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=zWEWFFc4X2fxBvBqJacNlo3Q5pteGX6BPRwZ/IL4MaQ=; b=VwW3zjExyAPVHda5XMQ0Yxx/bDWrBADy8CPuVaw/iQOIfq1jlJUJ2tDedxnwzxneGb QcrfuEdjC/0bDjabZ521RaINvV2Xob0+9kmdrt7kisip3UL/ZjhUfN3FUkT7LywOjb+Z GVn+IwbdJ+Zh/WqNq40mcBMGsnxuqfJfPyCqSeQZPsPK2wBlxe0Xm+ULDGXwMEY6d6dL R4d/9XwpKt1ZgSBibhVYKhR7nW+9tGi06utYfCP4SLaFIC0Rk/arnsrgXLPvycQ1g6v4 rPW0aAr8ZTeNQxm1Rdn5dmMRbw/ky2pPMeB5INWLKqgxlymEkUcWNz0iEu/2Yp5z1eZq vWnw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=zWEWFFc4X2fxBvBqJacNlo3Q5pteGX6BPRwZ/IL4MaQ=; b=LnNowckS1wclUdcDhBCENmzdmkV6YKCHU73WQqE6YmYOhcRxfPfLpBlr/cmqfF7I8Y bOYz1IUJMI9b9O/P6e641RXqOZi7sev1rXOGsksoR9X15UwWfAwhk5ktYsnhPEO1gESA F9h/TKLPxm1Vak4wgAmHudARqku8YGtb649o0ZeDUlx+V9xdRuKbwwTvDB33/P/wI56l wLLeG3lmwdPYeG8KwiAYpPO/6IGb7dc7idNf1xOI6uV3h2bA19xqcnftXb0vbW8KHRz7 T9ZpoUs1ViH8sW9zT+HtnfGrkUcte9+oXGKMYo2bUuQe1vWCZQjQFD9T8SqYBAOk7qys wzDg== X-Gm-Message-State: AOAM530o9yD5pU2MQ2P2uREh/h3sRhPsiXxFtz0FymPtbP+Fq45vIgs2 hqpbHq/KCXm6w2Jn9laD7jbGHw== X-Google-Smtp-Source: ABdhPJwr+l2qC3kY2CpjViY4CVAdAyan1e8toUi0F1Mx+8LpWqOsftLs3EoGd3fcz9p2os0ihrA5dg== X-Received: by 2002:adf:ea04:: with SMTP id q4mr64763736wrm.195.1609850663938; Tue, 05 Jan 2021 04:44:23 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id k10sm90724725wrq.38.2021.01.05.04.44.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Jan 2021 04:44:22 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id F06541FF7E; Tue, 5 Jan 2021 12:44:21 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH] tests/acceptance: bound the size of readline in s390_ccw_virtio Date: Tue, 5 Jan 2021 12:44:05 +0000 Message-Id: <20210105124405.15424-1-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::434; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x434.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: thuth@redhat.com, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Cornelia Huck , Wainer dos Santos Moschetta , Halil Pasic , Christian Borntraeger , "open list:S390 Virtio-ccw" , Cleber Rosa , =?utf-8?q?Alex_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" 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 --- 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