From nobody Mon Nov 17 08:45:23 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1732548462; cv=none; d=zohomail.com; s=zohoarc; b=GN0jy7N745ELFcs8R/zwskBLDGNDPk5ggzGvEzvM3a21uyHZvQKfazqi2qh3zHpwA5XZI1kaMT4qy6TAMjf5Aq3nllEJnzd84lN5JAiaCqa2+WxiKkUL1U00w4nig0SICtEvfA8evE/9xsZjeP71ixALRGWoqtYhRNyEIiqqPJg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1732548462; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=sVMl7r/1fgVSH8/n/aNIg8kgc7q28d2pUpabg4PkhwM=; b=dWU2hw58ruDrNmrlFX21X7PG0bZgKfoNq7WuddQti7u302LUDhaDH5ocwnySTYfwDbF11bv+6Z6mlPZ2pPZ6A0Zdv8SY4x3rCO2+E6eGL1aqTmn2M3nTA+2CGlzd99cp89bShq77BW13RM6PD5o89zlaeEB06C2U+I9LkOMf3wM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1732548462934795.7008319001017; Mon, 25 Nov 2024 07:27:42 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tFayq-0006zs-CN; Mon, 25 Nov 2024 10:26:28 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tFaym-0006wm-DF for qemu-devel@nongnu.org; Mon, 25 Nov 2024 10:26:24 -0500 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tFayh-0002YH-58 for qemu-devel@nongnu.org; Mon, 25 Nov 2024 10:26:20 -0500 Received: by mail-wr1-x434.google.com with SMTP id ffacd0b85a97d-3824a8a5c56so3076647f8f.3 for ; Mon, 25 Nov 2024 07:26:18 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3825fb4ecd8sm10658416f8f.60.2024.11.25.07.26.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Nov 2024 07:26:16 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 6DEFD614E3; Mon, 25 Nov 2024 15:21:07 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1732548377; x=1733153177; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=sVMl7r/1fgVSH8/n/aNIg8kgc7q28d2pUpabg4PkhwM=; b=BoBqtQS85eTH1xTXXUSWMj9Hzi9YjXuYSZhV2xSrBJlDsY2rkDgWRJ0inbz+NOGjG3 bZ67vXwvUTIkuP+JQxGVu02oyw5Kuj05wEAL/3eh8MZNhaG4wePHUdvkxeEYWKhshr5c EE2vJAa8B1d1/bX4RLDfYQI3uliBde8wM4BVm9Dtdi5JRIcLuRWAozhsMrvVAjD3Pkp2 cASgwJtttUWwOg0+SPIusOqvHt4ATePNsa3GQ0pBKKNUDPBqTfvT6liTLWB2GjrdlurW mmQVlwROgd68C7K12/n8G/jlmHK41ZQIGWHnlsnA5wBUk7WLOGygTT8A+ZD5xIV8/y2P fnig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732548377; x=1733153177; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=sVMl7r/1fgVSH8/n/aNIg8kgc7q28d2pUpabg4PkhwM=; b=VVAHWeSQnKPu1gVeERVLSsX7t0a3GHdJz3EiPk6av7vh4UE4k3B2nV6fhJZP9LfCkf k2Ch1rjA8UKN1eTBmnHG12C2OUZ1QHjcjXRqv9i10N4v+9cFDDSneK51tchzE4VHHSnA 2L4oYhFt6yfYQnxSW+LUIuW7f55AO3Em/ULtCSMaPYC3qrPrz8MX5+GkXcob1PxGQsW1 yTpOUW/bpKxD2e0JTpVBzQRJT1d+Xqom6EawnmPG3tazPWhJX6PoDB+SZ9bEFueKRU+g F/6i7DUSlIuVwetouXImTL5vl0Be5vZ6AsvsirIMrrZ9iK0JiAHqwf29ttU5Sk5hBltJ L2Lw== X-Gm-Message-State: AOJu0YxvKl7kCBuvsfKimSMItmmEEfYH2WOheMw/QDj/vh5yAXGKpEfR f7kjNVv51MrIHj4CW/qiqaxKvLGE28GpJiiCEcNK8LaASmqMjxsrn0zdLadUQPo= X-Gm-Gg: ASbGnctNNPIEsMlhmTYuBOqIRLVRKqkATAbCPrLbElX32PKYRayanxQXvQjyjR3ogVB dJ09Rwge7J2dPhZ7XC76Gg0drLJTqqbsGBfUvne+5zlpCOLARhjo+KJTpjG7Smgd8uysY///QSe xL8miCEmBkNYQFY9vXKe6E56CrbTuRO+ziLD4rGPoHTjU6F6M/FXzV/67TyTdghOqosx2B0Mos5 Wsmout67ur4cd+VbbhcsMg2vvxr840FanJiMxIjjaI0a7Qz X-Google-Smtp-Source: AGHT+IEEKr6dXMb+Aunofvy+nuwN9wTujrt5Og8F/L2UCry/5ep7kSHTKF7fvE0G281Tdt2Mc3yITw== X-Received: by 2002:a05:6000:1f82:b0:37d:5364:d738 with SMTP id ffacd0b85a97d-38260bcc4cemr11861047f8f.45.1732548377338; Mon, 25 Nov 2024 07:26:17 -0800 (PST) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Thomas Huth , =?UTF-8?q?Alex=20Benn=C3=A9e?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PULL 18/28] tests/functional: avoid accessing log_filename on earlier failures Date: Mon, 25 Nov 2024 15:20:55 +0000 Message-Id: <20241125152105.2100395-19-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241125152105.2100395-1-alex.bennee@linaro.org> References: <20241125152105.2100395-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; 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=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1732548464452019100 From: Daniel P. Berrang=C3=A9 If a failure occurs early in the QemuBaseTest constructor, the 'log_filename' object atttribute may not exist yet. This happens most notably if the QEMU_TEST_QEMU_BINARY is not set. We can't initialize 'log_filename' earlier as we use the binary to identify the architecture which is then used to build the path in which the logs are stored. Signed-off-by: Daniel P. Berrang=C3=A9 Message-Id: <20241121154218.1423005-19-berrange@redhat.com> Reviewed-by: Thomas Huth Signed-off-by: Alex Benn=C3=A9e Message-Id: <20241121165806.476008-19-alex.bennee@linaro.org> diff --git a/tests/functional/qemu_test/testcase.py b/tests/functional/qemu= _test/testcase.py index fceafb32b0..90ae59eb54 100644 --- a/tests/functional/qemu_test/testcase.py +++ b/tests/functional/qemu_test/testcase.py @@ -81,10 +81,12 @@ def main(): res =3D unittest.main(module =3D None, testRunner =3D tr, exit =3D= False, argv=3D["__dummy__", path]) for (test, message) in res.result.errors + res.result.failures: - print('More information on ' + test.id() + ' could be found he= re:' - '\n %s' % test.log_filename, file=3Dsys.stderr) - if hasattr(test, 'console_log_name'): - print(' %s' % test.console_log_name, file=3Dsys.stderr) + + if hasattr(test, "log_filename"): + print('More information on ' + test.id() + ' could be foun= d here:' + '\n %s' % test.log_filename, file=3Dsys.stderr) + if hasattr(test, 'console_log_name'): + print(' %s' % test.console_log_name, file=3Dsys.stderr) sys.exit(not res.result.wasSuccessful()) =20 =20 --=20 2.39.5