From nobody Sat May 4 14:43:17 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; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1567024474; cv=none; d=zoho.com; s=zohoarc; b=cNIZnPTIFFkdyn3+nKBAUZl2KdxTlsbfkRVFN9V4YE51f94vov+7Vngy7fAI5Egu7yycdl6b52W9cdl/nOh0VnJwS4qSnJjORSNuypmiFp57rdVgkGCrz0hs8nZx43ehmttD1aBpY0p7oO4NzXaroWonQsmzgLc6NvGYdqn13Ik= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1567024474; 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:ARC-Authentication-Results; bh=3TrD26slFc4RFAjFUw6ftm1S/LIpxqJbajqfM4zFTck=; b=NlBwYewfZbaCcQnwkOdvVt8G5TSxffaH7ae5YX51g3hShfDDJmeZhdUmURcjaWCOkzP+zCGP6cc9wvJ1Rg7z877fPcRcZ9D9HBeVTn8sl9RbCJ+0NhPHLKiaDMRgdQtK80HM91EDvpPruBOTzmDJfyYmmWz9K+dbseg7QiNhl4o= 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; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1567024474847263.16869525905804; Wed, 28 Aug 2019 13:34:34 -0700 (PDT) Received: from localhost ([::1]:42464 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i34eG-0002gv-W2 for importer@patchew.org; Wed, 28 Aug 2019 16:34:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42065) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i33Xv-0004o4-O1 for qemu-devel@nongnu.org; Wed, 28 Aug 2019 15:23:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i33Xu-0002QY-EY for qemu-devel@nongnu.org; Wed, 28 Aug 2019 15:23:55 -0400 Received: from mx1.redhat.com ([209.132.183.28]:5806) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1i33Xu-0002PY-2x for qemu-devel@nongnu.org; Wed, 28 Aug 2019 15:23:54 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 5DA8A3084045; Wed, 28 Aug 2019 19:23:53 +0000 (UTC) Received: from localhost (ovpn-116-60.gru2.redhat.com [10.97.116.60]) by smtp.corp.redhat.com (Postfix) with ESMTP id B23B9100194E; Wed, 28 Aug 2019 19:23:43 +0000 (UTC) From: Eduardo Habkost To: Peter Maydell , qemu-devel@nongnu.org, Cleber Rosa Date: Wed, 28 Aug 2019 16:23:39 -0300 Message-Id: <20190828192340.14025-2-ehabkost@redhat.com> In-Reply-To: <20190828192340.14025-1-ehabkost@redhat.com> References: <20190828192340.14025-1-ehabkost@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.40]); Wed, 28 Aug 2019 19:23:53 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 1/2] BootLinuxSshTest: Only use 'test' for unittest.TestCase method names 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: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Aleksandar Markovic Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" From: Philippe Mathieu-Daud=C3=A9 In commit f6e501a28ef9, Eduardo started to use "check_" as a prefix for methods of similar purpose. Follow this prior art, since it might become the conventions when writting Avocado tests. Suggested-by: Cleber Rosa Signed-off-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <20190607174953.22342-1-philmd@redhat.com> Reviewed-by: Aleksandar Markovic Reviewed-by: Cleber Rosa Signed-off-by: Eduardo Habkost --- tests/acceptance/linux_ssh_mips_malta.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/acceptance/linux_ssh_mips_malta.py b/tests/acceptance/li= nux_ssh_mips_malta.py index aafb0c39f6..134f10cac3 100644 --- a/tests/acceptance/linux_ssh_mips_malta.py +++ b/tests/acceptance/linux_ssh_mips_malta.py @@ -162,7 +162,7 @@ class LinuxSSH(Test): self.assertIn(True, ["0dfbe8aa4c20b52e1b8bf3cb6cbdf193" in line for line in stdout]) =20 - def do_test_mips_malta(self, endianess, kernel_path, uname_m): + def check_mips_malta(self, endianess, kernel_path, uname_m): self.boot_debian_wheezy_image_and_ssh_login(endianess, kernel_path) =20 stdout, stderr =3D self.ssh_command('uname -a') @@ -184,7 +184,7 @@ class LinuxSSH(Test): kernel_hash =3D '592e384a4edc16dade52a6cd5c785c637bcbc9ad' kernel_path =3D self.fetch_asset(kernel_url, asset_hash=3Dkernel_h= ash) =20 - self.do_test_mips_malta('be', kernel_path, 'mips') + self.check_mips_malta('be', kernel_path, 'mips') =20 @skipIf(os.getenv('CONTINUOUS_INTEGRATION'), 'Running on Travis-CI') def test_mips_malta32el_kernel3_2_0(self): @@ -199,7 +199,7 @@ class LinuxSSH(Test): kernel_hash =3D 'a66bea5a8adaa2cb3d36a1d4e0ccdb01be8f6c2a' kernel_path =3D self.fetch_asset(kernel_url, asset_hash=3Dkernel_h= ash) =20 - self.do_test_mips_malta('le', kernel_path, 'mips') + self.check_mips_malta('le', kernel_path, 'mips') =20 @skipIf(os.getenv('CONTINUOUS_INTEGRATION'), 'Running on Travis-CI') def test_mips_malta64eb_kernel3_2_0(self): @@ -213,7 +213,7 @@ class LinuxSSH(Test): '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.do_test_mips_malta('be', kernel_path, 'mips64') + self.check_mips_malta('be', kernel_path, 'mips64') =20 @skipIf(os.getenv('CONTINUOUS_INTEGRATION'), 'Running on Travis-CI') def test_mips_malta64el_kernel3_2_0(self): @@ -227,4 +227,4 @@ class LinuxSSH(Test): '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.do_test_mips_malta('le', kernel_path, 'mips64') + self.check_mips_malta('le', kernel_path, 'mips64') --=20 2.21.0 From nobody Sat May 4 14:43:17 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; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1567023674; cv=none; d=zoho.com; s=zohoarc; b=bcVYVQRJNJSekprIN52QhuC0va8kuZvgxOgyLD8DDEz0B2t/opBLPC0SWi+WhpCJ1l0WhHlVRgFpz0LXN5OZBMGsxbCO0angynSmilOnnBTiB5FM+dkv1bYQz/CNSMzzsX7p6ZVOuTteTKZyyqR9PlhT0QvwO9czEjtJmIuNUwo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1567023674; h=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:ARC-Authentication-Results; bh=dLP/3DAAElCo26ld/tEvFK+UfIezxqB3GxIbd9X5Jx4=; b=QmbKLZ/88n4cSjVdsQYyoJTNkXAtAhj5ePI8wPhqMXTgUMS7As5cjpyKPyGKbH7l3haPlH6AEgvH5Yagxgg3hih+Y4Gm01vkhYEd4NeEAEM4vGEBFWtez5RJTADRxRpnlaYX1jkrhAa+C+puoSrBU2BgjS0p0GMd/zzNzewh8PE= 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; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1567023674216866.6307473911573; Wed, 28 Aug 2019 13:21:14 -0700 (PDT) Received: from localhost ([::1]:42232 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i34RM-0004bk-Rf for importer@patchew.org; Wed, 28 Aug 2019 16:21:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42084) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i33Xx-0004qP-B9 for qemu-devel@nongnu.org; Wed, 28 Aug 2019 15:23:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i33Xw-0002SR-8l for qemu-devel@nongnu.org; Wed, 28 Aug 2019 15:23:57 -0400 Received: from mx1.redhat.com ([209.132.183.28]:32345) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1i33Xw-0002RU-3L for qemu-devel@nongnu.org; Wed, 28 Aug 2019 15:23:56 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 4B8193061423; Wed, 28 Aug 2019 19:23:55 +0000 (UTC) Received: from localhost (ovpn-116-60.gru2.redhat.com [10.97.116.60]) by smtp.corp.redhat.com (Postfix) with ESMTP id D4EC160BEC; Wed, 28 Aug 2019 19:23:54 +0000 (UTC) From: Eduardo Habkost To: Peter Maydell , qemu-devel@nongnu.org, Cleber Rosa Date: Wed, 28 Aug 2019 16:23:40 -0300 Message-Id: <20190828192340.14025-3-ehabkost@redhat.com> In-Reply-To: <20190828192340.14025-1-ehabkost@redhat.com> References: <20190828192340.14025-1-ehabkost@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.45]); Wed, 28 Aug 2019 19:23:55 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 2/2] configure: more resilient Python version capture 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: Tony Nguyen Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" From: Cleber Rosa The current approach to capture the Python version is fragile, as it was demonstrated by a very specific build of Python 3 on Fedora 29 that, under non-interactive shells would print multiline version information. The (badly) stripped version output would be sent to config-host.mak, producing bad syntax and rendering the makefiles unusable. Now, the Python versions is printed by configure, but only a simple (and better controlled variable) indicating whether the build system is using Python 2 is kept on config-host.mak. Signed-off-by: Cleber Rosa Message-Id: <20190826155832.17427-1-crosa@redhat.com> Reviewed-by: Tony Nguyen Signed-off-by: Eduardo Habkost --- configure | 5 +++-- tests/Makefile.include | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/configure b/configure index e44e454c43..95134c0180 100755 --- a/configure +++ b/configure @@ -1864,7 +1864,7 @@ if ! $python -c 'import sys; sys.exit(sys.version_inf= o < (2,7))'; then fi =20 # Preserve python version since some functionality is dependent on it -python_version=3D$($python -V 2>&1 | sed -e 's/Python\ //') +python_version=3D$($python -c 'import sys; print("%d.%d.%d" % (sys.version= _info[0], sys.version_info[1], sys.version_info[2]))' 2>/dev/null) =20 # Suppress writing compiled files python=3D"$python -B" @@ -6511,6 +6511,7 @@ if ! $python -c 'import sys; sys.exit(sys.version_inf= o < (3,0))'; then echo echo "warning: Python 2 support is deprecated" >&2 echo "warning: Python 3 will be required for building future versions of= QEMU" >&2 + python2=3D"y" fi =20 config_host_mak=3D"config-host.mak" @@ -7333,7 +7334,7 @@ echo "INSTALL_DATA=3D$install -c -m 0644" >> $config_= host_mak echo "INSTALL_PROG=3D$install -c -m 0755" >> $config_host_mak echo "INSTALL_LIB=3D$install -c -m 0644" >> $config_host_mak echo "PYTHON=3D$python" >> $config_host_mak -echo "PYTHON_VERSION=3D$python_version" >> $config_host_mak +echo "PYTHON2=3D$python2" >> $config_host_mak echo "CC=3D$cc" >> $config_host_mak if $iasl -h > /dev/null 2>&1; then echo "IASL=3D$iasl" >> $config_host_mak diff --git a/tests/Makefile.include b/tests/Makefile.include index 49684fd4f4..f5ac09549c 100644 --- a/tests/Makefile.include +++ b/tests/Makefile.include @@ -1135,7 +1135,7 @@ TESTS_RESULTS_DIR=3D$(BUILD_DIR)/tests/results AVOCADO_SHOW=3Dapp AVOCADO_TAGS=3D$(patsubst %-softmmu,-t arch:%, $(filter %-softmmu,$(TARGET= _DIRS))) =20 -ifneq ($(findstring v2,"v$(PYTHON_VERSION)"),v2) +ifneq ($(PYTHON2),y) $(TESTS_VENV_DIR): $(TESTS_VENV_REQ) $(call quiet-command, \ $(PYTHON) -m venv --system-site-packages $@, \ --=20 2.21.0