From nobody Wed Nov 12 15:02:45 2025 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; dkim=fail; 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=1571498187; cv=none; d=zoho.com; s=zohoarc; b=E7jTTKnl2o3NuUidkM9VSEcteBHtpTGa1jejwNiF1UmI/yzFXZfsnsdECn4h3zFoFvBKFwqEEkr1wt0Rn7dDjj7LdQbjx3qLzjKphIfHa2VJuKaI61NZ7hQTTxd/4D+FXOIQT9HeXaQpGlhXRgvNLJTNEu6brmhf/Kql0+K6GEc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1571498187; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=w2ENnodrkebcANajyxBbU6bIiMWLNySDu9Cotb19W1w=; b=fe1+yK1cnZhK2KnSTa9B95/A/5ri95IYLhIQ/PdPbtw9YdBVVFojNS4GL5x8qMJWWg1cNc1ZKx21eSCSQJI9iXSRPR0JzBVvESjfT43MFeZstFik/pKS283uNAVij9CchSSSka81pweI4B3kt8i3fMKPrqRYkvoEmQBCY7NbkCc= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; 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 1571498187097890.9493122178716; Sat, 19 Oct 2019 08:16:27 -0700 (PDT) Received: from localhost ([::1]:56572 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iLqSv-0006KU-QP for importer@patchew.org; Sat, 19 Oct 2019 11:16:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45651) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iLqNn-0001BW-S2 for qemu-devel@nongnu.org; Sat, 19 Oct 2019 11:11:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iLqNm-0006wZ-Dz for qemu-devel@nongnu.org; Sat, 19 Oct 2019 11:11:07 -0400 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]:35006) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iLqNl-0006tx-UH for qemu-devel@nongnu.org; Sat, 19 Oct 2019 11:11:06 -0400 Received: by mail-wm1-x329.google.com with SMTP id 14so2069870wmu.0 for ; Sat, 19 Oct 2019 08:11:03 -0700 (PDT) Received: from x1w.redhat.com (14.red-88-21-201.staticip.rima-tde.net. [88.21.201.14]) by smtp.gmail.com with ESMTPSA id t13sm10753964wra.70.2019.10.19.08.11.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 19 Oct 2019 08:11:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=w2ENnodrkebcANajyxBbU6bIiMWLNySDu9Cotb19W1w=; b=abiqNl25RX3y8Pe4qxEujhmQkC+ZRwdCye23N7LWvU7tmXrmB0M3G361o3KHxWL0aO RYGBRMf7GzoVpYblyASAOmM/zz9xX8YA0JhlLOAodBMnJOwCdbI9uE+rXdhD2kmpfaw9 +mtNcfzyuKFe4hrrIVY5y8EZ2A+j75jI/59iwQL+HxUnxiTJClp1OAUX+X01jPt04Z7P W/LySH1AsU12XGEEmZLeKLZjW8LhnEltOeRWh6U8vPeETMjh1uNJFU6fGi+Ny/WGLOTn 0Cc6FKKYU1FJZbe+NnJILow3KO4Rhe7hymTs/DbtklF1EGNSROad7GTAwwAsbo1c9821 4aUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=w2ENnodrkebcANajyxBbU6bIiMWLNySDu9Cotb19W1w=; b=aTaR2olOqno7GfJPKRh857w1D7aLZ3KnBL9mf7UAnduKBmG8Vst5s3XEVCpmWvIVif W3K+a3t5h0URLlgpwLivyWpmsExO+lwuXY1kumant81Rg5qtfdKB+l4usttsSBX//bbg dtZC0BA2o2/g00zZsRCIjfuldCkztE9GajmPJfqgSWjaZgn8PNdXkDQk26MEDdYlaTo7 82odnNkXMnP3UCVFmToqPNta2wA9dtjFzjvhrClp9B/mk8RQCgteA9ez0ik6QB1Hgz6B DROy+sWyrRbtA3GO2wrFB4MHlzHHb2uWofcOaSEKWl0fGwoDH6T6mmZFukQC9wU2pvYc woVQ== X-Gm-Message-State: APjAAAXgWbHA/5TXa+P1cHV5H1TQ3vcZrQPIEMy3AicQBHL1U0BPF/cW +FBkClEFTB0avI94NuEWrAxNIUnA X-Google-Smtp-Source: APXvYqzO6IX/iBoc7c2OnYnAbmq6nBSOJ2X0MuUVnVsiO5/eolUNoSn98q6XfvGMhPOZQmnOL5714Q== X-Received: by 2002:a1c:7401:: with SMTP id p1mr6712090wmc.144.1571497862235; Sat, 19 Oct 2019 08:11:02 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 01/11] Acceptance tests: refactor wait_for_console_pattern Date: Sat, 19 Oct 2019 17:10:48 +0200 Message-Id: <20191019151058.31733-2-f4bug@amsat.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20191019151058.31733-1-f4bug@amsat.org> References: <20191019151058.31733-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::329 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: Eduardo Habkost , Aleksandar Markovic , Cleber Rosa , Aleksandar Rikalo , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Aurelien Jarno Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Cleber Rosa The same utility method is already present in two different test files, so let's consolidate it into a single utility function. Signed-off-by: Cleber Rosa Message-Id: <20190916164011.7653-1-crosa@redhat.com> Reviewed-by: Philippe Mathieu-Daud=C3=A9 [PMD: failure_message is optional] Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- tests/acceptance/avocado_qemu/__init__.py | 25 +++++++++++++++++++++ tests/acceptance/boot_linux_console.py | 27 +++++------------------ tests/acceptance/linux_ssh_mips_malta.py | 18 +++------------ 3 files changed, 33 insertions(+), 37 deletions(-) diff --git a/tests/acceptance/avocado_qemu/__init__.py b/tests/acceptance/a= vocado_qemu/__init__.py index bd41e0443c..e3101cba30 100644 --- a/tests/acceptance/avocado_qemu/__init__.py +++ b/tests/acceptance/avocado_qemu/__init__.py @@ -8,6 +8,7 @@ # This work is licensed under the terms of the GNU GPL, version 2 or # later. See the COPYING file in the top-level directory. =20 +import logging import os import sys import uuid @@ -53,6 +54,30 @@ def pick_default_qemu_bin(arch=3DNone): return qemu_bin_from_src_dir_path =20 =20 +def wait_for_console_pattern(test, success_message, failure_message=3DNone= ): + """ + Waits for messages to appear on the console, while logging the content + + :param test: an Avocado test containing a VM that will have its console + read and probed for a success or failure message + :type test: :class:`avocado_qemu.Test` + :param success_message: if this message appears, test succeeds + :param failure_message: if this message appears, test fails + """ + console =3D test.vm.console_socket.makefile() + console_logger =3D logging.getLogger('console') + while True: + msg =3D console.readline().strip() + if not msg: + continue + console_logger.debug(msg) + if success_message in msg: + break + if failure_message and failure_message in msg: + fail =3D 'Failure message found in console: %s' % failure_mess= age + test.fail(fail) + + class Test(avocado.Test): def setUp(self): self._vms =3D {} diff --git a/tests/acceptance/boot_linux_console.py b/tests/acceptance/boot= _linux_console.py index 8a9a314ab4..8897e0c253 100644 --- a/tests/acceptance/boot_linux_console.py +++ b/tests/acceptance/boot_linux_console.py @@ -9,12 +9,12 @@ # later. See the COPYING file in the top-level directory. =20 import os -import logging import lzma import gzip import shutil =20 from avocado_qemu import Test +from avocado_qemu import wait_for_console_pattern from avocado.utils import process from avocado.utils import archive =20 @@ -29,31 +29,14 @@ class BootLinuxConsole(Test): =20 KERNEL_COMMON_COMMAND_LINE =3D 'printk.time=3D0 ' =20 - def wait_for_console_pattern(self, success_message, - failure_message=3D'Kernel panic - not syn= cing'): - """ - Waits for messages to appear on the console, while logging the con= tent - - :param success_message: if this message appears, test succeeds - :param failure_message: if this message appears, test fails - """ - console =3D self.vm.console_socket.makefile() - console_logger =3D logging.getLogger('console') - while True: - msg =3D console.readline().strip() - if not msg: - continue - console_logger.debug(msg) - if success_message in msg: - break - if failure_message in msg: - fail =3D 'Failure message found in console: %s' % failure_= message - self.fail(fail) + def wait_for_console_pattern(self, success_message): + wait_for_console_pattern(self, success_message, + failure_message=3D'Kernel panic - not syn= cing') =20 def exec_command_and_wait_for_pattern(self, command, success_message): command +=3D '\n' self.vm.console_socket.sendall(command.encode()) - self.wait_for_console_pattern(success_message) + wait_for_console_pattern(self, success_message) =20 def extract_from_deb(self, deb, path): """ diff --git a/tests/acceptance/linux_ssh_mips_malta.py b/tests/acceptance/li= nux_ssh_mips_malta.py index 25a1df5098..ffbb06f846 100644 --- a/tests/acceptance/linux_ssh_mips_malta.py +++ b/tests/acceptance/linux_ssh_mips_malta.py @@ -13,6 +13,7 @@ import time =20 from avocado import skipUnless from avocado_qemu import Test +from avocado_qemu import wait_for_console_pattern from avocado.utils import process from avocado.utils import archive from avocado.utils import ssh @@ -40,19 +41,6 @@ class LinuxSSH(Test): def setUp(self): super(LinuxSSH, self).setUp() =20 - def wait_for_console_pattern(self, success_message, - failure_message=3D'Oops'): - console =3D self.vm.console_socket.makefile() - console_logger =3D logging.getLogger('console') - while True: - msg =3D console.readline() - console_logger.debug(msg.strip()) - if success_message in msg: - break - if failure_message in msg: - fail =3D 'Failure message found in console: %s' % failure_= message - self.fail(fail) - def get_portfwd(self): res =3D self.vm.command('human-monitor-command', command_line=3D'info usernet') @@ -109,7 +97,7 @@ class LinuxSSH(Test): =20 self.log.info('VM launched, waiting for sshd') console_pattern =3D 'Starting OpenBSD Secure Shell server: sshd' - self.wait_for_console_pattern(console_pattern) + wait_for_console_pattern(self, console_pattern, 'Oops') self.log.info('sshd ready') =20 self.ssh_connect('root', 'root') @@ -117,7 +105,7 @@ class LinuxSSH(Test): def shutdown_via_ssh(self): self.ssh_command('poweroff') self.ssh_disconnect_vm() - self.wait_for_console_pattern('Power down') + wait_for_console_pattern(self, 'Power down', 'Oops') =20 def ssh_command_output_contains(self, cmd, exp): stdout, _ =3D self.ssh_command(cmd) --=20 2.21.0 From nobody Wed Nov 12 15:02:45 2025 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; dkim=fail; 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=1571498028; cv=none; d=zoho.com; s=zohoarc; b=jZ2SaiEIFthqamvybkDuafYDEO6bSxNikKkSsiTGM9lJa/6GkwoVi7MnRs+Luy2QhX2f/D3j6PUire4zFqa1ma9/W2ig7TMpCCdnbSEsb/AnDI4vOGGDD3KrSq12W9jjl5+jv0xIqHEBrBQd1YSeE/bN0+cVCbTdEw89w7Dadyk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1571498028; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=ZIx2URSbhQtQxwSH9NicQbjsqcplkfjt7F3Xbrr+u4U=; b=O9NVM3+bLU8EVOg1n7+NRfX2KyP07KhAOZi2dYxDKqxMcqr5KECMPEdzo2GtyV4hZ3KFU0Mx1jwr9IzHde0T4plWxwjeeSQwIkKcmM/rCOBcIdV4oXsJwXTaYV2gJKjGgFpw5Z7UB+3xLWxanh8f5InuXzdBXM9k9plmt8Cks7c= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; 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 1571498028442187.8238374865557; Sat, 19 Oct 2019 08:13:48 -0700 (PDT) Received: from localhost ([::1]:56536 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iLqQN-0002ze-8y for importer@patchew.org; Sat, 19 Oct 2019 11:13:47 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45643) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iLqNn-0001BT-Eq for qemu-devel@nongnu.org; Sat, 19 Oct 2019 11:11:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iLqNm-0006wT-DT for qemu-devel@nongnu.org; Sat, 19 Oct 2019 11:11:07 -0400 Received: from mail-wm1-x344.google.com ([2a00:1450:4864:20::344]:52093) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iLqNl-0006vL-Uh for qemu-devel@nongnu.org; Sat, 19 Oct 2019 11:11:06 -0400 Received: by mail-wm1-x344.google.com with SMTP id q70so1771463wme.1 for ; Sat, 19 Oct 2019 08:11:04 -0700 (PDT) Received: from x1w.redhat.com (14.red-88-21-201.staticip.rima-tde.net. [88.21.201.14]) by smtp.gmail.com with ESMTPSA id t13sm10753964wra.70.2019.10.19.08.11.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 19 Oct 2019 08:11:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ZIx2URSbhQtQxwSH9NicQbjsqcplkfjt7F3Xbrr+u4U=; b=Kd4l1uFFazh2DoCkM8fdoqUDeViykhAvUrdMDWy7uphQvUivYxmBoIHWSUFJEpDppp dNy3vwpMFoZ7/x5vM/oa2Upgl1JyyoWgVpPbX3xp2tQ4wHF9uvrCTXStZhjseYPeR9a8 oAHXaUJwxLxbexN3nSuZl05d/3NQ9y9tQpbocxf84rYXc9fwmXuROG6L/IrsLaRgXc2O XHiCNRgpZ2+Js2/CCUqg52rtIAJB1TRr1KWZoaLn2/xnMPRTaeD34e78SascEq6mZFzm HhdREVzZTvS2PewK+6vkefrw+fnjFNwcYBAdj6xsItFetWWcKYPrPKM5/w+SmTZOVTJs gJSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=ZIx2URSbhQtQxwSH9NicQbjsqcplkfjt7F3Xbrr+u4U=; b=UKzVWKPQx4QmLuHKIYVndJ4zx/wgKt210O8povMJ7DBSwnvBoECDcc3Ozk3nHMKw5P vjmpQ3NRqbuH4/xzhk70mWgZGeN82H3RXXlEIcs2Wx93uh8P34pQ9d+DzNIbr17wHgmu qXN/WMo432JUHP3Om14O/M8VhuGJz+bLR1rVr/fumyoUmweQtjPWVJxWQokxYeQXA0LK M+00NAojQcQUi7dMskGEaFANF+ypDApjSzsQUpZn4/IDpvUDrBxol91rufNsInGdltcS BDYcpITEmvHcTN7VpPyQSNHo7+cHDDjHYakn2TG8dAqap4QeKiKTiw/WcaEn4MI6lBJi 6BWA== X-Gm-Message-State: APjAAAX34ab+MaaZbk2junZipVC7JelwtWQGAtkOAMIJ93qWamsBqes+ VdRHI2n7LUL03tyTo/8mnI5/dTO6 X-Google-Smtp-Source: APXvYqwAtQM9RTXi4wAFgi/Ytd+nw+zbTN0FVM8/WXUPWSO0Dn1Iu/K5oV2SFqeS1/zVFwHRjUqhPA== X-Received: by 2002:a1c:7517:: with SMTP id o23mr12614037wmc.34.1571497863792; Sat, 19 Oct 2019 08:11:03 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 02/11] tests/acceptance: Fixe wait_for_console_pattern() hangs Date: Sat, 19 Oct 2019 17:10:49 +0200 Message-Id: <20191019151058.31733-3-f4bug@amsat.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20191019151058.31733-1-f4bug@amsat.org> References: <20191019151058.31733-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::344 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: Eduardo Habkost , Aleksandar Markovic , Cleber Rosa , Aleksandar Rikalo , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Aurelien Jarno Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Philippe Mathieu-Daud=C3=A9 Because of a possible deadlock (QEMU waiting for the socket to become writable) let's close the console socket as soon as we stop to use it. Suggested-by: Cleber Rosa Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- tests/acceptance/avocado_qemu/__init__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/acceptance/avocado_qemu/__init__.py b/tests/acceptance/a= vocado_qemu/__init__.py index e3101cba30..a0450e5263 100644 --- a/tests/acceptance/avocado_qemu/__init__.py +++ b/tests/acceptance/avocado_qemu/__init__.py @@ -74,6 +74,7 @@ def wait_for_console_pattern(test, success_message, failu= re_message=3DNone): if success_message in msg: break if failure_message and failure_message in msg: + console.close() fail =3D 'Failure message found in console: %s' % failure_mess= age test.fail(fail) =20 --=20 2.21.0 From nobody Wed Nov 12 15:02:46 2025 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; dkim=fail; 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=1571498032; cv=none; d=zoho.com; s=zohoarc; b=iSgKXa87tmIhPx2zmDr1/B79DI87f/7l5wl8YLrzOe2X1WjN7e2wMLnMReiyZCqcDoX96HnYFP4wD+55nq9mYYbIPpBJd8Qkjw20kqzGxT6SjBSIT7IY6Lm9fREc6hPCD3Jg1lP+/2d3ljq+75Lv2ShXGFjjFQBuTs8FpBPIi9s= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1571498032; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=L17Gkpekc5/KDSlV7uWJjFxc0f5cH+nD4BY7UX0P8ME=; b=Eo4y4IYCX280P5bv4zkUxEE3Zad1YdlToQbuQldMG3Y4vnmFUw1+TVmy6lVOIe0X0QgfyMQ5QNHeiILmnJiZHXf5luI2SkYpA0sL+17LubnJsA0TZ+/Y/c8ub+bLedZi9bk35O60Flw+uD9ACrGpPuSKwuhLgDVS6hFA44WpwbU= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; 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 1571498032189333.23221915777003; Sat, 19 Oct 2019 08:13:52 -0700 (PDT) Received: from localhost ([::1]:56534 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iLqQN-0002wr-KL for importer@patchew.org; Sat, 19 Oct 2019 11:13:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45647) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iLqNn-0001BV-JD for qemu-devel@nongnu.org; Sat, 19 Oct 2019 11:11:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iLqNm-0006wl-J2 for qemu-devel@nongnu.org; Sat, 19 Oct 2019 11:11:07 -0400 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]:33770) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iLqNm-0006vx-DM for qemu-devel@nongnu.org; Sat, 19 Oct 2019 11:11:06 -0400 Received: by mail-wm1-x32e.google.com with SMTP id r17so11356179wme.0 for ; Sat, 19 Oct 2019 08:11:06 -0700 (PDT) Received: from x1w.redhat.com (14.red-88-21-201.staticip.rima-tde.net. [88.21.201.14]) by smtp.gmail.com with ESMTPSA id t13sm10753964wra.70.2019.10.19.08.11.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 19 Oct 2019 08:11:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=L17Gkpekc5/KDSlV7uWJjFxc0f5cH+nD4BY7UX0P8ME=; b=cdvTdsHLJ9xm713HYol6fuZg3dwqzEwv2lt/uVKRv2cQXDtsSqCzZRvxWsSoMoz73Q 86Uqh6GDgMDwM2k4IMj8CWwRcfRufCzbkk8Q8Y8Xp0rX9jhHhLkFoiHKN4NA8T1fGJej 9CqgSWbGQDEsoL43yf/J/4pv3P+jTpchbwnf329qOdbm6lffePCO6R6MV8TJ4lP8U9eA saQBCCcWiZB0LDKa+8pqAGH9c8CdcqPLFWJ/9iAlI94swRdLd+ulnbNHxm/4Ei+FCmuw YTsANHOX+GRv2TF19ffFAjgOo+5rxBK8jxFuFUZ+O7uqOZ3oWhZFkc/tbB3Muvbltwxl j5Og== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=L17Gkpekc5/KDSlV7uWJjFxc0f5cH+nD4BY7UX0P8ME=; b=Whqgz/qqaCBVZAwDajfVs6FqdwMdSxvNvxT/zIAAvUl5SIlwWgWJGXUk5AATb0zZ+I Zsv9WbnLizlmatAQh0I/Ht8QNrn3bEeQiCVlXRvF92l26tAT6dOzHijH9DV3dlxS00Gg NwqXCpcCNCWjK+TsO7kCwhQwHEs9sg1pA5LRRHP17oqCuWsi2/Lr0dNU1B6zHlmJmotX YKqqC+zLxD/72e4OB2io+V0zi4D1f0QTVGySBeE1Ipd4hPPAQ0ywLXbWRGK+mwXwR+sg BLksWGnyAkrRxm4nd0a2G0kXP6NwcB8EKsZPXVFGTOUcOccZkrVOLy8YVbz+Y8PbhYvT JeQA== X-Gm-Message-State: APjAAAVICbGexYRoytUPPvpTtHI1JGm3g4tLfBe0p5qKGV0aqtw2BCXx f+SLqueOcnAfwOdfoN5Xw8VEf/GF X-Google-Smtp-Source: APXvYqyOL9OvMOahIfKpTn7TTLB+igP5pLZuuf2G6z3XYDavh2IbDeHUpp2qW53qdzuHaRHOWDO1Aw== X-Received: by 2002:a05:600c:143:: with SMTP id w3mr11172913wmm.35.1571497865239; Sat, 19 Oct 2019 08:11:05 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 03/11] tests/acceptance: Send on serial lines Date: Sat, 19 Oct 2019 17:10:50 +0200 Message-Id: <20191019151058.31733-4-f4bug@amsat.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20191019151058.31733-1-f4bug@amsat.org> References: <20191019151058.31733-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::32e 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: Eduardo Habkost , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Aleksandar Markovic , Cleber Rosa , Aleksandar Rikalo , Aurelien Jarno Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Some firmwares don't parse the control character and expect a . Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- tests/acceptance/boot_linux_console.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/acceptance/boot_linux_console.py b/tests/acceptance/boot= _linux_console.py index 8897e0c253..497faa4f7f 100644 --- a/tests/acceptance/boot_linux_console.py +++ b/tests/acceptance/boot_linux_console.py @@ -34,7 +34,7 @@ class BootLinuxConsole(Test): failure_message=3D'Kernel panic - not syn= cing') =20 def exec_command_and_wait_for_pattern(self, command, success_message): - command +=3D '\n' + command +=3D '\r\n' self.vm.console_socket.sendall(command.encode()) wait_for_console_pattern(self, success_message) =20 --=20 2.21.0 From nobody Wed Nov 12 15:02:46 2025 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; dkim=fail; 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=1571498409; cv=none; d=zoho.com; s=zohoarc; b=WWqt0in/9Js56L0mn3OKPNfXSlFD6ewJYSNmGQisyYIeTwx6ULs9qBCI2w5ubm5hHNVIU9VYeCY6Zvm7Z2UD5mbtck1EYuDXAK5WdTilMCQX47FsmYm5JylnHxkOryxrqVXt6+gSKSPA66yLwSP/VKogJQ0Ty6u4lWKKv/yzX6Q= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1571498409; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=l2a+TCqZPYf8Fdku0JFcZTliUzkB7c4m1IgL3Bv67Zg=; b=Gs08RJGR/imQcWQ5dhe7ge4Boe9XCbIB0tq5DpCZZP0VgWHIj5dA8b6FdkDNW1M6lyOgOFKOCeKtUd46DS/KfCBUi2N2zrUL22+aUazVf94rFyBsr7/K1AbfdxDBsGli3X6lVwU2N9WJMdCrs9J9g7tY0dFXeITeVYZVUCwvGTs= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; 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 1571498409389270.21739111304714; Sat, 19 Oct 2019 08:20:09 -0700 (PDT) Received: from localhost ([::1]:56598 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iLqWU-0000zx-Ve for importer@patchew.org; Sat, 19 Oct 2019 11:20:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45673) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iLqNq-0001CY-1K for qemu-devel@nongnu.org; Sat, 19 Oct 2019 11:11:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iLqNo-0006zA-OL for qemu-devel@nongnu.org; Sat, 19 Oct 2019 11:11:09 -0400 Received: from mail-wr1-x441.google.com ([2a00:1450:4864:20::441]:45603) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iLqNo-0006yF-Hz for qemu-devel@nongnu.org; Sat, 19 Oct 2019 11:11:08 -0400 Received: by mail-wr1-x441.google.com with SMTP id q13so4215483wrs.12 for ; Sat, 19 Oct 2019 08:11:08 -0700 (PDT) Received: from x1w.redhat.com (14.red-88-21-201.staticip.rima-tde.net. [88.21.201.14]) by smtp.gmail.com with ESMTPSA id t13sm10753964wra.70.2019.10.19.08.11.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 19 Oct 2019 08:11:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=l2a+TCqZPYf8Fdku0JFcZTliUzkB7c4m1IgL3Bv67Zg=; b=BHH07EOkM4HJyzv2agpdiUHn1dj5nBzg6y99Or0BF31z6ZdfekeMfhWqtDAMuKjekb X+x/pOpO8b44j4kllnlHDM2RVxpbIz0uR6ndp1vgTxLrU+nON5d+4w7nLHY++X8m+MUa ryU4EjRDmk3QBNV7sB+W69daSsHo+MZ3Zf0DxF5A/f4q35SUajBZ4DETRfNo45xJJx2G WPPSlXM/Qf3kmgOawTPRpiobe7BSNBfGgld/TqnJwt3BEr5dS+RULIi5wZ+4EpHP3nrB 1NV/zuQxkAr05h4zVaQgucAhjLfIclwg2pj5FHlGINO6MpzAJSo7cAiLbq8XBAT4jJDk d+Kg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=l2a+TCqZPYf8Fdku0JFcZTliUzkB7c4m1IgL3Bv67Zg=; b=QOL3HjUx/kvmN2cB54kXu5Il0wx0E/lUWeNx0rqe6mGLEIATlSrzPHcI+pkSTuOXth USKcn4D08di4CpruP40yafyumvHGgvCbFn/m1WQDk7ZS6ZLxiV/EBPVHQsEf+dKlmRvh MPJ25kT90yHkR+hfpmgLmcriGxFiYVgsUB4AUdWhRCEq4ELYRt5GuYthAA9wtf3r3q2r j1cFzuyQqnVkWeyRpmkxAujnACMZT5PK9OAZ5TyUzFlcxk/MA0TlyBSKu/Er0EaUlY6e 5Sx1y9cKSwwWWJt0EQiuo/ucbt/3qMiujDyPnlSydBaSSENTHcKG7Dkv6zTQmqrMjWUi VKnA== X-Gm-Message-State: APjAAAUmyhWEcZDCIXuHkLRXzVAomxxENLq2Vi3bCXMrAeO9kbn4hU05 y4AqiglgxuEC7aNTjbGNKKuhT7ha X-Google-Smtp-Source: APXvYqyt/9KSSZS4oEEqy4+7NR3UuNIljRBOqIb/i5GyNSnYlaJ9R25uRfXKQ2VXW4sxQ5eDHp0inA== X-Received: by 2002:adf:f50b:: with SMTP id q11mr11922925wro.310.1571497867235; Sat, 19 Oct 2019 08:11:07 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 04/11] tests/acceptance: Refactor exec_command_and_wait_for_pattern() Date: Sat, 19 Oct 2019 17:10:51 +0200 Message-Id: <20191019151058.31733-5-f4bug@amsat.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20191019151058.31733-1-f4bug@amsat.org> References: <20191019151058.31733-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::441 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: Eduardo Habkost , Aleksandar Markovic , Cleber Rosa , Aleksandar Rikalo , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Aurelien Jarno Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Philippe Mathieu-Daud=C3=A9 The same utility method is already present in two different test files, so let's consolidate it into a single utility function. Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- v2: fix self -> test, failure_message is optional, added doc --- tests/acceptance/avocado_qemu/__init__.py | 19 +++++++++++++++++++ tests/acceptance/boot_linux_console.py | 18 +++++++----------- 2 files changed, 26 insertions(+), 11 deletions(-) diff --git a/tests/acceptance/avocado_qemu/__init__.py b/tests/acceptance/a= vocado_qemu/__init__.py index a0450e5263..7bc77118dd 100644 --- a/tests/acceptance/avocado_qemu/__init__.py +++ b/tests/acceptance/avocado_qemu/__init__.py @@ -79,6 +79,25 @@ def wait_for_console_pattern(test, success_message, fail= ure_message=3DNone): test.fail(fail) =20 =20 +def exec_command_and_wait_for_pattern(test, command, + success_message, failure_message=3DN= one): + """ + Send a command to a console (appending CRLF characters), then wait + for success_message to appear on the console, while logging the. + content. Mark the test as failed if failure_message is found instead. + + :param test: an Avocado test containing a VM that will have its console + read and probed for a success or failure message + :type test: :class:`avocado_qemu.Test` + :param command: the command to send + :param success_message: if this message appears, test succeeds + :param failure_message: if this message appears, test fails + """ + command +=3D '\r\n' + test.vm.console_socket.sendall(command.encode()) + wait_for_console_pattern(test, success_message, failure_message) + + class Test(avocado.Test): def setUp(self): self._vms =3D {} diff --git a/tests/acceptance/boot_linux_console.py b/tests/acceptance/boot= _linux_console.py index 497faa4f7f..4b419b0559 100644 --- a/tests/acceptance/boot_linux_console.py +++ b/tests/acceptance/boot_linux_console.py @@ -14,6 +14,7 @@ import gzip import shutil =20 from avocado_qemu import Test +from avocado_qemu import exec_command_and_wait_for_pattern from avocado_qemu import wait_for_console_pattern from avocado.utils import process from avocado.utils import archive @@ -33,11 +34,6 @@ class BootLinuxConsole(Test): wait_for_console_pattern(self, success_message, failure_message=3D'Kernel panic - not syn= cing') =20 - def exec_command_and_wait_for_pattern(self, command, success_message): - command +=3D '\r\n' - self.vm.console_socket.sendall(command.encode()) - wait_for_console_pattern(self, success_message) - def extract_from_deb(self, deb, path): """ Extracts a file from a deb package into the test workdir @@ -166,12 +162,12 @@ class BootLinuxConsole(Test): self.vm.launch() self.wait_for_console_pattern('Boot successful.') =20 - self.exec_command_and_wait_for_pattern('cat /proc/cpuinfo', - 'BogoMIPS') - self.exec_command_and_wait_for_pattern('uname -a', - 'Debian') - self.exec_command_and_wait_for_pattern('reboot', - 'reboot: Restarting system') + exec_command_and_wait_for_pattern(self, 'cat /proc/cpuinfo', + 'BogoMIPS') + exec_command_and_wait_for_pattern(self, 'uname -a', + 'Debian') + exec_command_and_wait_for_pattern(self, 'reboot', + 'reboot: Restarting system= ') =20 def do_test_mips_malta32el_nanomips(self, kernel_url, kernel_hash): kernel_path_xz =3D self.fetch_asset(kernel_url, asset_hash=3Dkerne= l_hash) --=20 2.21.0 From nobody Wed Nov 12 15:02:46 2025 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; dkim=fail; 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=1571498188; cv=none; d=zoho.com; s=zohoarc; b=Labitd0n17+/sKt9OCyusUkDAzJ4VY+blk/gN6+EWuKEJeUN9pvIj9+raNw6h5puBTJsjj2rguTZyiwA0NtUdQRwA6E6ntanujrtNOEernMpW6Ee5OARX/0LOGrMNAzWP/ew1wf5dYbdxbOuyS8IDXgbmGRDja1R39fHxdP6jww= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1571498188; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=sj0gWaKf7F1u1yqYOnBP1Je+BdxFG+7SDe9DUcADRaE=; b=gK2340jDXg9bj9cqRZ9Z4ssnFXGgvip65oTtznwA+yfH8oRZywLEwC1+Bbu+XYWryU5w+fxuzn0/NsAcfIhnqIE8Yekp+/JKhbzAXfVaqhilg0tvgpWYVFmAWAMSJJuXKcZyVeFHerEnhsAqfXa1CiEGAPYwl6RGWk+K3uqWRwc= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; 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 1571498188091661.2136961397508; Sat, 19 Oct 2019 08:16:28 -0700 (PDT) Received: from localhost ([::1]:56574 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iLqSw-0006M1-O2 for importer@patchew.org; Sat, 19 Oct 2019 11:16:26 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45684) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iLqNr-0001ED-B8 for qemu-devel@nongnu.org; Sat, 19 Oct 2019 11:11:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iLqNq-00070h-5G for qemu-devel@nongnu.org; Sat, 19 Oct 2019 11:11:11 -0400 Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]:54980) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iLqNp-0006zt-Vj for qemu-devel@nongnu.org; Sat, 19 Oct 2019 11:11:10 -0400 Received: by mail-wm1-x32f.google.com with SMTP id p7so8961300wmp.4 for ; Sat, 19 Oct 2019 08:11:09 -0700 (PDT) Received: from x1w.redhat.com (14.red-88-21-201.staticip.rima-tde.net. [88.21.201.14]) by smtp.gmail.com with ESMTPSA id t13sm10753964wra.70.2019.10.19.08.11.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 19 Oct 2019 08:11:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=sj0gWaKf7F1u1yqYOnBP1Je+BdxFG+7SDe9DUcADRaE=; b=o1UEZTt9pwUVMa0JKGkLmRO8Jjq65ZDS+0OopMSn6vIuop70hSNaArxRWxJ0G3Ax9M 2UyY7WQ3d1HMpioNigvIdcrahuIsE5G26jy9zi7RM7pBkR1HvS7id2C/PHaPowxe5UTj oYNLK2dAAcn0pi6nNXMZ/+u8sQACFTVp6y9YF7kjCAUvXfd0GWKyKY9vNCsotkguksoh yfx8GADdB6Xs89bCmNXunCJezQIejAlejrZtEfpOq3EiOcNrG8JdgD21tSKGKrkicCDW QOVsevpX2hKtiUnNXHU9NgXrCZMiHnvGBBA/prrOBRSCGahT+PMTOQMLS40RAEyR4K8T lIog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=sj0gWaKf7F1u1yqYOnBP1Je+BdxFG+7SDe9DUcADRaE=; b=CHoYq+kXuMOG5dvVOc2YHS8S7DUTXdo77um2U/6EAw3Xgx8w4e8rBMWsrBT7Qimdar 3Ox0Z2/SR9YQ7tN2C8+RWsuyQpLqIDJc2kaQLl/ymoTToU1Walq0fbMk9u+tM8i47CKH oxqabcT8p0T67+2ehuFLty8JzWloGpEVGuWVHZtQZz3Wt64VPAy0Hl3IiRTRfcHp17Uy +TyL0wzev/nnVvFxstcaR7Ug9dEF3h515ehSdKUlsl8ZbCI2JXel89xAT/W8EuRfYL3z o4XfBIq8F1dIA9Y34u5qsNw6DcjpHnn219swGhdBHR9u2CHkNhCTVAMf0SSGRbiRKGLT qpcA== X-Gm-Message-State: APjAAAUWtfb1ekVhqD18l8Q+50rmnFv7lg4Z944RQXewzqyZW9il+q+F vtcADAu1gJhaowOWXNG6lEcQ4S9+ X-Google-Smtp-Source: APXvYqz07/5/z/AHZnieoApPT5Ag4jWdxp8fxrYz2XbO/i3kYpe4kaLS3nQKp1iC8yxopm28JW1SOw== X-Received: by 2002:a05:600c:490:: with SMTP id d16mr11996280wme.131.1571497868718; Sat, 19 Oct 2019 08:11:08 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 05/11] tests/boot_linux_console: Use Avocado archive::gzip_uncompress() Date: Sat, 19 Oct 2019 17:10:52 +0200 Message-Id: <20191019151058.31733-6-f4bug@amsat.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20191019151058.31733-1-f4bug@amsat.org> References: <20191019151058.31733-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::32f 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: Eduardo Habkost , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Aleksandar Markovic , Cleber Rosa , Aleksandar Rikalo , Aurelien Jarno Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Avocado 67.0 [*] introduced the avocado.utils.archive module which provides handling of gzip files. Use the gzip_uncompress() method. [*] https://avocado-framework.readthedocs.io/en/67.0/api/utils/avocado.util= s.html#avocado.utils.archive.gzip_uncompress Suggested-by: Cleber Rosa Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- v2: New patch replacing the gunzip() refactor --- tests/acceptance/boot_linux_console.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/tests/acceptance/boot_linux_console.py b/tests/acceptance/boot= _linux_console.py index 4b419b0559..67d7e96d98 100644 --- a/tests/acceptance/boot_linux_console.py +++ b/tests/acceptance/boot_linux_console.py @@ -145,10 +145,7 @@ class BootLinuxConsole(Test): initrd_hash =3D 'bf806e17009360a866bf537f6de66590de349a99' initrd_path_gz =3D self.fetch_asset(initrd_url, asset_hash=3Dinitr= d_hash) initrd_path =3D self.workdir + "rootfs.cpio" - - with gzip.open(initrd_path_gz, 'rb') as f_in: - with open(initrd_path, 'wb') as f_out: - shutil.copyfileobj(f_in, f_out) + archive.gzip_uncompress(initrd_path_gz, initrd_path) =20 self.vm.set_machine('malta') self.vm.set_console() --=20 2.21.0 From nobody Wed Nov 12 15:02:46 2025 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; dkim=fail; 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=1571498037; cv=none; d=zoho.com; s=zohoarc; b=fPnbfpQgz+oYjZB7g9wDjOR8i9dX6WQI4/f3PYBAY+AM/YV2xAqrpx/2H8l85rHcn9JbTI0pHiI7/T+2n05Ia29BHCjdgFn5XHruh6MvWEBvN2zY6pd57oeQ1t1k7sWp7RrF/C/cjGqTLTol0lx6QlRzatPGMxraJMEcxogp8JA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1571498037; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=QBTrUBOd5GMcqdYIUb+wluk81oA9TycjHbQQeiTj8kE=; b=hGFGUcpWRPcjhOBn5juxFF//RN/ezzz1Cgs4UQxQqCyjm6qpoMJlgQxOBgMSwwmJnOl8mE2q/nlEULD5mn3LsRLbWQ5RQwOfHpUpgayc9z8Eq/C6wQVTbEkxucCJdrZ/k0DtNvIqSRRBzN4qabNq6ekR15T0AWBbbyeesBjlV08= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; 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 1571498037599325.0405696749797; Sat, 19 Oct 2019 08:13:57 -0700 (PDT) Received: from localhost ([::1]:56538 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iLqQW-000330-6O for importer@patchew.org; Sat, 19 Oct 2019 11:13:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45695) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iLqNt-0001G5-8v for qemu-devel@nongnu.org; Sat, 19 Oct 2019 11:11:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iLqNr-000720-JC for qemu-devel@nongnu.org; Sat, 19 Oct 2019 11:11:13 -0400 Received: from mail-wr1-x444.google.com ([2a00:1450:4864:20::444]:35802) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iLqNr-000713-9T for qemu-devel@nongnu.org; Sat, 19 Oct 2019 11:11:11 -0400 Received: by mail-wr1-x444.google.com with SMTP id l10so8774599wrb.2 for ; Sat, 19 Oct 2019 08:11:11 -0700 (PDT) Received: from x1w.redhat.com (14.red-88-21-201.staticip.rima-tde.net. [88.21.201.14]) by smtp.gmail.com with ESMTPSA id t13sm10753964wra.70.2019.10.19.08.11.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 19 Oct 2019 08:11:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=QBTrUBOd5GMcqdYIUb+wluk81oA9TycjHbQQeiTj8kE=; b=c/+gGNPi6rALWQeGTOOfJ7tWIfXb1oAb+fxPcUiEPZCZsPYKE0gWzyb7/ueccBGaZV iW7x0zg1pwzsCkw/KoQi/PPP+PunyuUr531UZToojcfPuAynA7qCM19WSeg+TlAwVabw WB07dR+auP0dXV7KMGhVfksgCYrSz7yQv43Ogp6OW8M55NT7S/zv+0M9KdLNUag8C3Z5 n7gKNwfF7qet/rqgVm/tH87SzFJBdQ9tsUi07uTD57nC7H+6NJm5FM7FWrxiixcTB0Fd TtL9HwJU96p1nvaixNjbSWcQrSdqWC7/Ymls9DYX6PCSiO1iV1wnPb8RjMoipG0USdbW LSZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=QBTrUBOd5GMcqdYIUb+wluk81oA9TycjHbQQeiTj8kE=; b=nLv4yaQE6JAQX54hT9mEL5vWYmCfTJzauQNF9mFHUeR/3i7RUIGnBp6cDGzSDwgqGP mirSz2hkguU16/aM7S+6C8HXeL/71GW/XN5biUsvHfOGYWDf1Mb4nX0IjWZ8iSG81YAG wWpYmZ7zR3ryqtwwRZnIsFUFV/Uv/6fZSAdXb0isOcf0S7+8n2aApLjuLYzWAV3EA4v2 GeKnpAWlrw+T3p1/SR5O+HpM1XOiu7Y3gTgkJdrb/KtO4sKhLklLhZhpvGg6dPNSth9o FgfWi74mV8Kp8enq/OMsVkeVKUd22fOOZiyJtVKEFRJ4vJzRcO9aRtw6np1cAh/HPT5Z fHrg== X-Gm-Message-State: APjAAAWSxo0WD6w8VKGdrS8sV71PDmgeQq++ioZIv+E4bixfneenArCv VVACXWla83kOuW1apc6Yv1K9sYxB X-Google-Smtp-Source: APXvYqyyRAJdAIW5ctdC309sfD8F6IQmrYnDw2gYNyS/1mGam0SgfQt0kzJ+3uJ58ZeNh7cK/HW5iw== X-Received: by 2002:a5d:6a02:: with SMTP id m2mr12385649wru.120.1571497869818; Sat, 19 Oct 2019 08:11:09 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 06/11] tests/boot_linux_console: Run BusyBox on 5KEc 64-bit cpu Date: Sat, 19 Oct 2019 17:10:53 +0200 Message-Id: <20191019151058.31733-7-f4bug@amsat.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20191019151058.31733-1-f4bug@amsat.org> References: <20191019151058.31733-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::444 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: Eduardo Habkost , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Aleksandar Markovic , Cleber Rosa , Aleksandar Rikalo , Aurelien Jarno Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) This tests boots a Linux kernel on a Malta machine up to a busybox shell on the serial console. Few commands are executed before halting the machine (via reboot). We use the Fedora 24 kernel extracted from the image at: https://fedoraproject.org/wiki/Architectures/MIPS and the initrd cpio image from the kerneltests project: https://kerneltests.org/ If MIPS is a target being built, "make check-acceptance" will automatically include this test by the use of the "arch:mips" tags. Alternatively, this test can be run using: $ avocado --show=3Dconsole run -t arch:mips64el tests/acceptance/boot_lin= ux_console.py console: [ 0.000000] Linux version 3.19.3.mtoman.20150408 (mtoman@debi= an-co3-1) (gcc version 5.0.0 20150316 (Red Hat 5.0.0-0.20) (GCC) ) #3 Wed A= pr 8 14:32:50 UTC 2015 console: [ 0.000000] Early serial console at I/O port 0x3f8 (options '= 38400n8') console: [ 0.000000] bootconsole [uart0] enabled console: [ 0.000000] CPU0 revision is: 00018900 (MIPS 5KE) console: [ 0.000000] Checking for the multiply/shift bug... no. console: [ 0.000000] Checking for the daddiu bug... no. [...] console: Boot successful. console: cat /proc/cpuinfo console: / # cat /proc/cpuinfo console: system type : MIPS Malta console: machine : Unknown console: processor : 0 console: cpu model : MIPS 5KE V0.0 console: : 1616.89 console: wait instruction : nouname -a console: microsecond timers : yes console: tlb_entries : 32 console: extra interrupt vector : yes console: hardware watchpoint : yes, count: 1, address/irw mask: [0x0ff= 8] console: isa : mips1 mips2 mips3 mips4 mips5 mips32r1 = mips32r2 mips64r1 mips64r2 console: ASEs implemented : console: shadow register sets : 1 console: kscratch registers : 0 console: package : 0 console: core : 0 console: VCED exceptions : not available console: VCEI exceptions : not available console: / # console: / # uname -a console: Linux buildroot 3.19.3.mtoman.20150408 #3 Wed Apr 8 14:32:50 UTC= 2015 mips64 GNU/Linux console: reboot console: / # console: / # reboot console: / # console: / # reboot: Restarting system PASS (7.04 s) JOB TIME : 7.20 s Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- tests/acceptance/boot_linux_console.py | 40 ++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/tests/acceptance/boot_linux_console.py b/tests/acceptance/boot= _linux_console.py index 67d7e96d98..e505a41eed 100644 --- a/tests/acceptance/boot_linux_console.py +++ b/tests/acceptance/boot_linux_console.py @@ -166,6 +166,46 @@ class BootLinuxConsole(Test): exec_command_and_wait_for_pattern(self, 'reboot', 'reboot: Restarting system= ') =20 + def test_mips64el_malta_5KEc_cpio(self): + """ + :avocado: tags=3Darch:mips64el + :avocado: tags=3Dmachine:malta + :avocado: tags=3Dendian:little + """ + kernel_url =3D ('https://github.com/philmd/qemu-testing-blob/' + 'raw/9ad2df38/mips/malta/mips64el/' + 'vmlinux-3.19.3.mtoman.20150408') + kernel_hash =3D '00d1d268fb9f7d8beda1de6bebcc46e884d71754' + kernel_path =3D self.fetch_asset(kernel_url, asset_hash=3Dkernel_h= ash) + initrd_url =3D ('https://github.com/groeck/linux-build-test/' + 'raw/8584a59e/rootfs/' + 'mipsel64/rootfs.mipsel64r1.cpio.gz') + initrd_hash =3D '1dbb8a396e916847325284dbe2151167' + initrd_path_gz =3D self.fetch_asset(initrd_url, algorithm=3D'md5', + asset_hash=3Dinitrd_hash) + initrd_path =3D self.workdir + "rootfs.cpio" + archive.gzip_uncompress(initrd_path_gz, initrd_path) + + self.vm.set_machine('malta') + self.vm.set_console() + kernel_command_line =3D (self.KERNEL_COMMON_COMMAND_LINE + + 'console=3DttyS0 console=3Dtty ' + + 'rdinit=3D/sbin/init noreboot') + self.vm.add_args('-cpu', '5KEc', + '-kernel', kernel_path, + '-initrd', initrd_path, + '-append', kernel_command_line, + '-no-reboot') + self.vm.launch() + wait_for_console_pattern(self, 'Boot successful.') + + exec_command_and_wait_for_pattern(self, 'cat /proc/cpuinfo', + 'MIPS 5KE') + exec_command_and_wait_for_pattern(self, 'uname -a', + '3.19.3.mtoman.20150408') + exec_command_and_wait_for_pattern(self, 'reboot', + 'reboot: Restarting system= ') + def do_test_mips_malta32el_nanomips(self, kernel_url, kernel_hash): kernel_path_xz =3D self.fetch_asset(kernel_url, asset_hash=3Dkerne= l_hash) kernel_path =3D self.workdir + "kernel" --=20 2.21.0 From nobody Wed Nov 12 15:02:46 2025 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; dkim=fail; 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=1571498189; cv=none; d=zoho.com; s=zohoarc; b=gvXvDpGXQ5ReluWisOFfNnpMhY5mRSkKmD05EPz8EkUywks61MBcMaW1bpVJopoSH1aJCtojzxWYDtVvMS1aX2tDoU/iA2fk83j9ky0EQDEh4rzwdDmPsHkzuB/UfIw1ywYMkRnxh9z+Cc65YBgN489OQVBjiJTgBknkuQWYk0E= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1571498189; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=8KsmRbilP8bTZKqxOfgUbDMH68hI/j6t6Vn/sO5YZF0=; b=O9d/ZzEmnHKUsVXhpP6TeHc6quawUuk71HdNoWGz2x7OGTOCYd/538adnDfYXY+HRV6SQl4Q6lZO1UozAHVJTvIMEXaGr9serkF/aKnl6bKbPcvg7hyNJf9w4c6N/LB4f7s+zawkVCGu3KiTBummwusahxnPMNuglPEsjdFI8Xo= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; 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 1571498189646762.7440260320553; Sat, 19 Oct 2019 08:16:29 -0700 (PDT) Received: from localhost ([::1]:56576 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iLqSy-0006Oq-0z for importer@patchew.org; Sat, 19 Oct 2019 11:16:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45717) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iLqNv-0001Gl-6R for qemu-devel@nongnu.org; Sat, 19 Oct 2019 11:11:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iLqNt-00073v-En for qemu-devel@nongnu.org; Sat, 19 Oct 2019 11:11:15 -0400 Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]:40887) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iLqNt-00071v-5R for qemu-devel@nongnu.org; Sat, 19 Oct 2019 11:11:13 -0400 Received: by mail-wr1-x429.google.com with SMTP id o28so9193399wro.7 for ; Sat, 19 Oct 2019 08:11:12 -0700 (PDT) Received: from x1w.redhat.com (14.red-88-21-201.staticip.rima-tde.net. [88.21.201.14]) by smtp.gmail.com with ESMTPSA id t13sm10753964wra.70.2019.10.19.08.11.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 19 Oct 2019 08:11:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=8KsmRbilP8bTZKqxOfgUbDMH68hI/j6t6Vn/sO5YZF0=; b=uznfB4XJD+NpZQv6j7m3WRlhlt5eDIhOdZEzz/XoSJGxlz02S0S73ZMhnsL+wlfw5B A//UiretDOPWmb3xO8qPaw5VTj8GcPc1JLmCIvrdy9v+UFe4K7F+MF2WXQDxozhrLC0p twJ+IKNoWChywO20NKuHwna5m6gyeHdEt3hd6GITncsrWptrEJ11BZbwF/8obZ/a/qww O1upyNJkbugzmvDCcmWGHLOlLVg2ri5LSGU2gzub83Bl/DHazxhTlTsYM0n2ceEyMcFZ 0iIRayUDRhCKO31/Omsadf8DfObXjE9mrb9lRgDS2UjcpagWsV98YDpkWYBFlTCOUF3w u1hQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=8KsmRbilP8bTZKqxOfgUbDMH68hI/j6t6Vn/sO5YZF0=; b=c4fg28p/AkEGFD79pYlA8luI2Ydxu0y3kE8Ip8KsnsYETPI15PsbQuqxQxSGUwRqd+ nW/jCLB2L7aAKW7K4JnUElZg25i19DdV2Us5+lHagjMJUkQmFZZ1PUQamCXazSU9gTBJ s+vzYcGkF6RsGN4Fx9L9j3fysrAVFhvxo2HPhboVu741Iyynx8WANYjs7o6g0cji382I mRKyQz6nhyF46lcR+QZiwujfVxKglZQwAUlsO8gci3zSz5JJMmet0NUP7lPgeH0vDuiy X5pTe1IgqoD1d28mMTHy1Qe+SNLNsE/6E7NFw83p3cAJMMZUOIrHV0yHrK42By/OiU4u ppgQ== X-Gm-Message-State: APjAAAUpgUQYXo//VWuxsjmOqrhFD7/vO46FuNEumUXlDJe+d26CEdQE 5l8lnsbzY/4yFcVn5Ae2Vcl7LZdj X-Google-Smtp-Source: APXvYqxFGrYIYyRQ9f/yO2mcZclEnvfgW0FnUoitnvbzAXWcjYb9PKWwr4f66Cb5/olfbTTtptghBA== X-Received: by 2002:adf:e80b:: with SMTP id o11mr12463828wrm.231.1571497870948; Sat, 19 Oct 2019 08:11:10 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 07/11] tests/ssh_linux_malta: Run tests using a snapshot image Date: Sat, 19 Oct 2019 17:10:54 +0200 Message-Id: <20191019151058.31733-8-f4bug@amsat.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20191019151058.31733-1-f4bug@amsat.org> References: <20191019151058.31733-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::429 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: Eduardo Habkost , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Aleksandar Markovic , Cleber Rosa , Aleksandar Rikalo , Aurelien Jarno Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) If a test fails, it can corrupt the underlying QCow2 image, making further tests failing. Fix this by running each test with a snapshot. Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- tests/acceptance/linux_ssh_mips_malta.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/acceptance/linux_ssh_mips_malta.py b/tests/acceptance/li= nux_ssh_mips_malta.py index ffbb06f846..27907e8fbd 100644 --- a/tests/acceptance/linux_ssh_mips_malta.py +++ b/tests/acceptance/linux_ssh_mips_malta.py @@ -90,7 +90,7 @@ class LinuxSSH(Test): self.vm.add_args('-no-reboot', '-kernel', kernel_path, '-append', kernel_command_line, - '-hda', image_path, + '-drive', 'file=3D%s,snapshot=3Don' % image_path, '-netdev', 'user,id=3Dvnet,hostfwd=3D:127.0.0.1:0= -:22', '-device', 'pcnet,netdev=3Dvnet') self.vm.launch() --=20 2.21.0 From nobody Wed Nov 12 15:02:46 2025 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; dkim=fail; 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=1571498411; cv=none; d=zoho.com; s=zohoarc; b=OhygxUTGHMZCFg4bEM4jMDgMFJstU8oO9g0B7TDx+hFO80BGkjpP/SNRgYe39xbmU8zUU3dU04iy+Bj1J28ex1ITQeu+gGEroz+RqTm0PQA2vut7Sc5+4GQ8ghepx9muIzvMF3QruNk4FKntRw0uR9759lC6TkXsgHZRlZxt2eo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1571498411; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=TPCN4WzRP9NgdoqPPa5MaOK6LcXOEN/F7yGRSMuex64=; b=b8d79MAUaL6pzmuMUHVDXknWTcGDBff82/ZvAWToYZTvL8AAWCjCheP4YzxQ7wO/kqKivn7b0fVOr21n/yeW2y32c9R6ru2tAvBU7lJ2czfM4+aQpXLjFyBBiBkuS8PLUY+GwX+xLOPN20cNYsDU2aGAffdAupyubsom5wCig1Y= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; 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 1571498411873192.54999817522219; Sat, 19 Oct 2019 08:20:11 -0700 (PDT) Received: from localhost ([::1]:56600 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iLqWV-00010p-HC for importer@patchew.org; Sat, 19 Oct 2019 11:20:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45750) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iLqNy-0001K7-UU for qemu-devel@nongnu.org; Sat, 19 Oct 2019 11:11:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iLqNw-00076v-Go for qemu-devel@nongnu.org; Sat, 19 Oct 2019 11:11:18 -0400 Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]:47029) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iLqNv-000737-2r for qemu-devel@nongnu.org; Sat, 19 Oct 2019 11:11:15 -0400 Received: by mail-wr1-x432.google.com with SMTP id o18so9162045wrv.13 for ; Sat, 19 Oct 2019 08:11:13 -0700 (PDT) Received: from x1w.redhat.com (14.red-88-21-201.staticip.rima-tde.net. [88.21.201.14]) by smtp.gmail.com with ESMTPSA id t13sm10753964wra.70.2019.10.19.08.11.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 19 Oct 2019 08:11:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=TPCN4WzRP9NgdoqPPa5MaOK6LcXOEN/F7yGRSMuex64=; b=QrljT+rLXqxtXjjqr2jqgDhboow+xDi+HX7BCD8jip2wcgB1HpVYEYRrj1NN7SInyx VQQLrLL9aWp7uy7UG8uw7G2+9t3rOlmGKZRjy867iOs/cJ86vZCL233ia6vJr7htu+CW FAdHm6DbbVIbFpHeTHTqlqWzUdUAy+AznNw8lHTLyE6nbY7aHJmgnukLAIq71vvQWrqF Y9B/hNdyz/GwKEgn2ZQhj+c49mn9WPSBdSZgnjdPUqVLlP8dkeA+M88BIVtKyHzdcr4t 2cq18x3A15KHwMF2G5jNqJYnA6rPD2MGPhB43kyhDT/XHXeTQkyeTJRFZ1jztMas/H8Z 1Gew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=TPCN4WzRP9NgdoqPPa5MaOK6LcXOEN/F7yGRSMuex64=; b=oTfroLrLFYwMI1AsoQezCpq38Yf7qL11lbxttt+ceJmoNYlei1agMawDZ0WxX+ssQA Ci7nGG1Z39R7vWCNjBr3IvLQFmr4Jt4Ysold3cwJjs6/P2y5xkO1L9Rslinf/8Nt9eoY /k7GbtAJLqSPb7e/09mmaz8VkPEyIADQ+WGoiejeU31TW9QpfPzdw0+85xpL6Uv1Muig 31qxk0YfsDFswj3PYiOicMy1viLYjp7DiTMUj+LS1WhB6QP/nIZV2RPX7aInasj4magu 5jQWr6n+zFLZPIk+7PELNHiQjkbBOnEExCAQlByMi/3G1e/GgBMLzjeG6Gc0UXfbsWWI RXRw== X-Gm-Message-State: APjAAAU6l5mUHRnUrJmS51e5uiBfhnKceweNSYD8YDVlwZbc20UZzgmK vuo11YOrlEikCfmDMvz9AtB9O9Lo X-Google-Smtp-Source: APXvYqxxb0nvh13WvknQ0RolSLJqlKenf7402wPCALlNQBs7hbYNSDlKGbF5r8FEgRs59n5CkWik/A== X-Received: by 2002:a5d:67c5:: with SMTP id n5mr12723221wrw.72.1571497872234; Sat, 19 Oct 2019 08:11:12 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 08/11] tests/ssh_linux_malta: Remove duplicated test Date: Sat, 19 Oct 2019 17:10:55 +0200 Message-Id: <20191019151058.31733-9-f4bug@amsat.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20191019151058.31733-1-f4bug@amsat.org> References: <20191019151058.31733-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::432 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: Eduardo Habkost , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Aleksandar Markovic , Cleber Rosa , Aleksandar Rikalo , Aurelien Jarno Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Remove duplicated test (probably copy/paste error in commit 9090d3332cdcc). Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- tests/acceptance/linux_ssh_mips_malta.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/tests/acceptance/linux_ssh_mips_malta.py b/tests/acceptance/li= nux_ssh_mips_malta.py index 27907e8fbd..5523ae2144 100644 --- a/tests/acceptance/linux_ssh_mips_malta.py +++ b/tests/acceptance/linux_ssh_mips_malta.py @@ -140,9 +140,6 @@ class LinuxSSH(Test): self.ssh_command_output_contains( 'cat /proc/interrupts', 'eth0') - self.ssh_command_output_contains( - 'cat /proc/interrupts', - 'eth0') self.ssh_command_output_contains( 'cat /proc/devices', 'input') --=20 2.21.0 From nobody Wed Nov 12 15:02:46 2025 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; dkim=fail; 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=1571498567; cv=none; d=zoho.com; s=zohoarc; b=c4rELpkMS39O8xoxltXhUfREqz1UxkiIwFYoZmHDhUQbp3dWzYdcRIWF/5moROyeOc2leqrWdpaa6+9uUbwUBcGuy3MBWhFzX799yzAbmke6aN+CwD+91cN67HL6WdgP3JPX3XnX//PgYHSmLa1WVDkvUL5Z9kV2mmEF7UjRYS4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1571498567; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=V7O/r4jTySGSLTjP6nvBKNHUVX0/r7KaAP+5isYafiU=; b=iXcL7ajY/Ny8vggK6I5ukJjysxOxfGibQcWnrAyalND1pHJkythdYcL1iWYpaAtSnLSPmmJ9FpNyQdmbo+TEAwMETEuS7QFiYz07p4Qm0oxHSM6V+auLxOwmZNJKWQXZpvq092YUWnWwYwHurqqSpolvW78yZCNETENrkA5ct/o= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; 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 1571498567409469.466973912693; Sat, 19 Oct 2019 08:22:47 -0700 (PDT) Received: from localhost ([::1]:56634 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iLqZ4-0003Su-Bo for importer@patchew.org; Sat, 19 Oct 2019 11:22:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45752) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iLqNz-0001KB-16 for qemu-devel@nongnu.org; Sat, 19 Oct 2019 11:11:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iLqNw-00076q-Gg for qemu-devel@nongnu.org; Sat, 19 Oct 2019 11:11:18 -0400 Received: from mail-wr1-x443.google.com ([2a00:1450:4864:20::443]:34028) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iLqNv-00074p-26 for qemu-devel@nongnu.org; Sat, 19 Oct 2019 11:11:15 -0400 Received: by mail-wr1-x443.google.com with SMTP id t16so4060028wrr.1 for ; Sat, 19 Oct 2019 08:11:14 -0700 (PDT) Received: from x1w.redhat.com (14.red-88-21-201.staticip.rima-tde.net. [88.21.201.14]) by smtp.gmail.com with ESMTPSA id t13sm10753964wra.70.2019.10.19.08.11.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 19 Oct 2019 08:11:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=V7O/r4jTySGSLTjP6nvBKNHUVX0/r7KaAP+5isYafiU=; b=GCb2jPfVwVKi5lHREKLUegIzMfFr6BROmCF3ZMRXVu2+ZPz18Bv8Gt0vmu/yNENGX/ r/YG+zU3XyhI1s2DQOWHXjSxgZj6POAZrLfXgTKUR+aKj+uH0P2w4LtOme1CvEQ1BGIn ROobjW7S08DyuN6XriqXTYCTvun9nO+/Yb8Gbh0EmNT+vKWRMHhPMtfonOnvu0Nu2y3b maSHStyTEgft5eETUUDea7zDUFtaPqbrYEvS87goXnXZPYafyHYk+tBBtcsPD1wa3Oe9 uCzYoF+kQ0Fv8DZpom8h1Z8HDUAofW1m6ovoc2FRaSpayzK0zlkXwvQZhoUYKMnOT+rF 0+GA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=V7O/r4jTySGSLTjP6nvBKNHUVX0/r7KaAP+5isYafiU=; b=RT/i5qy1pFOsHT8eImDBqHT9UMeSjRKAa6UaOsme2y90xrybhIrm/WNtMgxkynAbR4 wQKXD/05LGedY0CuyvYp77a27/uY51Qp8uXnIPX0Zgnvs2qIAdeM2MkxftFmL+il0trB 4bnACjmVGjZCxxN7XpHEVdcWWQeJ3QgAp05zZkU44CssG/mu7LvbfNRNbrL8Bx4mArWR X2RiUsK4yQUz+8PhX74qH1RXbg0RCZahrJufgW+llvBwR/Q3XzmWZYLd790QAth/EeqO bjregkXwh0q0EVNfyr8lYn8l7HFlYe1B6TEBeji4by7IvlauBQRI7NWRwBBvACpOM6rp BhBw== X-Gm-Message-State: APjAAAVPMvsJf+mjdr+1BZuNH/uVmEMRdxQyeG5uYyDB4wVBA+SKovvR NqLYrnS4j59EEy+fgiD/pkm/muo/ X-Google-Smtp-Source: APXvYqxzAytrZVGQk2X5AQfaHGRA5yQ5qgJ6rszPBY5Yg8t+WGcPPaFHfyzMdu4fEaVhl3TWvejV0A== X-Received: by 2002:a5d:5705:: with SMTP id a5mr12638997wrv.112.1571497873813; Sat, 19 Oct 2019 08:11:13 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 09/11] tests/ssh_linux_malta: Match stricter console output Date: Sat, 19 Oct 2019 17:10:56 +0200 Message-Id: <20191019151058.31733-10-f4bug@amsat.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20191019151058.31733-1-f4bug@amsat.org> References: <20191019151058.31733-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::443 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: Eduardo Habkost , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Aleksandar Markovic , Cleber Rosa , Aleksandar Rikalo , Aurelien Jarno Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Match on stricter console output. Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- tests/acceptance/linux_ssh_mips_malta.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/tests/acceptance/linux_ssh_mips_malta.py b/tests/acceptance/li= nux_ssh_mips_malta.py index 5523ae2144..822b0553ff 100644 --- a/tests/acceptance/linux_ssh_mips_malta.py +++ b/tests/acceptance/linux_ssh_mips_malta.py @@ -127,19 +127,19 @@ class LinuxSSH(Test): '3.2.0-4-4kc-malta') self.ssh_command_output_contains( 'cat /proc/interrupts', - 'timer') + 'XT-PIC timer') self.ssh_command_output_contains( 'cat /proc/interrupts', - 'i8042') + 'XT-PIC i8042') self.ssh_command_output_contains( 'cat /proc/interrupts', - 'serial') + 'XT-PIC serial') self.ssh_command_output_contains( 'cat /proc/interrupts', - 'ata_piix') + 'XT-PIC ata_piix') self.ssh_command_output_contains( 'cat /proc/interrupts', - 'eth0') + 'XT-PIC eth0') self.ssh_command_output_contains( 'cat /proc/devices', 'input') @@ -151,13 +151,13 @@ class LinuxSSH(Test): 'fb') self.ssh_command_output_contains( 'cat /proc/ioports', - 'serial') + ' : serial') self.ssh_command_output_contains( 'cat /proc/ioports', - 'ata_piix') + ' : ata_piix') self.ssh_command_output_contains( 'cat /proc/ioports', - 'piix4_smbus') + ' : piix4_smbus') self.ssh_command_output_contains( 'lspci -d 11ab:4620', 'GT-64120') @@ -167,7 +167,7 @@ class LinuxSSH(Test): self.ssh_command_output_contains( 'cat /proc/mtd', 'YAMON') - # Empty 'Board Config' + # Empty 'Board Config' (64KB) self.ssh_command_output_contains( 'md5sum /dev/mtd2ro', '0dfbe8aa4c20b52e1b8bf3cb6cbdf193') --=20 2.21.0 From nobody Wed Nov 12 15:02:46 2025 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; dkim=fail; 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=1571498568; cv=none; d=zoho.com; s=zohoarc; b=USybf5O1zGjPp8ov8HIZLzG3h186JZ7DYJ9CtO+URWcUKfn+pzLkjvEA1JZe+ePahknXvB2rO9IBxKukqiSpnsaufUgMMiI7gLZAKKlubPTS71H2uu3KN1FMiOOWHrYl88I2GSLX5loQwknbf2OhG/2D7KJWQUuidovqVYAxd8Q= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1571498568; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=IrxCFtZN7IWMU6h2qOEBlnQRpVoXjxguCXHm8vL6MOI=; b=fehNZZbqFfYRcoARZC9W235kaw+jIKyoz6wnZZTr5hsOBc4BWQkrC9+1u7NdIJzWp35IQJK0WetStGFAqyC3NmZZp733lDigd0ego/dr3QZqI+abtLvHclRU23tpkmHQPcKD+hGXEQWIqAZ9hTpy3ZcjIC8zWAq8ybHaa3GoEi8= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; 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 1571498568076673.8797296735821; Sat, 19 Oct 2019 08:22:48 -0700 (PDT) Received: from localhost ([::1]:56637 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iLqZ4-0003Vc-Vo for importer@patchew.org; Sat, 19 Oct 2019 11:22:47 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45751) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iLqNy-0001KA-SS for qemu-devel@nongnu.org; Sat, 19 Oct 2019 11:11:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iLqNw-00077H-VN for qemu-devel@nongnu.org; Sat, 19 Oct 2019 11:11:18 -0400 Received: from mail-wr1-x441.google.com ([2a00:1450:4864:20::441]:43872) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iLqNw-00075w-Fp for qemu-devel@nongnu.org; Sat, 19 Oct 2019 11:11:16 -0400 Received: by mail-wr1-x441.google.com with SMTP id c2so3948662wrr.10 for ; Sat, 19 Oct 2019 08:11:16 -0700 (PDT) Received: from x1w.redhat.com (14.red-88-21-201.staticip.rima-tde.net. [88.21.201.14]) by smtp.gmail.com with ESMTPSA id t13sm10753964wra.70.2019.10.19.08.11.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 19 Oct 2019 08:11:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=IrxCFtZN7IWMU6h2qOEBlnQRpVoXjxguCXHm8vL6MOI=; b=Kbe6W6HmdS+fWJQDjRBnkcyA22Z71off/MNopVmr33yzT/vr3VDiUEChO9R4faNU2w foK9Eu+onYZw9llsLkml6R7KJuWYyFZRxk1s427pStiv29LQ6tB8VC1QDu06W9obpF42 KwTQKEZkIc7bnl2aA+C5Czt9Z48Ga/sY89gxNJsq7fx8hpwUbCvWbxvDRccHgI4Uum6l M/fZQTh6qgQCGiTrgtV4Mh7SDZ1fQ6DTc9SjbqGcCMwhsWo9+ArfW6Yd2WfTGw/6+Oco qFEqmsdrISx0JagmVcUfgb9+gV9uGjdjXgjAi1SXOO24avsZOQRWn7JeixrrtpRVoCpQ 2Riw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=IrxCFtZN7IWMU6h2qOEBlnQRpVoXjxguCXHm8vL6MOI=; b=EiteRxy4YqjfgxN+QdMRzkFu9RzzU+PvEDtgfEV1OfjJTL6t8euhY5h3fF04SEWMvF azVFqBnUu/bo3qGq2DrMoQ7OaDyoNjUwbjDQXdf3SbIAnZ4A851X/JPSgGVhISm94vQe Y2FmFU+hUiJM+h8yY1+d/WF8QdMqe3cA7mWWrDbOHbvWvsUTgoSL5MEO+jLEBiw70Ika pCS6wTGG9TpCV4Ny5oJfL1JNX1amUAYnFXX3lbc6SeZ1FUFfRoJbJ0V6XOe4C/KpLM4B Hwu3n4nWe0NOeZ6CrfIA1Yd2LS3aRXhFqM6QHrlL54IH26m/xoD6S0eGQnfOVTk2Ey+T nmJQ== X-Gm-Message-State: APjAAAWsEggzHszBy4CtAGOHbkoeNuYOqggc2PnqX8WtYVn2x4BJtoVU 5jITIkn49raC8+wm3oxxxjQKbvnS X-Google-Smtp-Source: APXvYqzIqkc1+/1rmHXfLUTaYeNF7Q9ko6dkLFDuG0FA2P7sMdWLUgTSnjjbc/wfrniQRBJAeItUow== X-Received: by 2002:adf:a506:: with SMTP id i6mr11985631wrb.159.1571497874934; Sat, 19 Oct 2019 08:11:14 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 10/11] tests/ssh_linux_malta: Refactor how to get image/kernel info Date: Sat, 19 Oct 2019 17:10:57 +0200 Message-Id: <20191019151058.31733-11-f4bug@amsat.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20191019151058.31733-1-f4bug@amsat.org> References: <20191019151058.31733-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::441 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: Eduardo Habkost , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Aleksandar Markovic , Cleber Rosa , Aleksandar Rikalo , Aurelien Jarno Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) The qcow and kernel images use a similar pattern regarding they are for big/little endianess, or 32/64 bit. Refactor using more dictionary keys. Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- tests/acceptance/linux_ssh_mips_malta.py | 75 ++++++++++++++---------- 1 file changed, 44 insertions(+), 31 deletions(-) diff --git a/tests/acceptance/linux_ssh_mips_malta.py b/tests/acceptance/li= nux_ssh_mips_malta.py index 822b0553ff..2139c80f5f 100644 --- a/tests/acceptance/linux_ssh_mips_malta.py +++ b/tests/acceptance/linux_ssh_mips_malta.py @@ -26,15 +26,44 @@ class LinuxSSH(Test): KERNEL_COMMON_COMMAND_LINE =3D 'printk.time=3D0 ' VM_IP =3D '127.0.0.1' =20 + BASE_URL =3D 'https://people.debian.org/~aurel32/qemu/' IMAGE_INFO =3D { - 'be': {'image_url': ('https://people.debian.org/~aurel32/qemu/mips= /' - 'debian_wheezy_mips_standard.qcow2'), - 'image_hash': '8987a63270df67345b2135a6b7a4885a35e392d5'}, - 'le': {'image_url': ('https://people.debian.org/~aurel32/qemu/mips= el/' - 'debian_wheezy_mipsel_standard.qcow2'), - 'image_hash': '7866764d9de3ef536ffca24c9fb9f04ffdb45802'} + 'be': {'base_url': 'mips', + 'image_name': 'debian_wheezy_mips_standard.qcow2', + 'image_hash': '8987a63270df67345b2135a6b7a4885a35e392d5', + 'kernel_hash': { + 32: '592e384a4edc16dade52a6cd5c785c637bcbc9ad', + 64: 'db6eea7de35d36c77d8c165b6bcb222e16eb91db'} + }, + 'le': {'base_url': 'mipsel', + 'image_name': 'debian_wheezy_mipsel_standard.qcow2', + 'image_hash': '7866764d9de3ef536ffca24c9fb9f04ffdb45802', + 'kernel_hash': { + 32: 'a66bea5a8adaa2cb3d36a1d4e0ccdb01be8f6c2a', + 64: '6a7f77245acf231415a0e8b725d91ed2f3487794'} + } + } + CPU_INFO =3D { + 32: {'kernel_release': '3.2.0-4-4kc-malta'}, + 64: {'kernel_release': '3.2.0-4-5kc-malta'} } =20 + def get_url(self, endianess, path=3D''): + qkey =3D {'le': 'el', 'be': ''} + return '%s/mips%s/%s' % (self.BASE_URL, qkey[endianess], path) + + def get_image_info(self, endianess): + dinfo =3D self.IMAGE_INFO[endianess] + image_url =3D self.get_url(endianess, dinfo['image_name']) + image_hash =3D dinfo['image_hash'] + return (image_url, image_hash) + + def get_kernel_info(self, endianess, wordsize): + minfo =3D self.CPU_INFO[wordsize] + kernel_url =3D self.get_url(endianess, + 'vmlinux-%s' % minfo['kernel_release']) + kernel_hash =3D self.IMAGE_INFO[endianess]['kernel_hash'][wordsize] + return kernel_url, kernel_hash =20 @skipUnless(ssh.SSH_CLIENT_BINARY, 'No SSH client available') @skipUnless(os.getenv('AVOCADO_TIMEOUT_EXPECTED'), 'Test might timeout= ') @@ -79,8 +108,7 @@ class LinuxSSH(Test): return stdout_lines, stderr_lines =20 def boot_debian_wheezy_image_and_ssh_login(self, endianess, kernel_pat= h): - image_url =3D self.IMAGE_INFO[endianess]['image_url'] - image_hash =3D self.IMAGE_INFO[endianess]['image_hash'] + image_url, image_hash =3D self.get_image_info(endianess) image_path =3D self.fetch_asset(image_url, asset_hash=3Dimage_hash) =20 self.vm.set_machine('malta') @@ -172,7 +200,10 @@ class LinuxSSH(Test): 'md5sum /dev/mtd2ro', '0dfbe8aa4c20b52e1b8bf3cb6cbdf193') =20 - def check_mips_malta(self, endianess, kernel_path, uname_m): + def check_mips_malta(self, uname_m, endianess): + wordsize =3D 64 if '64' in uname_m else 32 + kernel_url, kernel_hash =3D self.get_kernel_info(endianess, wordsi= ze) + kernel_path =3D self.fetch_asset(kernel_url, asset_hash=3Dkernel_h= ash) self.boot_debian_wheezy_image_and_ssh_login(endianess, kernel_path) =20 stdout, _ =3D self.ssh_command('uname -a') @@ -188,12 +219,7 @@ class LinuxSSH(Test): :avocado: tags=3Dendian:big :avocado: tags=3Ddevice:pcnet32 """ - kernel_url =3D ('https://people.debian.org/~aurel32/qemu/mips/' - 'vmlinux-3.2.0-4-4kc-malta') - kernel_hash =3D '592e384a4edc16dade52a6cd5c785c637bcbc9ad' - kernel_path =3D self.fetch_asset(kernel_url, asset_hash=3Dkernel_h= ash) - - self.check_mips_malta('be', kernel_path, 'mips') + self.check_mips_malta('mips', 'be') =20 def test_mips_malta32el_kernel3_2_0(self): """ @@ -202,12 +228,7 @@ class LinuxSSH(Test): :avocado: tags=3Dendian:little :avocado: tags=3Ddevice:pcnet32 """ - kernel_url =3D ('https://people.debian.org/~aurel32/qemu/mipsel/' - 'vmlinux-3.2.0-4-4kc-malta') - kernel_hash =3D 'a66bea5a8adaa2cb3d36a1d4e0ccdb01be8f6c2a' - kernel_path =3D self.fetch_asset(kernel_url, asset_hash=3Dkernel_h= ash) - - self.check_mips_malta('le', kernel_path, 'mips') + self.check_mips_malta('mips', 'le') =20 def test_mips_malta64eb_kernel3_2_0(self): """ @@ -216,11 +237,7 @@ class LinuxSSH(Test): :avocado: tags=3Dendian:big :avocado: tags=3Ddevice:pcnet32 """ - kernel_url =3D ('https://people.debian.org/~aurel32/qemu/mips/' - 'vmlinux-3.2.0-4-5kc-malta') - kernel_hash =3D 'db6eea7de35d36c77d8c165b6bcb222e16eb91db' - kernel_path =3D self.fetch_asset(kernel_url, asset_hash=3Dkernel_h= ash) - self.check_mips_malta('be', kernel_path, 'mips64') + self.check_mips_malta('mips64', 'be') =20 def test_mips_malta64el_kernel3_2_0(self): """ @@ -229,8 +246,4 @@ class LinuxSSH(Test): :avocado: tags=3Dendian:little :avocado: tags=3Ddevice:pcnet32 """ - kernel_url =3D ('https://people.debian.org/~aurel32/qemu/mipsel/' - 'vmlinux-3.2.0-4-5kc-malta') - kernel_hash =3D '6a7f77245acf231415a0e8b725d91ed2f3487794' - kernel_path =3D self.fetch_asset(kernel_url, asset_hash=3Dkernel_h= ash) - self.check_mips_malta('le', kernel_path, 'mips64') + self.check_mips_malta('mips64', 'le') --=20 2.21.0 From nobody Wed Nov 12 15:02:46 2025 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; dkim=fail; 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=1571498685; cv=none; d=zoho.com; s=zohoarc; b=llsBraIJw9Zlqr/62M6RYapfT1zhV16HSruG41hKQL1N8l314y8pPQyZG4wsYXUbojGmxuyeyYAcPRBIJfCiEki011JhiJ8JwZczdqd4z/Kr8jEhL9ExCdS+YGamdi2Dcn1vqUgiM2U7n7Dd/iD5HXMPY93x73dnie0ZDjkI6w0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1571498685; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=CMHbwukv5zQAWHD/pJCrE6K07x6qMk4wAjcROnJyKl4=; b=A37pQ/MdDmqo4GKhtTBCpcadQcz6QUOQ44iET7bYS+V7XB0TPdpIivj3XqX2ZFJsIc298AmCjoTmzuLzHKMG3gTcHz2MtTArhY75WFRCmKS4OVM3NGAXUmeCyEgKwEILTf0JfRYjNuvsMuPVn9LXITaWrC2xJbT9gflChD2CR08= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; 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 1571498685367260.4194477591932; Sat, 19 Oct 2019 08:24:45 -0700 (PDT) Received: from localhost ([::1]:56666 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iLqay-00066S-93 for importer@patchew.org; Sat, 19 Oct 2019 11:24:44 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45785) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iLqO2-0001Le-1y for qemu-devel@nongnu.org; Sat, 19 Oct 2019 11:11:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iLqNy-00079j-Vf for qemu-devel@nongnu.org; Sat, 19 Oct 2019 11:11:21 -0400 Received: from mail-wm1-x344.google.com ([2a00:1450:4864:20::344]:40041) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iLqNy-000781-Ph for qemu-devel@nongnu.org; Sat, 19 Oct 2019 11:11:18 -0400 Received: by mail-wm1-x344.google.com with SMTP id b24so8705795wmj.5 for ; Sat, 19 Oct 2019 08:11:17 -0700 (PDT) Received: from x1w.redhat.com (14.red-88-21-201.staticip.rima-tde.net. [88.21.201.14]) by smtp.gmail.com with ESMTPSA id t13sm10753964wra.70.2019.10.19.08.11.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 19 Oct 2019 08:11:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=CMHbwukv5zQAWHD/pJCrE6K07x6qMk4wAjcROnJyKl4=; b=jEd3lqnZjZNfaLbSqhh/xZ+Adzq0FR8zU5pnXOlsoAZ0qwZ6J6xdiyx70UfMV5Eu5d e2EyV2nBHbNOODEFMXTFFMePTgIrgIA2/QpoTCKpFaQrAcsWvoiIkyOh5G6KpHCOH07T 8V7txCphje+pBgXbpjs5nxCRdLtLRuNevM0JEiYbblXa2WycJPjo3Kj+BxepQI8/BRhO TIOpFiwa03d2mMF/j1ej0cOT8HLlC/yPhYdtaBzy9ozQDnLe53q+PNCeMKDrMB6IpPm3 im1gOhX/Ldeo1MKpUwIMwwXZL5Tgi8ScMcUocPeyNCnclEeS+VGgWrkwY47rZ6oSMzZx zV9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=CMHbwukv5zQAWHD/pJCrE6K07x6qMk4wAjcROnJyKl4=; b=cPcizymUnqUPsZyf/YNHt5CixsnLoJZ/aUc6l0AZsK9ok+5yzUjssZxRgsx3YROVdY kne5XclKrfCT/D4hU4Yg/ZH8Wo0eeh6+UCIot8LOrFB8hDEP7NP0oF6dtF86eYD2M0AD eKMw3P18Iw1arCxL95M4fT46efdFuLCGac8gLP4Qn1W5uyRiHGrA0Jb9yBmiQgUBCf1A Tzjfpf/BEr7ByS+u4bN4gECfqU86CUlxPkf1tyr7BMOnd33Sb9LCu9/r5DOytQYTvgHo EvTwppbViz8WJucoapoTgqNmbWaoqAFac5NhRap5m+6g7dpCgl1QsZ30Cf34ClrMH96m 4EYQ== X-Gm-Message-State: APjAAAWHFmlztsW610VCy/XPZO19vVP+nOK2xYqGWOu4Q7mUkTk1KCx7 xKS8bUImqU/6kUX2jYDlqDhmR8sY X-Google-Smtp-Source: APXvYqwwy8+KD+Jxhdw9k+A5Fm2luaAhvyJmgYeJFPVWAdVlkcH+SHK3zZRcRZSUEAkEvLo50G3x2w== X-Received: by 2002:a7b:c849:: with SMTP id c9mr12265293wml.58.1571497876661; Sat, 19 Oct 2019 08:11:16 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 11/11] tests/ssh_linux_malta: Fix 64-bit target tests Date: Sat, 19 Oct 2019 17:10:58 +0200 Message-Id: <20191019151058.31733-12-f4bug@amsat.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20191019151058.31733-1-f4bug@amsat.org> References: <20191019151058.31733-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::344 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: Eduardo Habkost , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Aleksandar Markovic , Cleber Rosa , Aleksandar Rikalo , Aurelien Jarno Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Commit 9090d3332cdcc added tests for specific to the 32-bit machines, which inadvertently make the 64-bit tests failing. Now than we have this information available in the CPU_INFO array, use it to have the 64-bit tests back. Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- .mailmap | 1 + tests/acceptance/linux_ssh_mips_malta.py | 12 ++++++------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.mailmap b/.mailmap index 0756a0bf66..fb7d7ede76 100644 --- a/.mailmap +++ b/.mailmap @@ -158,3 +158,4 @@ Zhengui Li Zhenwei Pi Zhenwei Pi Zhuang Yanying +Aleksandar Rikalo diff --git a/tests/acceptance/linux_ssh_mips_malta.py b/tests/acceptance/li= nux_ssh_mips_malta.py index 2139c80f5f..fc13f9e4d4 100644 --- a/tests/acceptance/linux_ssh_mips_malta.py +++ b/tests/acceptance/linux_ssh_mips_malta.py @@ -44,8 +44,8 @@ class LinuxSSH(Test): } } CPU_INFO =3D { - 32: {'kernel_release': '3.2.0-4-4kc-malta'}, - 64: {'kernel_release': '3.2.0-4-5kc-malta'} + 32: {'cpu': 'MIPS 24Kc', 'kernel_release': '3.2.0-4-4kc-malta'}, + 64: {'cpu': 'MIPS 20Kc', 'kernel_release': '3.2.0-4-5kc-malta'} } =20 def get_url(self, endianess, path=3D''): @@ -143,16 +143,16 @@ class LinuxSSH(Test): else: self.fail('"%s" output does not contain "%s"' % (cmd, exp)) =20 - def run_common_commands(self): + def run_common_commands(self, wordsize): self.ssh_command_output_contains( 'cat /proc/cpuinfo', - '24Kc') + self.CPU_INFO[wordsize]['cpu']) self.ssh_command_output_contains( 'uname -m', 'mips') self.ssh_command_output_contains( 'uname -r', - '3.2.0-4-4kc-malta') + self.CPU_INFO[wordsize]['kernel_release']) self.ssh_command_output_contains( 'cat /proc/interrupts', 'XT-PIC timer') @@ -209,7 +209,7 @@ class LinuxSSH(Test): stdout, _ =3D self.ssh_command('uname -a') self.assertIn(True, [uname_m + " GNU/Linux" in line for line in st= dout]) =20 - self.run_common_commands() + self.run_common_commands(wordsize) self.shutdown_via_ssh() =20 def test_mips_malta32eb_kernel3_2_0(self): --=20 2.21.0