From patchwork Wed Jan 6 20:26:15 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: 357585 Delivered-To: patch@linaro.org Received: by 2002:a02:85a7:0:0:0:0:0 with SMTP id d36csp1176505jai; Wed, 6 Jan 2021 12:28:48 -0800 (PST) X-Google-Smtp-Source: ABdhPJxSfvdAJ3Hs7L/C+XPk21sF74CeZZjSAn3QV1wYlWGoA+aI7GjrNt6EsGra93vZJNlXqT1a X-Received: by 2002:a25:2506:: with SMTP id l6mr9721708ybl.32.1609964928298; Wed, 06 Jan 2021 12:28:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609964928; cv=none; d=google.com; s=arc-20160816; b=YO2NaYPkANBIfQpu2p2ybrGFYaEkdtx5eUf7JoWwu7PiFD0Kt1f4iwb1h/YggPa8XV quNPRJS0i8C9IXqyczT9A00pgym5Xxk9RWBLjhMsSthbWl/WZlMid6xNgqQO0m+ZEhZY V9XmbHVQqiP3Qxolbch0YyCrFUZ4RCT/O+cUY/ib/gGzsqcBeWXTUCoGi51xjm96cC4Z YVrgPqIEri/k/6Aq1NiX/KTOkdwKCKBHcut9HdCgCYWGacVTvLysPEYCWruxJBaPCutF t9IWW1J5IbmH+ooYMtbPqX5781fulqSsLv8g38+kelZBLKD0bFAsdx/svqKdn6kiQgcQ RUuA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=cPqsftr+DIt7BqRImmpdlyWvNspWZdDTEDxYpNYOCtU=; b=NiWpvBy3JpttNv+NV5jED61AWDmvFdFDGMnEFvBqGV+5t/UTHOgfYxKUl3+ZCXT9BF e89ankJKQfrU9/Sx6vi8ZFN/h1iJTc4DWJhlpOQxVvWAHZJtu18mgqkoZLsKd0Ltufoh 0+HT1WAhu5wyoAkSHQv08WjL+yk/MHOvAeXgpp5cXAG3RdFPmqKXTs37O9CRANnFBUbN IDwR0hWmMe6CftDc+OOrVd3bFGUTu8wzUziLqtV5c7dAV2iUwute4fb3a8YJdlC3Gba/ 0I/JBPf2zXJdUyaP1TAPOfWN3wKAc0WE/amYsWTyNTveKoNwz54IY02PYNSxKyQ92Cps fDKg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=kgpZFs8P; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id p66si4186091yba.244.2021.01.06.12.28.48 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 06 Jan 2021 12:28:48 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=kgpZFs8P; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:48006 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kxFQF-0003O0-Nc for patch@linaro.org; Wed, 06 Jan 2021 15:28:47 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:47064) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kxFNx-0008Sa-Hp for qemu-devel@nongnu.org; Wed, 06 Jan 2021 15:26:25 -0500 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]:37633) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kxFNv-0005TD-Ph for qemu-devel@nongnu.org; Wed, 06 Jan 2021 15:26:25 -0500 Received: by mail-wm1-x335.google.com with SMTP id q75so3711189wme.2 for ; Wed, 06 Jan 2021 12:26:23 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=cPqsftr+DIt7BqRImmpdlyWvNspWZdDTEDxYpNYOCtU=; b=kgpZFs8PEi6fVoYAzP8YQHrQcp6bEod88/E4iPNks8N/ky2O9UalTeUQzvvAiIpgqB RSQoOC2ETdXc0pnlvyMR5VrVxdWZUNJ5kDuXfa8A6tlK/w+7zg+t8mblrp5zD5tGWLqM acnt/pNptggCdKfOsZfV5WSviTHvfNweMhaZpoeWpgAK7jTN2iZHdG5Fqh1l/r/W+Y+t IA6LCO+Bj4czmtrkf12cC3h0cUe89osY10SGXIW/R5VthjajWRYmLEnrKzHNZl9a82Ji vUMedzkknatb9iLDk5s8dpcli6c3lptZMwFmPxjNDZ8ddOMKRpf/fj8A3QWdNngn2m/x Jnjg== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=cPqsftr+DIt7BqRImmpdlyWvNspWZdDTEDxYpNYOCtU=; b=LXrqQcU7FheqqIgFeXtGIytAM5ZINvYN/I4XacYuU8uen4a6Mm6Dlk/rYAO0eJZLWh fH9nVJPXbv7+AVm8nb5Qcrh2xqGT/o6KI8ETS2WEbKqO1H862i8KuYiGZdbYyZFaoTRJ YEDjd9reQKFNf0sRYdBPIsic8OwuDP8mYpae+dTTXzMT19zhTHkmOcus+vl5DuFbLJ69 Yy9zoWxfYVAURXGJl6sRWnqfME0TcAyJE+CasP6ISQbNDm0HPvF7l0h44brIR/wp++Ie UH+U0jI+D9IF2dZXqFnULiM753DmIctzi3Yg6mu1a8aQH+a/HPKGK/S45NfA/2AkH9ip atdQ== X-Gm-Message-State: AOAM5322pvYfRM07rYUimQy0l+BEumDsipUahNbh3wqRb9G6/m+OtGNE lNb8JnB4dORZUkIjAH0H3x66CA== X-Received: by 2002:a7b:cbcc:: with SMTP id n12mr5130349wmi.23.1609964782335; Wed, 06 Jan 2021 12:26:22 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id z22sm4229465wml.1.2021.01.06.12.26.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Jan 2021 12:26:18 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id A520C1FF8F; Wed, 6 Jan 2021 20:26:16 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL v4 3/4] tests/acceptance: bound the size of readline in s390_ccw_virtio Date: Wed, 6 Jan 2021 20:26:15 +0000 Message-Id: <20210106202616.20004-4-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210106202616.20004-1-alex.bennee@linaro.org> References: <20210106202616.20004-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::335; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x335.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: Halil Pasic , Thomas Huth , =?utf-8?q?Daniel_P_=2E_Berrang=C3=A9?= , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Cornelia Huck , qemu-devel@nongnu.org, Wainer dos Santos Moschetta , Willian Rampazzo , Christian Borntraeger , "open list:S390 Virtio-ccw" , Cleber Rosa , =?utf-8?q?Alex_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+patch=linaro.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 Message-Id: <20210105124405.15424-1-alex.bennee@linaro.org> -- 2.20.1 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