From nobody Fri Apr 19 21:33:21 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.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; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1560196361; cv=none; d=zoho.com; s=zohoarc; b=bKfy/sC5PlD8c5dYqKTp+E0lO2kY58z/C+VGa43X2FUn1CmEPPpaPX2jOdPcDrrcBYO4qtN04aVdQ2/UlXZZs54UvruoNRmpnCw4CoxMzep9MGEvn6ECHyAiuFDC/bC04Ll808B7KQMv2I1ofzscbr8w8FsBI9aPOwPizSXxhsw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1560196361; h=Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:Sender:Subject:To:ARC-Authentication-Results; bh=kKy7g62gwao7CbMJtc2veUJny2UiFqQGQRObaH4+n8c=; b=PhaezBt1d2CBRgSgfAMBLplpC9vxU+UOwcW2FzRZNNdVWmpevWcL/AfovTdOQFsqZQDXxn9xNjRrGU7tH4x2mGb4fTZMrhzDBJjdD+ZfWEIzohkpzTAQZ6GVT/B0s9tANLhL5tsExzvsWBVcXvBowx5kaXV7JUE26BEYseJy2Xo= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1560196361261500.3428038333383; Mon, 10 Jun 2019 12:52:41 -0700 (PDT) Received: from localhost ([::1]:49330 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1haQLQ-0002L7-7s for importer@patchew.org; Mon, 10 Jun 2019 15:52:40 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60640) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1haQJU-0000qL-Ei for qemu-devel@nongnu.org; Mon, 10 Jun 2019 15:50:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1haQJT-0003rC-3r for qemu-devel@nongnu.org; Mon, 10 Jun 2019 15:50:40 -0400 Received: from mx2.rt-rk.com ([89.216.37.149]:42368 helo=mail.rt-rk.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1haQJJ-00032k-8p for qemu-devel@nongnu.org; Mon, 10 Jun 2019 15:50:33 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.rt-rk.com (Postfix) with ESMTP id 1DD7E1A2092; Mon, 10 Jun 2019 21:49:17 +0200 (CEST) Received: from rtrkw774-lin.domain.local (rtrkw774-lin.domain.local [10.10.13.43]) by mail.rt-rk.com (Postfix) with ESMTPSA id CCC5A1A2045; Mon, 10 Jun 2019 21:49:16 +0200 (CEST) X-Virus-Scanned: amavisd-new at rt-rk.com From: Aleksandar Markovic To: qemu-devel@nongnu.org Date: Mon, 10 Jun 2019 21:49:10 +0200 Message-Id: <1560196150-30436-1-git-send-email-aleksandar.markovic@rt-rk.com> X-Mailer: git-send-email 2.7.4 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 89.216.37.149 Subject: [Qemu-devel] [PATCH] tests/acceptance: Improve failure reporting in linux_ssh_mips_malta.py 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: ccarrara@redhat.com, f4bug@amsat.org, ehabkost@redhat.com, amarkovic@wavecomp.com, crosa@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Aleksandar Markovic Rather than optputing a cryptic message: FAIL: True not found in [False], the following will be reported too, if the command output does not meet specified expectations: 'lspci -d 11ab:4620' output doesn't contain the word 'GT-64120' Signed-off-by: Aleksandar Markovic --- tests/acceptance/linux_ssh_mips_malta.py | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/tests/acceptance/linux_ssh_mips_malta.py b/tests/acceptance/li= nux_ssh_mips_malta.py index aafb0c3..cbf1b34 100644 --- a/tests/acceptance/linux_ssh_mips_malta.py +++ b/tests/acceptance/linux_ssh_mips_malta.py @@ -147,20 +147,27 @@ class LinuxSSH(Test): =20 def run_common_commands(self): stdout, stderr =3D self.ssh_command('lspci -d 11ab:4620') - self.assertIn(True, ["GT-64120" in line for line in stdout]) + self.assertIn(True, ["GT-64120a" in line for line in stdout], + "'lspci -d 11ab:4620' output doesn't contain " + "the word 'GT-64120'") =20 stdout, stderr =3D self.ssh_command('cat /sys/bus/i2c/devices/i2c-= 0/name') - self.assertIn(True, ["SMBus PIIX4 adapter" in line - for line in stdout]) + self.assertIn(True, ["SMBus PIIX4 adaptera" in line + for line in stdout], + "cat /sys/bus/i2c/devices/i2c-0/name' doesn't contai= n " + "the words 'SMBus PIIX4 adapter'") =20 stdout, stderr =3D self.ssh_command('cat /proc/mtd') - self.assertIn(True, ["YAMON" in line - for line in stdout]) + self.assertIn(True, ["YAMONa" in line + for line in stdout], + "'cat /proc/mtd' doesn't contain the word 'YAMON'") =20 # Empty 'Board Config' stdout, stderr =3D self.ssh_command('md5sum /dev/mtd2ro') - self.assertIn(True, ["0dfbe8aa4c20b52e1b8bf3cb6cbdf193" in line - for line in stdout]) + self.assertIn(True, ["0dfbe8aa4c20b52e1b8bf3cb6cbdf193a" in line + for line in stdout], + "'md5sum /dev/mtd2ro' doesn't contain " + "the word '0dfbe8aa4c20b52e1b8bf3cb6cbdf193'") =20 def do_test_mips_malta(self, endianess, kernel_path, uname_m): self.boot_debian_wheezy_image_and_ssh_login(endianess, kernel_path) --=20 2.7.4