From nobody Sun May 5 09:17:53 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1650451394; cv=none; d=zohomail.com; s=zohoarc; b=V7E9YPDt1pqcA8WwlJa7FEflxJ0Aaz9AFZ3Zf/pX8YwQpCc+MqAZFrZkkbVRIgfKRKbdMUaREkenrYkm3WwCr3Qa4e2mHdZSaPBVAU+QDH+oEV07Fxu9ZpDDXCkevOBFbHwlxER+OyKi+sZwfyuGM/XfdLfcwomwb775kuBbGcU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1650451394; 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=U3he8BPVcBZwYAkXE+Pbfk+t2R98jEgYsd9/j62x7FE=; b=ZeyL0u8bE4/MlyRCe4caDY2KLcJ/azqcXoxXsWTtHrRQjGjqechI7l/0YA1EoSWKuAx0j+n8R3NsCu4zQypb5fTz6XB9Kn+hhLwYDiJA90nonVCpQl/F3qhZf6812spTB2MT+CGyuzG8LTYwxEyjAJ2A8kUGApJGQPN5fvSAddY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 165045139475876.82491589673452; Wed, 20 Apr 2022 03:43:14 -0700 (PDT) Received: from localhost ([::1]:44214 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nh7nl-0002Do-F0 for importer@patchew.org; Wed, 20 Apr 2022 06:43:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58970) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nh7eG-0001Nt-Su for qemu-devel@nongnu.org; Wed, 20 Apr 2022 06:33:35 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:49323) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nh7eD-0006pn-F3 for qemu-devel@nongnu.org; Wed, 20 Apr 2022 06:33:23 -0400 Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-422--5wPFvJlMlumCJw6FrMcpg-1; Wed, 20 Apr 2022 06:33:17 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 40A71380673C; Wed, 20 Apr 2022 10:33:17 +0000 (UTC) Received: from thuth.com (unknown [10.39.195.200]) by smtp.corp.redhat.com (Postfix) with ESMTP id 84710C44AE1; Wed, 20 Apr 2022 10:33:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1650450800; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=U3he8BPVcBZwYAkXE+Pbfk+t2R98jEgYsd9/j62x7FE=; b=SzceZ0OolZf6eeIcSlI266Z7IoognlQubsUM+Ls+8PRndNeARfau0yRbKAlPHCM+4B1aJY brtLMzJNguoKS9ELKpJlvsjeVD1bCT7bgpQlUC1CqKQKzWIFmuIYrBLPhoAYboQRvALaqr bD2nl7E5FZK8DvVGa6B9QnUqVLxd1oM= X-MC-Unique: -5wPFvJlMlumCJw6FrMcpg-1 From: Thomas Huth To: qemu-devel@nongnu.org, Richard Henderson , Peter Maydell Subject: [PULL 1/7] tests: Drop perl-Test-Harness from the CI containers / VMs Date: Wed, 20 Apr 2022 12:33:03 +0200 Message-Id: <20220420103309.264479-2-thuth@redhat.com> In-Reply-To: <20220420103309.264479-1-thuth@redhat.com> References: <20220420103309.264479-1-thuth@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 2.85 on 10.11.54.8 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -28 X-Spam_score: -2.9 X-Spam_bar: -- X-Spam_report: (-2.9 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.082, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1650451396543100001 The perl test harness is not necessary anymore since commit 3d2f73ef75 ("build: use "meson test" as the test harness"). Thus remove it from tests/lcitool/projects/qemu.yml, run "make lcitool-refresh" and manually clean the remaining docker / vm files that are not managed by lcitool yet. Message-Id: <20220329102808.423681-1-thuth@redhat.com> Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Thomas Huth --- .gitlab-ci.d/cirrus/freebsd-12.vars | 2 +- .gitlab-ci.d/cirrus/freebsd-13.vars | 2 +- .gitlab-ci.d/cirrus/macos-11.vars | 4 ++-- tests/docker/dockerfiles/alpine.docker | 1 - tests/docker/dockerfiles/centos8.docker | 1 - tests/docker/dockerfiles/debian-arm64-cross.docker | 1 - tests/docker/dockerfiles/debian-s390x-cross.docker | 1 - tests/docker/dockerfiles/debian-tricore-cross.docker | 1 - tests/docker/dockerfiles/fedora-i386-cross.docker | 1 - tests/docker/dockerfiles/fedora-win32-cross.docker | 1 - tests/docker/dockerfiles/fedora-win64-cross.docker | 1 - tests/docker/dockerfiles/fedora.docker | 1 - tests/docker/dockerfiles/opensuse-leap.docker | 1 - tests/docker/dockerfiles/ubuntu1804.docker | 1 - tests/docker/dockerfiles/ubuntu2004.docker | 1 - tests/lcitool/projects/qemu.yml | 1 - tests/vm/centos.aarch64 | 3 +-- tests/vm/fedora | 2 +- 18 files changed, 6 insertions(+), 20 deletions(-) diff --git a/.gitlab-ci.d/cirrus/freebsd-12.vars b/.gitlab-ci.d/cirrus/free= bsd-12.vars index 07f313aa3a..b4842271b2 100644 --- a/.gitlab-ci.d/cirrus/freebsd-12.vars +++ b/.gitlab-ci.d/cirrus/freebsd-12.vars @@ -11,6 +11,6 @@ MAKE=3D'/usr/local/bin/gmake' NINJA=3D'/usr/local/bin/ninja' PACKAGING_COMMAND=3D'pkg' PIP3=3D'/usr/local/bin/pip-3.8' -PKGS=3D'alsa-lib bash bzip2 ca_root_nss capstone4 ccache cdrkit-genisoimag= e ctags curl cyrus-sasl dbus diffutils dtc fusefs-libs3 gettext git glib gm= ake gnutls gsed gtk3 libepoxy libffi libgcrypt libjpeg-turbo libnfs libspic= e-server libssh libtasn1 llvm lzo2 meson ncurses nettle ninja opencv p5-Tes= t-Harness perl5 pixman pkgconf png py38-numpy py38-pillow py38-pip py38-sph= inx py38-sphinx_rtd_theme py38-virtualenv py38-yaml python3 rpm2cpio sdl2 s= dl2_image snappy spice-protocol tesseract texinfo usbredir virglrenderer vt= e3 zstd' +PKGS=3D'alsa-lib bash bzip2 ca_root_nss capstone4 ccache cdrkit-genisoimag= e ctags curl cyrus-sasl dbus diffutils dtc fusefs-libs3 gettext git glib gm= ake gnutls gsed gtk3 libepoxy libffi libgcrypt libjpeg-turbo libnfs libspic= e-server libssh libtasn1 llvm lzo2 meson ncurses nettle ninja opencv perl5 = pixman pkgconf png py38-numpy py38-pillow py38-pip py38-sphinx py38-sphinx_= rtd_theme py38-virtualenv py38-yaml python3 rpm2cpio sdl2 sdl2_image snappy= spice-protocol tesseract texinfo usbredir virglrenderer vte3 zstd' PYPI_PKGS=3D'' PYTHON=3D'/usr/local/bin/python3' diff --git a/.gitlab-ci.d/cirrus/freebsd-13.vars b/.gitlab-ci.d/cirrus/free= bsd-13.vars index 8a648dda1e..546a82dd75 100644 --- a/.gitlab-ci.d/cirrus/freebsd-13.vars +++ b/.gitlab-ci.d/cirrus/freebsd-13.vars @@ -11,6 +11,6 @@ MAKE=3D'/usr/local/bin/gmake' NINJA=3D'/usr/local/bin/ninja' PACKAGING_COMMAND=3D'pkg' PIP3=3D'/usr/local/bin/pip-3.8' -PKGS=3D'alsa-lib bash bzip2 ca_root_nss capstone4 ccache cdrkit-genisoimag= e ctags curl cyrus-sasl dbus diffutils dtc fusefs-libs3 gettext git glib gm= ake gnutls gsed gtk3 libepoxy libffi libgcrypt libjpeg-turbo libnfs libspic= e-server libssh libtasn1 llvm lzo2 meson ncurses nettle ninja opencv p5-Tes= t-Harness perl5 pixman pkgconf png py38-numpy py38-pillow py38-pip py38-sph= inx py38-sphinx_rtd_theme py38-virtualenv py38-yaml python3 rpm2cpio sdl2 s= dl2_image snappy spice-protocol tesseract texinfo usbredir virglrenderer vt= e3 zstd' +PKGS=3D'alsa-lib bash bzip2 ca_root_nss capstone4 ccache cdrkit-genisoimag= e ctags curl cyrus-sasl dbus diffutils dtc fusefs-libs3 gettext git glib gm= ake gnutls gsed gtk3 libepoxy libffi libgcrypt libjpeg-turbo libnfs libspic= e-server libssh libtasn1 llvm lzo2 meson ncurses nettle ninja opencv perl5 = pixman pkgconf png py38-numpy py38-pillow py38-pip py38-sphinx py38-sphinx_= rtd_theme py38-virtualenv py38-yaml python3 rpm2cpio sdl2 sdl2_image snappy= spice-protocol tesseract texinfo usbredir virglrenderer vte3 zstd' PYPI_PKGS=3D'' PYTHON=3D'/usr/local/bin/python3' diff --git a/.gitlab-ci.d/cirrus/macos-11.vars b/.gitlab-ci.d/cirrus/macos-= 11.vars index 08183f8793..cfe9181fd4 100644 --- a/.gitlab-ci.d/cirrus/macos-11.vars +++ b/.gitlab-ci.d/cirrus/macos-11.vars @@ -5,12 +5,12 @@ # https://gitlab.com/libvirt/libvirt-ci =20 CCACHE=3D'/usr/local/bin/ccache' -CPAN_PKGS=3D'Test::Harness' +CPAN_PKGS=3D'' CROSS_PKGS=3D'' MAKE=3D'/usr/local/bin/gmake' NINJA=3D'/usr/local/bin/ninja' PACKAGING_COMMAND=3D'brew' PIP3=3D'/usr/local/bin/pip3' -PKGS=3D'bash bc bzip2 capstone ccache cpanminus ctags curl dbus diffutils = dtc gcovr gettext git glib gnu-sed gnutls gtk+3 jemalloc jpeg-turbo libepox= y libffi libgcrypt libiscsi libnfs libpng libslirp libssh libtasn1 libusb l= lvm lzo make meson ncurses nettle ninja perl pixman pkg-config python3 rpm2= cpio sdl2 sdl2_image snappy sparse spice-protocol tesseract texinfo usbredi= r vde vte3 zlib zstd' +PKGS=3D'bash bc bzip2 capstone ccache ctags curl dbus diffutils dtc gcovr = gettext git glib gnu-sed gnutls gtk+3 jemalloc jpeg-turbo libepoxy libffi l= ibgcrypt libiscsi libnfs libpng libslirp libssh libtasn1 libusb llvm lzo ma= ke meson ncurses nettle ninja perl pixman pkg-config python3 rpm2cpio sdl2 = sdl2_image snappy sparse spice-protocol tesseract texinfo usbredir vde vte3= zlib zstd' PYPI_PKGS=3D'PyYAML numpy pillow sphinx sphinx-rtd-theme virtualenv' PYTHON=3D'/usr/local/bin/python3' diff --git a/tests/docker/dockerfiles/alpine.docker b/tests/docker/dockerfi= les/alpine.docker index 591af43d60..3f4c0f95cb 100644 --- a/tests/docker/dockerfiles/alpine.docker +++ b/tests/docker/dockerfiles/alpine.docker @@ -73,7 +73,6 @@ RUN apk update && \ openssh-client \ pcre-dev \ perl \ - perl-test-harness \ pixman-dev \ pkgconf \ pulseaudio-dev \ diff --git a/tests/docker/dockerfiles/centos8.docker b/tests/docker/dockerf= iles/centos8.docker index 3ede55d09b..4b20925bbf 100644 --- a/tests/docker/dockerfiles/centos8.docker +++ b/tests/docker/dockerfiles/centos8.docker @@ -87,7 +87,6 @@ RUN dnf update -y && \ pam-devel \ pcre-static \ perl \ - perl-Test-Harness \ pixman-devel \ pkgconfig \ pulseaudio-libs-devel \ diff --git a/tests/docker/dockerfiles/debian-arm64-cross.docker b/tests/doc= ker/dockerfiles/debian-arm64-cross.docker index 589510a7be..b60426834c 100644 --- a/tests/docker/dockerfiles/debian-arm64-cross.docker +++ b/tests/docker/dockerfiles/debian-arm64-cross.docker @@ -29,7 +29,6 @@ RUN export DEBIAN_FRONTEND=3Dnoninteractive && \ hostname \ libpcre2-dev \ libspice-protocol-dev \ - libtest-harness-perl \ llvm \ locales \ make \ diff --git a/tests/docker/dockerfiles/debian-s390x-cross.docker b/tests/doc= ker/dockerfiles/debian-s390x-cross.docker index aa1bd6eb4c..ff79a2cc4f 100644 --- a/tests/docker/dockerfiles/debian-s390x-cross.docker +++ b/tests/docker/dockerfiles/debian-s390x-cross.docker @@ -29,7 +29,6 @@ RUN export DEBIAN_FRONTEND=3Dnoninteractive && \ hostname \ libpcre2-dev \ libspice-protocol-dev \ - libtest-harness-perl \ llvm \ locales \ make \ diff --git a/tests/docker/dockerfiles/debian-tricore-cross.docker b/tests/d= ocker/dockerfiles/debian-tricore-cross.docker index 3f6b55562c..b573b9ded2 100644 --- a/tests/docker/dockerfiles/debian-tricore-cross.docker +++ b/tests/docker/dockerfiles/debian-tricore-cross.docker @@ -25,7 +25,6 @@ RUN apt update && \ git \ libglib2.0-dev \ libpixman-1-dev \ - libtest-harness-perl \ locales \ make \ ninja-build \ diff --git a/tests/docker/dockerfiles/fedora-i386-cross.docker b/tests/dock= er/dockerfiles/fedora-i386-cross.docker index 13328e6081..0a3ec346e6 100644 --- a/tests/docker/dockerfiles/fedora-i386-cross.docker +++ b/tests/docker/dockerfiles/fedora-i386-cross.docker @@ -20,7 +20,6 @@ ENV PACKAGES \ gnutls-devel.i686 \ nettle-devel.i686 \ pcre-devel.i686 \ - perl-Test-Harness \ pixman-devel.i686 \ sysprof-capture-devel.i686 \ zlib-devel.i686 diff --git a/tests/docker/dockerfiles/fedora-win32-cross.docker b/tests/doc= ker/dockerfiles/fedora-win32-cross.docker index d80e66c651..84a8f5524d 100644 --- a/tests/docker/dockerfiles/fedora-win32-cross.docker +++ b/tests/docker/dockerfiles/fedora-win32-cross.docker @@ -31,7 +31,6 @@ ENV PACKAGES \ mingw32-SDL2 \ msitools \ perl \ - perl-Test-Harness \ python3 \ python3-PyYAML \ tar \ diff --git a/tests/docker/dockerfiles/fedora-win64-cross.docker b/tests/doc= ker/dockerfiles/fedora-win64-cross.docker index 2b12b94ccf..d7ed8eb1cf 100644 --- a/tests/docker/dockerfiles/fedora-win64-cross.docker +++ b/tests/docker/dockerfiles/fedora-win64-cross.docker @@ -28,7 +28,6 @@ ENV PACKAGES \ mingw64-pkg-config \ msitools \ perl \ - perl-Test-Harness \ python3 \ python3-PyYAML \ tar \ diff --git a/tests/docker/dockerfiles/fedora.docker b/tests/docker/dockerfi= les/fedora.docker index 1d01cd9440..2e6a84abfd 100644 --- a/tests/docker/dockerfiles/fedora.docker +++ b/tests/docker/dockerfiles/fedora.docker @@ -94,7 +94,6 @@ exec "$@"' > /usr/bin/nosync && \ openssh-clients \ pam-devel \ pcre-static \ - perl-Test-Harness \ perl-base \ pixman-devel \ pkgconfig \ diff --git a/tests/docker/dockerfiles/opensuse-leap.docker b/tests/docker/d= ockerfiles/opensuse-leap.docker index e1ad9434a3..6f5993d602 100644 --- a/tests/docker/dockerfiles/opensuse-leap.docker +++ b/tests/docker/dockerfiles/opensuse-leap.docker @@ -83,7 +83,6 @@ RUN zypper update -y && \ openssh \ pam-devel \ pcre-devel-static \ - perl-Test-Harness \ perl-base \ pkgconfig \ python3-Pillow \ diff --git a/tests/docker/dockerfiles/ubuntu1804.docker b/tests/docker/dock= erfiles/ubuntu1804.docker index 0a622b467c..b3f2156580 100644 --- a/tests/docker/dockerfiles/ubuntu1804.docker +++ b/tests/docker/dockerfiles/ubuntu1804.docker @@ -81,7 +81,6 @@ RUN export DEBIAN_FRONTEND=3Dnoninteractive && \ libssh-dev \ libsystemd-dev \ libtasn1-6-dev \ - libtest-harness-perl \ libubsan1 \ libudev-dev \ libusb-1.0-0-dev \ diff --git a/tests/docker/dockerfiles/ubuntu2004.docker b/tests/docker/dock= erfiles/ubuntu2004.docker index b9d06cb040..a3b38884e3 100644 --- a/tests/docker/dockerfiles/ubuntu2004.docker +++ b/tests/docker/dockerfiles/ubuntu2004.docker @@ -83,7 +83,6 @@ RUN export DEBIAN_FRONTEND=3Dnoninteractive && \ libssh-dev \ libsystemd-dev \ libtasn1-6-dev \ - libtest-harness-perl \ libubsan1 \ libudev-dev \ libusb-1.0-0-dev \ diff --git a/tests/lcitool/projects/qemu.yml b/tests/lcitool/projects/qemu.= yml index 958868a6ee..d068a7a8de 100644 --- a/tests/lcitool/projects/qemu.yml +++ b/tests/lcitool/projects/qemu.yml @@ -79,7 +79,6 @@ packages: - pam - pcre-static - perl - - perl-Test-Harness - pixman - pkg-config - pulseaudio diff --git a/tests/vm/centos.aarch64 b/tests/vm/centos.aarch64 index 81c3004c3c..96c450f8be 100755 --- a/tests/vm/centos.aarch64 +++ b/tests/vm/centos.aarch64 @@ -24,8 +24,7 @@ DEFAULT_CONFIG =3D { 'cpu' : "max", 'machine' : "virt,gic-version=3Dmax", 'install_cmds' : "yum install -y make ninja-build git python3 gcc gcc-= c++ flex bison, "\ - "yum install -y glib2-devel pixman-devel zlib-devel, "\ - "yum install -y perl-Test-Harness, "\ + "yum install -y glib2-devel perl pixman-devel zlib-devel, "\ "alternatives --set python /usr/bin/python3, "\ "sudo dnf config-manager "\ "--add-repo=3Dhttps://download.docker.com/linux/centos/docker-ce.r= epo,"\ diff --git a/tests/vm/fedora b/tests/vm/fedora index b977efe4a2..92b78d6e2c 100755 --- a/tests/vm/fedora +++ b/tests/vm/fedora @@ -35,7 +35,7 @@ class FedoraVM(basevm.BaseVM): 'gcc', 'binutils', 'make', 'ninja-build', =20 # perl - 'perl-Test-Harness', + 'perl', =20 # libs: usb '"pkgconfig(libusb-1.0)"', --=20 2.27.0 From nobody Sun May 5 09:17:53 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1650451162; cv=none; d=zohomail.com; s=zohoarc; b=blehr6zXnTLjWrmhs8CCCxXKEtCBwxWerflzWmvGBPb/KUpm+QGDYWGyx5kT9FQpsNI3AdZRmbNhuW5Ot/rzHEOl+hl6YdfcJgdsdMHRFGkaeGD/FZ0Qg8cKgLY2Lr5VhOXItqK8ed5LEx+6KgwKqU95eh8Bb/hP+ICU2XrZkt4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1650451162; h=Content-Type:Content-Transfer-Encoding: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=5YdsMj8LS20vkgFU9Yq52eJpZm+S2czngKTqoq9TmzE=; b=P/gpak/iJkPnyHy6WudZdtESkCCJRCk0/jqxMdgX95i3J8GM3T8iY10blIt5pM5Bq86Y0WAEOFrinfG/QebtJUl100/6IYzomK+OSxoSvoCSKJTRsU60Ycrl+COtNbJuL1+HqALSX+rDdYaYMm6JgTryJbtFmHoChThzm99BpIc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1650451162750815.7260694641534; Wed, 20 Apr 2022 03:39:22 -0700 (PDT) Received: from localhost ([::1]:36966 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nh7k1-0005Rh-9V for importer@patchew.org; Wed, 20 Apr 2022 06:39:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58966) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nh7eE-0001Mz-Qk for qemu-devel@nongnu.org; Wed, 20 Apr 2022 06:33:33 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:53993) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nh7eD-0006po-8j for qemu-devel@nongnu.org; Wed, 20 Apr 2022 06:33:22 -0400 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-81-lYpcBEk8OUWdfJQkAs2U4w-1; Wed, 20 Apr 2022 06:33:19 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 1F32380B71C; Wed, 20 Apr 2022 10:33:19 +0000 (UTC) Received: from thuth.com (unknown [10.39.195.200]) by smtp.corp.redhat.com (Postfix) with ESMTP id CD7BCC44AE1; Wed, 20 Apr 2022 10:33:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1650450800; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=5YdsMj8LS20vkgFU9Yq52eJpZm+S2czngKTqoq9TmzE=; b=OatlWq2+8lwllqc6Xcu4n5lqest5hA7LZHuKWWoeaWHZnMTKOQUdBw/Eo1ERQxbose9DjM g+j5t1NHeITY2DIzNOIcV2T/fbapngpqq/EizQ3zSASSwh1+dx721KRtgjoo8TsLsGWl3T lb3yuIdb1BKbB4ZcfvXhWQQ8Ir9a904= X-MC-Unique: lYpcBEk8OUWdfJQkAs2U4w-1 From: Thomas Huth To: qemu-devel@nongnu.org, Richard Henderson , Peter Maydell Subject: [PULL 2/7] tests/qtest: Enable more tests for the "mipsel" target Date: Wed, 20 Apr 2022 12:33:04 +0200 Message-Id: <20220420103309.264479-3-thuth@redhat.com> In-Reply-To: <20220420103309.264479-1-thuth@redhat.com> References: <20220420103309.264479-1-thuth@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 2.85 on 10.11.54.8 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -28 X-Spam_score: -2.9 X-Spam_bar: -- X-Spam_report: (-2.9 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.082, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1650451163354100001 Content-Type: text/plain; charset="utf-8" Allow the same set of tests for all MIPS targets, so that "mipsel" now gets some additional test coverage, too. While we're at it, simplify the definitions for qtests_mips64 and qtests_mips64el. Message-Id: <20220414114655.604391-1-thuth@redhat.com> Signed-off-by: Thomas Huth --- tests/qtest/endianness-test.c | 1 + tests/qtest/meson.build | 14 +++----------- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/tests/qtest/endianness-test.c b/tests/qtest/endianness-test.c index 9c03b72dc9..2f5a88bf4c 100644 --- a/tests/qtest/endianness-test.c +++ b/tests/qtest/endianness-test.c @@ -28,6 +28,7 @@ struct TestCase { static const TestCase test_cases[] =3D { { "i386", "pc", -1 }, { "mips", "malta", 0x10000000, .bswap =3D true }, + { "mipsel", "malta", 0x10000000 }, { "mips64", "magnum", 0x90000000, .bswap =3D true }, { "mips64", "pica61", 0x90000000, .bswap =3D true }, { "mips64", "malta", 0x10000000, .bswap =3D true }, diff --git a/tests/qtest/meson.build b/tests/qtest/meson.build index d25f82bb5a..1709fc6ccb 100644 --- a/tests/qtest/meson.build +++ b/tests/qtest/meson.build @@ -143,17 +143,9 @@ qtests_mips =3D \ (config_all_devices.has_key('CONFIG_ISA_TESTDEV') ? ['endianness-test'] = : []) + \ (config_all_devices.has_key('CONFIG_VGA') ? ['display-vga-test'] : []) =20 -qtests_mips64 =3D \ - ['test-filter-mirror', 'test-filter-redirector'] + \ - (slirp.found() ? ['test-netfilter'] : []) + \ - (config_all_devices.has_key('CONFIG_ISA_TESTDEV') ? ['endianness-test'] = : []) + \ - (config_all_devices.has_key('CONFIG_VGA') ? ['display-vga-test'] : []) - -qtests_mips64el =3D \ - ['test-filter-mirror', 'test-filter-redirector'] + \ - (slirp.found() ? ['test-netfilter'] : []) + \ - (config_all_devices.has_key('CONFIG_ISA_TESTDEV') ? ['endianness-test'] = : []) + \ - (config_all_devices.has_key('CONFIG_VGA') ? ['display-vga-test'] : []) +qtests_mipsel =3D qtests_mips +qtests_mips64 =3D qtests_mips +qtests_mips64el =3D qtests_mips =20 qtests_ppc =3D \ ['test-filter-mirror', 'test-filter-redirector'] + \ --=20 2.27.0 From nobody Sun May 5 09:17:53 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1650451165; cv=none; d=zohomail.com; s=zohoarc; b=JCzS1qgRzy+Ws0XaVCfOpuXCrIe5998E0xQwZMTwDgfSRELmJm/GsNc1sAta40nvvbjCpLtDiLmni452eu42l5g+sdBGeTZXdAYiMjjZ6fVmmOMDUyuAZjb7i+L+OYgjMJdGcpjZ2bfLlw5LdezHWA2lCvUto99ZxqJmE05du/U= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1650451165; 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=lL5and8kZUsfM8M6XbWjVP0wSC6Lu9hMEGeUDMTXHFs=; b=TSXi+AeE8BuvY0W3XEEAf53XYWCgpXDVUhsGeQqRiKXahqdMDwWVTMbPFk+igJbUSEzSC7fhCKNVnXdXM46CxCqDEEPUekWE1My/ZAKkwS3ikR5AbJf0FGtpF3dcaIoirHqMfFu2O8AsTC7XEYQYtkyWP5EI0YxM1D6xRnGI2Vc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1650451165909698.4510622018626; Wed, 20 Apr 2022 03:39:25 -0700 (PDT) Received: from localhost ([::1]:37276 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nh7k4-0005g4-Rc for importer@patchew.org; Wed, 20 Apr 2022 06:39:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59006) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nh7eQ-0001PQ-7t for qemu-devel@nongnu.org; Wed, 20 Apr 2022 06:33:36 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:41529) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nh7eJ-0006rM-Ee for qemu-devel@nongnu.org; Wed, 20 Apr 2022 06:33:30 -0400 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-158-9KgYBr7hMoqAYHsxTgpSdg-1; Wed, 20 Apr 2022 06:33:22 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id D4B081014A60; Wed, 20 Apr 2022 10:33:21 +0000 (UTC) Received: from thuth.com (unknown [10.39.195.200]) by smtp.corp.redhat.com (Postfix) with ESMTP id AED99C44AE1; Wed, 20 Apr 2022 10:33:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1650450805; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=lL5and8kZUsfM8M6XbWjVP0wSC6Lu9hMEGeUDMTXHFs=; b=aG6QLGk3qKIBbpuNO6HYJnO8Ddtlr0NN01nOrjWgvQ//caq9DrCyvaPf5+LH8C9bxF6WZ/ fsNinq6TcdI3drsegfJUTn9xpFPqpG1xrBSo6qE9DrXW5Txo0XR4kglKslwgc6DFwM8BAG 0U2sYR/TaiYHKo/GuwLHvRF9amQRj3s= X-MC-Unique: 9KgYBr7hMoqAYHsxTgpSdg-1 From: Thomas Huth To: qemu-devel@nongnu.org, Richard Henderson , Peter Maydell Subject: [PULL 3/7] tests/qtest: Move the fuzz tests to x86 only Date: Wed, 20 Apr 2022 12:33:05 +0200 Message-Id: <20220420103309.264479-4-thuth@redhat.com> In-Reply-To: <20220420103309.264479-1-thuth@redhat.com> References: <20220420103309.264479-1-thuth@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 2.85 on 10.11.54.8 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -28 X-Spam_score: -2.9 X-Spam_bar: -- X-Spam_report: (-2.9 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.082, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Laurent Vivier Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1650451167150100001 Content-Type: text/plain; charset="utf-8" The fuzz tests are currently scheduled for all targets, but their setup code limits the run to "i386", so that these tests always show "SKIP" on other targets. Move it to the right x86 list in meson.build, then we can drop the architecture check during runtime, too. Message-Id: <20220414130127.719528-1-thuth@redhat.com> Reviewed-by: Laurent Vivier Signed-off-by: Thomas Huth --- tests/qtest/fuzz-lsi53c895a-test.c | 8 ++------ tests/qtest/fuzz-megasas-test.c | 12 ++++-------- tests/qtest/fuzz-sb16-test.c | 12 ++++-------- tests/qtest/fuzz-sdcard-test.c | 12 ++++-------- tests/qtest/fuzz-virtio-scsi-test.c | 8 ++------ tests/qtest/meson.build | 13 ++++++------- 6 files changed, 22 insertions(+), 43 deletions(-) diff --git a/tests/qtest/fuzz-lsi53c895a-test.c b/tests/qtest/fuzz-lsi53c89= 5a-test.c index ba5d468970..031d9de241 100644 --- a/tests/qtest/fuzz-lsi53c895a-test.c +++ b/tests/qtest/fuzz-lsi53c895a-test.c @@ -39,14 +39,10 @@ static void test_lsi_do_dma_empty_queue(void) =20 int main(int argc, char **argv) { - const char *arch =3D qtest_get_arch(); - g_test_init(&argc, &argv, NULL); =20 - if (strcmp(arch, "i386") =3D=3D 0 || strcmp(arch, "x86_64") =3D=3D 0) { - qtest_add_func("fuzz/lsi53c895a/lsi_do_dma_empty_queue", - test_lsi_do_dma_empty_queue); - } + qtest_add_func("fuzz/lsi53c895a/lsi_do_dma_empty_queue", + test_lsi_do_dma_empty_queue); =20 return g_test_run(); } diff --git a/tests/qtest/fuzz-megasas-test.c b/tests/qtest/fuzz-megasas-tes= t.c index e1141c58a4..129b182f83 100644 --- a/tests/qtest/fuzz-megasas-test.c +++ b/tests/qtest/fuzz-megasas-test.c @@ -64,16 +64,12 @@ static void test_gitlab_issue521_megasas_sgl_ovf(void) =20 int main(int argc, char **argv) { - const char *arch =3D qtest_get_arch(); - g_test_init(&argc, &argv, NULL); =20 - if (strcmp(arch, "i386") =3D=3D 0 || strcmp(arch, "x86_64") =3D=3D 0) { - qtest_add_func("fuzz/test_lp1878263_megasas_zero_iov_cnt", - test_lp1878263_megasas_zero_iov_cnt); - qtest_add_func("fuzz/gitlab_issue521_megasas_sgl_ovf", - test_gitlab_issue521_megasas_sgl_ovf); - } + qtest_add_func("fuzz/test_lp1878263_megasas_zero_iov_cnt", + test_lp1878263_megasas_zero_iov_cnt); + qtest_add_func("fuzz/gitlab_issue521_megasas_sgl_ovf", + test_gitlab_issue521_megasas_sgl_ovf); =20 return g_test_run(); } diff --git a/tests/qtest/fuzz-sb16-test.c b/tests/qtest/fuzz-sb16-test.c index f47a8bcdbd..91fdcd1e8a 100644 --- a/tests/qtest/fuzz-sb16-test.c +++ b/tests/qtest/fuzz-sb16-test.c @@ -55,15 +55,11 @@ static void test_fuzz_sb16_0xd4(void) =20 int main(int argc, char **argv) { - const char *arch =3D qtest_get_arch(); - g_test_init(&argc, &argv, NULL); =20 - if (strcmp(arch, "i386") =3D=3D 0) { - qtest_add_func("fuzz/test_fuzz_sb16/1c", test_fuzz_sb16_0x1c); - qtest_add_func("fuzz/test_fuzz_sb16/91", test_fuzz_sb16_0x91); - qtest_add_func("fuzz/test_fuzz_sb16/d4", test_fuzz_sb16_0xd4); - } + qtest_add_func("fuzz/test_fuzz_sb16/1c", test_fuzz_sb16_0x1c); + qtest_add_func("fuzz/test_fuzz_sb16/91", test_fuzz_sb16_0x91); + qtest_add_func("fuzz/test_fuzz_sb16/d4", test_fuzz_sb16_0xd4); =20 - return g_test_run(); + return g_test_run(); } diff --git a/tests/qtest/fuzz-sdcard-test.c b/tests/qtest/fuzz-sdcard-test.c index 0f94965a66..d0f4e0e93c 100644 --- a/tests/qtest/fuzz-sdcard-test.c +++ b/tests/qtest/fuzz-sdcard-test.c @@ -164,15 +164,11 @@ static void oss_fuzz_36391(void) =20 int main(int argc, char **argv) { - const char *arch =3D qtest_get_arch(); - g_test_init(&argc, &argv, NULL); =20 - if (strcmp(arch, "i386") =3D=3D 0) { - qtest_add_func("fuzz/sdcard/oss_fuzz_29225", oss_fuzz_29225); - qtest_add_func("fuzz/sdcard/oss_fuzz_36217", oss_fuzz_36217); - qtest_add_func("fuzz/sdcard/oss_fuzz_36391", oss_fuzz_36391); - } + qtest_add_func("fuzz/sdcard/oss_fuzz_29225", oss_fuzz_29225); + qtest_add_func("fuzz/sdcard/oss_fuzz_36217", oss_fuzz_36217); + qtest_add_func("fuzz/sdcard/oss_fuzz_36391", oss_fuzz_36391); =20 - return g_test_run(); + return g_test_run(); } diff --git a/tests/qtest/fuzz-virtio-scsi-test.c b/tests/qtest/fuzz-virtio-= scsi-test.c index aaf6d10e18..c9b6fe2123 100644 --- a/tests/qtest/fuzz-virtio-scsi-test.c +++ b/tests/qtest/fuzz-virtio-scsi-test.c @@ -62,14 +62,10 @@ static void test_mmio_oob_from_memory_region_cache(void) =20 int main(int argc, char **argv) { - const char *arch =3D qtest_get_arch(); - g_test_init(&argc, &argv, NULL); =20 - if (strcmp(arch, "i386") =3D=3D 0 || strcmp(arch, "x86_64") =3D=3D 0) { - qtest_add_func("fuzz/test_mmio_oob_from_memory_region_cache", - test_mmio_oob_from_memory_region_cache); - } + qtest_add_func("fuzz/test_mmio_oob_from_memory_region_cache", + test_mmio_oob_from_memory_region_cache); =20 return g_test_run(); } diff --git a/tests/qtest/meson.build b/tests/qtest/meson.build index 1709fc6ccb..22e1361210 100644 --- a/tests/qtest/meson.build +++ b/tests/qtest/meson.build @@ -17,13 +17,7 @@ slow_qtests =3D { 'test-hmp' : 120, } =20 -qtests_generic =3D \ - (config_all_devices.has_key('CONFIG_MEGASAS_SCSI_PCI') ? ['fuzz-megasas-= test'] : []) + \ - (config_all_devices.has_key('CONFIG_LSI_SCSI_PCI') ? ['fuzz-lsi53c895a-t= est'] : []) + \ - (config_all_devices.has_key('CONFIG_VIRTIO_SCSI') ? ['fuzz-virtio-scsi-t= est'] : []) + \ - (config_all_devices.has_key('CONFIG_SB16') ? ['fuzz-sb16-test'] : []) + \ - (config_all_devices.has_key('CONFIG_SDHCI_PCI') ? ['fuzz-sdcard-test'] := []) + \ - [ +qtests_generic =3D [ 'cdrom-test', 'device-introspect-test', 'machine-none-test', @@ -67,6 +61,11 @@ qtests_i386 =3D \ (config_all_devices.has_key('CONFIG_TPM_TIS_ISA') ? ['tpm-tis-swtpm-test= '] : []) + \ (config_all_devices.has_key('CONFIG_RTL8139_PCI') ? ['rtl8139-test'] : [= ]) + \ (config_all_devices.has_key('CONFIG_E1000E_PCI_EXPRESS') ? ['fuzz-e1000e= -test'] : []) + \ + (config_all_devices.has_key('CONFIG_MEGASAS_SCSI_PCI') ? ['fuzz-megasas-= test'] : []) + \ + (config_all_devices.has_key('CONFIG_LSI_SCSI_PCI') ? ['fuzz-lsi53c895a-t= est'] : []) + \ + (config_all_devices.has_key('CONFIG_VIRTIO_SCSI') ? ['fuzz-virtio-scsi-t= est'] : []) + \ + (config_all_devices.has_key('CONFIG_SB16') ? ['fuzz-sb16-test'] : []) + = \ + (config_all_devices.has_key('CONFIG_SDHCI_PCI') ? ['fuzz-sdcard-test'] := []) + \ (config_all_devices.has_key('CONFIG_ESP_PCI') ? ['am53c974-test'] : []) = + \ (config_all_devices.has_key('CONFIG_ACPI_ERST') ? ['erst-test'] : []) + = \ (config_all_devices.has_key('CONFIG_VIRTIO_NET') and = \ --=20 2.27.0 From nobody Sun May 5 09:17:53 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1650451602967777.7275680646294; Wed, 20 Apr 2022 03:46:42 -0700 (PDT) Received: from localhost ([::1]:51372 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nh7r7-0006pw-Un for importer@patchew.org; Wed, 20 Apr 2022 06:46:41 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59008) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nh7eQ-0001PR-K2 for qemu-devel@nongnu.org; Wed, 20 Apr 2022 06:33:37 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:38086) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nh7eK-0006rQ-Ox for qemu-devel@nongnu.org; Wed, 20 Apr 2022 06:33:31 -0400 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-232-4w7VezKsNhmb8zR3F7y2iw-1; Wed, 20 Apr 2022 06:33:24 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 09D34803533; Wed, 20 Apr 2022 10:33:24 +0000 (UTC) Received: from thuth.com (unknown [10.39.195.200]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5BE55C44AE1; Wed, 20 Apr 2022 10:33:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1650450807; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=5kjYXNut4AoVVjH8FYHZGy5DwSVR7/wMYrfiaIjtkhg=; b=i/1QsEIZzWmbReAR2fG8mCJ2Jc+ed8zOlBcSqSOncti0dlapD0N320QV4Wpo/OHiEv+KEk NTlicuZFvgW9jdmHB2ptV7bZ1xXLgavGKaF7odrbfFTxnmSoO1cTN9mfu5apacV5dGpEud SqDUWnZHXjtLAsnjHf2UN4ALjiTPYUk= X-MC-Unique: 4w7VezKsNhmb8zR3F7y2iw-1 From: Thomas Huth To: qemu-devel@nongnu.org, Richard Henderson , Peter Maydell Subject: [PULL 4/7] tests/qtest: properly initialise the vring used idx Date: Wed, 20 Apr 2022 12:33:06 +0200 Message-Id: <20220420103309.264479-5-thuth@redhat.com> In-Reply-To: <20220420103309.264479-1-thuth@redhat.com> References: <20220420103309.264479-1-thuth@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 2.85 on 10.11.54.8 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -28 X-Spam_score: -2.9 X-Spam_bar: -- X-Spam_report: (-2.9 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.082, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Eric Auger , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Stefan Hajnoczi Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1650451603751100002 From: Alex Benn=C3=A9e Eric noticed while attempting to enable the vhost-user-blk-test for Aarch64 that that things didn't work unless he put in a dummy guest_malloc() at the start of the test. Without it qvirtio_wait_used_elem() would assert when it reads a junk value for idx resulting in: qvirtqueue_get_buf: idx:2401 last_idx:0 qvirtqueue_get_buf: 0x7ffcb6d3fe74, (nil) qvirtio_wait_used_elem: 3000000/0 ERROR:../../tests/qtest/libqos/virtio.c:226:qvirtio_wait_used_elem: asser= tion failed (got_desc_idx =3D=3D desc_idx): (50331648 =3D=3D 0) Bail out! ERROR:../../tests/qtest/libqos/virtio.c:226:qvirtio_wait_used_e= lem: assertion failed (got_desc_idx =3D=3D desc_idx): (50331648 =3D=3D 0) What was actually happening is the guest_malloc() effectively pushed the allocation of the vring into the next page which just happened to have clear memory. After much tedious tracing of the code I could see that qvring_init() does attempt initialise a bunch of the vring structures but skips the vring->used.idx value. It is probably not wise to assume guest memory is zeroed anyway. Once the ring is properly initialised the hack is no longer needed to get things working. Thanks-to: John Snow for helping debug Signed-off-by: Alex Benn=C3=A9e Message-Id: <20220406173356.1891500-1-alex.bennee@linaro.org> Tested-by: Eric Auger Reviewed-by: Eric Auger Reviewed-by: Stefan Hajnoczi Signed-off-by: Thomas Huth --- tests/qtest/libqos/virtio.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/qtest/libqos/virtio.c b/tests/qtest/libqos/virtio.c index 6fe7bf9555..fba9186659 100644 --- a/tests/qtest/libqos/virtio.c +++ b/tests/qtest/libqos/virtio.c @@ -260,6 +260,8 @@ void qvring_init(QTestState *qts, const QGuestAllocator= *alloc, QVirtQueue *vq, =20 /* vq->used->flags */ qvirtio_writew(vq->vdev, qts, vq->used, 0); + /* vq->used->idx */ + qvirtio_writew(vq->vdev, qts, vq->used + 2, 0); /* vq->used->avail_event */ qvirtio_writew(vq->vdev, qts, vq->used + 2 + sizeof(struct vring_used_elem) * vq->size, 0); --=20 2.27.0 From nobody Sun May 5 09:17:53 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1650451817563609.3405492378699; Wed, 20 Apr 2022 03:50:17 -0700 (PDT) Received: from localhost ([::1]:58184 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nh7ua-0002aR-E9 for importer@patchew.org; Wed, 20 Apr 2022 06:50:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59038) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nh7eS-0001Ph-VY for qemu-devel@nongnu.org; Wed, 20 Apr 2022 06:33:39 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:21795) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nh7eQ-0006rk-GU for qemu-devel@nongnu.org; Wed, 20 Apr 2022 06:33:36 -0400 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-290-WWUymrdsNoOzqYqma9k8TQ-1; Wed, 20 Apr 2022 06:33:28 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 8F0C8803533; Wed, 20 Apr 2022 10:33:27 +0000 (UTC) Received: from thuth.com (unknown [10.39.195.200]) by smtp.corp.redhat.com (Postfix) with ESMTP id CC04DC44AE2; Wed, 20 Apr 2022 10:33:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1650450813; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=PGZiyoaMXsTdYjGrGiMzB2k5dQMS90Hz8LbniPPwScw=; b=CGkuK2xUF6iwOwZsQanplWDfUOvhIUZgnJ7K7KrAXmZG5VanB8NTO6TqpkxMn3//zrjHqO T1gvDk/lV5hPlQ6uesiJc9PdjVPXNuHzjykjGNk/CG15GGCWhUj7w7lNpliEyoBOYx+hmG tsJh9P5LOYlxJ3W6QBUY0ckJhUmRU7c= X-MC-Unique: WWUymrdsNoOzqYqma9k8TQ-1 From: Thomas Huth To: qemu-devel@nongnu.org, Richard Henderson , Peter Maydell Subject: [PULL 5/7] docs/ccid: convert to restructuredText Date: Wed, 20 Apr 2022 12:33:07 +0200 Message-Id: <20220420103309.264479-6-thuth@redhat.com> In-Reply-To: <20220420103309.264479-1-thuth@redhat.com> References: <20220420103309.264479-1-thuth@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 2.85 on 10.11.54.8 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -28 X-Spam_score: -2.9 X-Spam_bar: -- X-Spam_report: (-2.9 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.082, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Damien Hedde , Lucas Ramage Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1650451818769100001 Content-Type: text/plain; charset="utf-8" From: Lucas Ramage Buglink: https://gitlab.com/qemu-project/qemu/-/issues/527 Signed-off-by: Lucas Ramage Message-Id: <20220405142906.21382-1-oxr463@gmx.us> Reviewed-by: Damien Hedde [thuth: Added some cosmetic fixes] Signed-off-by: Thomas Huth --- docs/ccid.txt | 182 ------------------------------- docs/system/device-emulation.rst | 1 + docs/system/devices/ccid.rst | 171 +++++++++++++++++++++++++++++ 3 files changed, 172 insertions(+), 182 deletions(-) delete mode 100644 docs/ccid.txt create mode 100644 docs/system/devices/ccid.rst diff --git a/docs/ccid.txt b/docs/ccid.txt deleted file mode 100644 index 2b85b1bd42..0000000000 --- a/docs/ccid.txt +++ /dev/null @@ -1,182 +0,0 @@ -QEMU CCID Device Documentation. - -Contents -1. USB CCID device -2. Building -3. Using ccid-card-emulated with hardware -4. Using ccid-card-emulated with certificates -5. Using ccid-card-passthru with client side hardware -6. Using ccid-card-passthru with client side certificates -7. Passthrough protocol scenario -8. libcacard - -1. USB CCID device - -The USB CCID device is a USB device implementing the CCID specification, w= hich -lets one connect smart card readers that implement the same spec. For more -information see the specification: - - Universal Serial Bus - Device Class: Smart Card - CCID - Specification for - Integrated Circuit(s) Cards Interface Devices - Revision 1.1 - April 22rd, 2005 - -Smartcards are used for authentication, single sign on, decryption in -public/private schemes and digital signatures. A smartcard reader on the c= lient -cannot be used on a guest with simple usb passthrough since it will then n= ot be -available on the client, possibly locking the computer when it is "removed= ". On -the other hand this device can let you use the smartcard on both the clien= t and -the guest machine. It is also possible to have a completely virtual smart = card -reader and smart card (i.e. not backed by a physical device) using this de= vice. - -2. Building - -The cryptographic functions and access to the physical card is done via the -libcacard library, whose development package must be installed prior to -building QEMU: - -In redhat/fedora: - yum install libcacard-devel -In ubuntu: - apt-get install libcacard-dev - -Configuring and building: - ./configure --enable-smartcard && make - - -3. Using ccid-card-emulated with hardware - -Assuming you have a working smartcard on the host with the current -user, using libcacard, QEMU acts as another client using ccid-card-emulate= d: - - qemu -usb -device usb-ccid -device ccid-card-emulated - - -4. Using ccid-card-emulated with certificates stored in files - -You must create the CA and card certificates. This is a one time process. -We use NSS certificates: - - mkdir fake-smartcard - cd fake-smartcard - certutil -N -d sql:$PWD - certutil -S -d sql:$PWD -s "CN=3DFake Smart Card CA" -x -t TC,TC,TC -n= fake-smartcard-ca - certutil -S -d sql:$PWD -t ,, -s "CN=3DJohn Doe" -n id-cert -c fake-sm= artcard-ca - certutil -S -d sql:$PWD -t ,, -s "CN=3DJohn Doe (signing)" --nsCertTyp= e smime -n signing-cert -c fake-smartcard-ca - certutil -S -d sql:$PWD -t ,, -s "CN=3DJohn Doe (encryption)" --nsCert= Type sslClient -n encryption-cert -c fake-smartcard-ca - -Note: you must have exactly three certificates. - -You can use the emulated card type with the certificates backend: - - qemu -usb -device usb-ccid -device ccid-card-emulated,backend=3Dcertif= icates,db=3Dsql:$PWD,cert1=3Did-cert,cert2=3Dsigning-cert,cert3=3Dencryptio= n-cert - -To use the certificates in the guest, export the CA certificate: - - certutil -L -r -d sql:$PWD -o fake-smartcard-ca.cer -n fake-smartcard-= ca - -and import it in the guest: - - certutil -A -d /etc/pki/nssdb -i fake-smartcard-ca.cer -t TC,TC,TC -n = fake-smartcard-ca - -In a Linux guest you can then use the CoolKey PKCS #11 module to access -the card: - - certutil -d /etc/pki/nssdb -L -h all - -It will prompt you for the PIN (which is the password you assigned to the -certificate database early on), and then show you all three certificates -together with the manually imported CA cert: - - Certificate Nickname Trust Attributes - fake-smartcard-ca CT,C,C - John Doe:CAC ID Certificate u,u,u - John Doe:CAC Email Signature Certificate u,u,u - John Doe:CAC Email Encryption Certificate u,u,u - -If this does not happen, CoolKey is not installed or not registered with -NSS. Registration can be done from Firefox or the command line: - - modutil -dbdir /etc/pki/nssdb -add "CAC Module" -libfile /usr/lib64/pk= cs11/libcoolkeypk11.so - modutil -dbdir /etc/pki/nssdb -list - - -5. Using ccid-card-passthru with client side hardware - -on the host specify the ccid-card-passthru device with a suitable chardev: - - qemu -chardev socket,server=3Don,host=3D0.0.0.0,port=3D2001,id=3Dccid,= wait=3Doff \ - -usb -device usb-ccid -device ccid-card-passthru,chardev=3Dccid - -on the client run vscclient, built when you built QEMU: - - vscclient 2001 - - -6. Using ccid-card-passthru with client side certificates - -This case is not particularly useful, but you can use it to debug -your setup if #4 works but #5 does not. - -Follow instructions as per #4, except run QEMU and vscclient as follows: -Run qemu as per #5, and run vscclient from the "fake-smartcard" -directory as follows: - - qemu -chardev socket,server=3Don,host=3D0.0.0.0,port=3D2001,id=3Dccid,= wait=3Doff \ - -usb -device usb-ccid -device ccid-card-passthru,chardev=3Dccid - vscclient -e "db=3D\"sql:$PWD\" use_hw=3Dno soft=3D(,Test,CAC,,id-cert= ,signing-cert,encryption-cert)" 2001 - - -7. Passthrough protocol scenario - -This is a typical interchange of messages when using the passthru card dev= ice. -usb-ccid is a usb device. It defaults to an unattached usb device on start= up. -usb-ccid expects a chardev and expects the protocol defined in -cac_card/vscard_common.h to be passed over that. -The usb-ccid device can be in one of three modes: - * detached - * attached with no card - * attached with card - -A typical interchange is: (the arrow shows who started each exchange, it c= an be client -originated or guest originated) - -client event | vscclient | passthru | usb-cc= id | guest event ---------------------------------------------------------------------------= -------------------- - | VSC_Init | | = | - | VSC_ReaderAdd | | attach= | - | | | = | sees new usb device. -card inserted -> | | | = | - | VSC_ATR | insert | insert= | see new card - | | | = | - | VSC_APDU | VSC_APDU | = | <- guest sends APDU -client<->physical | | | = | -card APDU exchange| | | = | -client response ->| VSC_APDU | VSC_APDU | = | receive APDU response - ... - [APDU<->APDU repeats several times] - ... -card removed -> | | | = | - | VSC_CardRemove | remove | remove = | card removed - ... - [(card insert, apdu's, card remove) re= peat] - ... -kill/quit | | | = | - vscclient | | | = | - | VSC_ReaderRemove | | detach = | - | | | = | usb device removed. - - -8. libcacard - -Both ccid-card-emulated and vscclient use libcacard as the card emulator. -libcacard implements a completely virtual CAC (DoD standard for smart -cards) compliant card and uses NSS to retrieve certificates and do -any encryption. The backend can then be a real reader and card, or -certificates stored in files. - -For documentation of the library see docs/libcacard.txt. - diff --git a/docs/system/device-emulation.rst b/docs/system/device-emulatio= n.rst index 0b3a3d73ad..ae8dd233e8 100644 --- a/docs/system/device-emulation.rst +++ b/docs/system/device-emulation.rst @@ -83,6 +83,7 @@ Emulated Devices :maxdepth: 1 =20 devices/can.rst + devices/ccid.rst devices/ivshmem.rst devices/net.rst devices/nvme.rst diff --git a/docs/system/devices/ccid.rst b/docs/system/devices/ccid.rst new file mode 100644 index 0000000000..3b8c2ab46a --- /dev/null +++ b/docs/system/devices/ccid.rst @@ -0,0 +1,171 @@ +Chip Card Interface Device (CCID) +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D + +USB CCID device +--------------- +The USB CCID device is a USB device implementing the CCID specification, w= hich +lets one connect smart card readers that implement the same spec. For more +information see the specification:: + + Universal Serial Bus + Device Class: Smart Card + CCID + Specification for + Integrated Circuit(s) Cards Interface Devices + Revision 1.1 + April 22rd, 2005 + +Smartcards are used for authentication, single sign on, decryption in +public/private schemes and digital signatures. A smartcard reader on the c= lient +cannot be used on a guest with simple usb passthrough since it will then n= ot be +available on the client, possibly locking the computer when it is "removed= ". On +the other hand this device can let you use the smartcard on both the clien= t and +the guest machine. It is also possible to have a completely virtual smart = card +reader and smart card (i.e. not backed by a physical device) using this de= vice. + +Building +-------- +The cryptographic functions and access to the physical card is done via the +libcacard library, whose development package must be installed prior to +building QEMU: + +In redhat/fedora:: + + yum install libcacard-devel + +In ubuntu:: + + apt-get install libcacard-dev + +Configuring and building:: + + ./configure --enable-smartcard && make + +Using ccid-card-emulated with hardware +-------------------------------------- +Assuming you have a working smartcard on the host with the current +user, using libcacard, QEMU acts as another client using ccid-card-emulate= d:: + + qemu -usb -device usb-ccid -device ccid-card-emulated + +Using ccid-card-emulated with certificates stored in files +---------------------------------------------------------- +You must create the CA and card certificates. This is a one time process. +We use NSS certificates:: + + mkdir fake-smartcard + cd fake-smartcard + certutil -N -d sql:$PWD + certutil -S -d sql:$PWD -s "CN=3DFake Smart Card CA" -x -t TC,TC,TC -n f= ake-smartcard-ca + certutil -S -d sql:$PWD -t ,, -s "CN=3DJohn Doe" -n id-cert -c fake-smar= tcard-ca + certutil -S -d sql:$PWD -t ,, -s "CN=3DJohn Doe (signing)" --nsCertType = smime -n signing-cert -c fake-smartcard-ca + certutil -S -d sql:$PWD -t ,, -s "CN=3DJohn Doe (encryption)" --nsCertTy= pe sslClient -n encryption-cert -c fake-smartcard-ca + +Note: you must have exactly three certificates. + +You can use the emulated card type with the certificates backend:: + + qemu -usb -device usb-ccid -device ccid-card-emulated,backend=3Dcertific= ates,db=3Dsql:$PWD,cert1=3Did-cert,cert2=3Dsigning-cert,cert3=3Dencryption-= cert + +To use the certificates in the guest, export the CA certificate:: + + certutil -L -r -d sql:$PWD -o fake-smartcard-ca.cer -n fake-smartcard-ca + +and import it in the guest:: + + certutil -A -d /etc/pki/nssdb -i fake-smartcard-ca.cer -t TC,TC,TC -n fa= ke-smartcard-ca + +In a Linux guest you can then use the CoolKey PKCS #11 module to access +the card:: + + certutil -d /etc/pki/nssdb -L -h all + +It will prompt you for the PIN (which is the password you assigned to the +certificate database early on), and then show you all three certificates +together with the manually imported CA cert:: + + Certificate Nickname Trust Attributes + fake-smartcard-ca CT,C,C + John Doe:CAC ID Certificate u,u,u + John Doe:CAC Email Signature Certificate u,u,u + John Doe:CAC Email Encryption Certificate u,u,u + +If this does not happen, CoolKey is not installed or not registered with +NSS. Registration can be done from Firefox or the command line:: + + modutil -dbdir /etc/pki/nssdb -add "CAC Module" -libfile /usr/lib64/pkcs= 11/libcoolkeypk11.so + modutil -dbdir /etc/pki/nssdb -list + +Using ccid-card-passthru with client side hardware +-------------------------------------------------- +On the host specify the ccid-card-passthru device with a suitable chardev:: + + qemu -chardev socket,server=3Don,host=3D0.0.0.0,port=3D2001,id=3Dccid,wa= it=3Doff \ + -usb -device usb-ccid -device ccid-card-passthru,chardev=3Dccid + +On the client run vscclient, built when you built QEMU:: + + vscclient 2001 + +Using ccid-card-passthru with client side certificates +------------------------------------------------------ +This case is not particularly useful, but you can use it to debug +your setup. + +Follow instructions above, except run QEMU and vscclient as follows. + +Run qemu as per above, and run vscclient from the "fake-smartcard" +directory as follows:: + + qemu -chardev socket,server=3Don,host=3D0.0.0.0,port=3D2001,id=3Dccid,wa= it=3Doff \ + -usb -device usb-ccid -device ccid-card-passthru,chardev=3Dccid + vscclient -e "db=3D\"sql:$PWD\" use_hw=3Dno soft=3D(,Test,CAC,,id-cert,s= igning-cert,encryption-cert)" 2001 + + +Passthrough protocol scenario +----------------------------- +This is a typical interchange of messages when using the passthru card dev= ice. +usb-ccid is a usb device. It defaults to an unattached usb device on start= up. +usb-ccid expects a chardev and expects the protocol defined in +cac_card/vscard_common.h to be passed over that. +The usb-ccid device can be in one of three modes: + +* detached +* attached with no card +* attached with card + +A typical interchange is (the arrow shows who started each exchange, it ca= n be client +originated or guest originated):: + + client event | vscclient | passthru | usb-c= cid | guest event + ------------------------------------------------------------------------= ------------------------ + | VSC_Init | | = | + | VSC_ReaderAdd | | attac= h | + | | | = | sees new usb device. + card inserted -> | | | = | + | VSC_ATR | insert | inser= t | see new card + | | | = | + | VSC_APDU | VSC_APDU | = | <- guest sends APDU + client <-> physical | | | = | + card APDU exchange | | | = | + client response -> | VSC_APDU | VSC_APDU | = | receive APDU response + ... + [APDU<->APDU repeats several times] + ... + card removed -> | | | = | + | VSC_CardRemove | remove | remove= | card removed + ... + [(card insert, apdu's, card remove) = repeat] + ... + kill/quit | | | = | + vscclient | | | = | + | VSC_ReaderRemove | | detach= | + | | | = | usb device removed. + +libcacard +--------- +Both ccid-card-emulated and vscclient use libcacard as the card emulator. +libcacard implements a completely virtual CAC (DoD standard for smart +cards) compliant card and uses NSS to retrieve certificates and do +any encryption. The backend can then be a real reader and card, or +certificates stored in files. --=20 2.27.0 From nobody Sun May 5 09:17:53 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1650452014909292.69191679814674; Wed, 20 Apr 2022 03:53:34 -0700 (PDT) Received: from localhost ([::1]:35758 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nh7xl-0006BB-R3 for importer@patchew.org; Wed, 20 Apr 2022 06:53:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59050) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nh7eT-0001Pk-ME for qemu-devel@nongnu.org; Wed, 20 Apr 2022 06:33:39 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:20868) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nh7eR-0006s5-Uk for qemu-devel@nongnu.org; Wed, 20 Apr 2022 06:33:37 -0400 Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-126-KXmlhPCsMqq9BCIZbUGF4Q-1; Wed, 20 Apr 2022 06:33:32 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 7F0EB29AA3B5; Wed, 20 Apr 2022 10:33:31 +0000 (UTC) Received: from thuth.com (unknown [10.39.195.200]) by smtp.corp.redhat.com (Postfix) with ESMTP id 34F1FC52CA5; Wed, 20 Apr 2022 10:33:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1650450815; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=U9cjgYdCEzeIrhMniFxHd0y1Nu0HQPmgmWnrgAeNGek=; b=aBP/YrgQmUhyF3c9ofz+ghXCkK6KdapmgBHrILX/gPAybJ6WS2LfzYrrNNCblW78QKJ8ec bbA6uMAvh3GVoe290pwZulOSlqcW0cqpgqlaKlQVtlirtmlbwoR2ru7p0N3QZroTD5RW/v XtjjbZ4rQR7PDzEbVEF21WIf4YBSZ6I= X-MC-Unique: KXmlhPCsMqq9BCIZbUGF4Q-1 From: Thomas Huth To: qemu-devel@nongnu.org, Richard Henderson , Peter Maydell Subject: [PULL 6/7] hw: Add compat machines for 7.1 Date: Wed, 20 Apr 2022 12:33:08 +0200 Message-Id: <20220420103309.264479-7-thuth@redhat.com> In-Reply-To: <20220420103309.264479-1-thuth@redhat.com> References: <20220420103309.264479-1-thuth@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 2.85 on 10.11.54.8 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -28 X-Spam_score: -2.9 X-Spam_bar: -- X-Spam_report: (-2.9 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.082, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Eric Farman , Cornelia Huck , Laurent Vivier , Yanan Wang , Eric Auger , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1650452015364100001 From: Cornelia Huck Add 7.1 machine types for arm/i440fx/m68k/q35/s390x/spapr. Signed-off-by: Cornelia Huck Message-Id: <20220316145521.1224083-1-cohuck@redhat.com> Reviewed-by: Eric Farman Reviewed-by: C=C3=A9dric Le Goater Acked-by: Laurent Vivier Reviewed-by: Eric Auger Reviewed-by: Yanan Wang Signed-off-by: Thomas Huth --- include/hw/boards.h | 3 +++ include/hw/i386/pc.h | 3 +++ hw/arm/virt.c | 9 ++++++++- hw/core/machine.c | 3 +++ hw/i386/pc.c | 3 +++ hw/i386/pc_piix.c | 14 +++++++++++++- hw/i386/pc_q35.c | 13 ++++++++++++- hw/m68k/virt.c | 9 ++++++++- hw/ppc/spapr.c | 15 +++++++++++++-- hw/s390x/s390-virtio-ccw.c | 14 +++++++++++++- 10 files changed, 79 insertions(+), 7 deletions(-) diff --git a/include/hw/boards.h b/include/hw/boards.h index c92ac8815c..d64b5481e8 100644 --- a/include/hw/boards.h +++ b/include/hw/boards.h @@ -380,6 +380,9 @@ struct MachineState { } \ type_init(machine_initfn##_register_types) =20 +extern GlobalProperty hw_compat_7_0[]; +extern const size_t hw_compat_7_0_len; + extern GlobalProperty hw_compat_6_2[]; extern const size_t hw_compat_6_2_len; =20 diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h index 1a27de9c8b..637367dc5f 100644 --- a/include/hw/i386/pc.h +++ b/include/hw/i386/pc.h @@ -202,6 +202,9 @@ void pc_madt_cpu_entry(AcpiDeviceIf *adev, int uid, /* sgx.c */ void pc_machine_init_sgx_epc(PCMachineState *pcms); =20 +extern GlobalProperty pc_compat_7_0[]; +extern const size_t pc_compat_7_0_len; + extern GlobalProperty pc_compat_6_2[]; extern const size_t pc_compat_6_2_len; =20 diff --git a/hw/arm/virt.c b/hw/arm/virt.c index d2e5ecd234..9284f7d28e 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -3022,10 +3022,17 @@ static void machvirt_machine_init(void) } type_init(machvirt_machine_init); =20 +static void virt_machine_7_1_options(MachineClass *mc) +{ +} +DEFINE_VIRT_MACHINE_AS_LATEST(7, 1) + static void virt_machine_7_0_options(MachineClass *mc) { + virt_machine_7_1_options(mc); + compat_props_add(mc->compat_props, hw_compat_7_0, hw_compat_7_0_len); } -DEFINE_VIRT_MACHINE_AS_LATEST(7, 0) +DEFINE_VIRT_MACHINE(7, 0) =20 static void virt_machine_6_2_options(MachineClass *mc) { diff --git a/hw/core/machine.c b/hw/core/machine.c index 1e23fdc14b..cb9bbc844d 100644 --- a/hw/core/machine.c +++ b/hw/core/machine.c @@ -37,6 +37,9 @@ #include "hw/virtio/virtio.h" #include "hw/virtio/virtio-pci.h" =20 +GlobalProperty hw_compat_7_0[] =3D {}; +const size_t hw_compat_7_0_len =3D G_N_ELEMENTS(hw_compat_7_0); + GlobalProperty hw_compat_6_2[] =3D { { "PIIX4_PM", "x-not-migrate-acpi-index", "on"}, }; diff --git a/hw/i386/pc.c b/hw/i386/pc.c index fd55fc725c..23bba9d82c 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -95,6 +95,9 @@ #include "trace.h" #include CONFIG_DEVICES =20 +GlobalProperty pc_compat_7_0[] =3D {}; +const size_t pc_compat_7_0_len =3D G_N_ELEMENTS(pc_compat_7_0); + GlobalProperty pc_compat_6_2[] =3D { { "virtio-mem", "unplugged-inaccessible", "off" }, }; diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index b72c03d0a6..4c185c72d0 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386/pc_piix.c @@ -415,7 +415,7 @@ static void pc_i440fx_machine_options(MachineClass *m) machine_class_allow_dynamic_sysbus_dev(m, TYPE_VMBUS_BRIDGE); } =20 -static void pc_i440fx_7_0_machine_options(MachineClass *m) +static void pc_i440fx_7_1_machine_options(MachineClass *m) { PCMachineClass *pcmc =3D PC_MACHINE_CLASS(m); pc_i440fx_machine_options(m); @@ -424,6 +424,18 @@ static void pc_i440fx_7_0_machine_options(MachineClass= *m) pcmc->default_cpu_version =3D 1; } =20 +DEFINE_I440FX_MACHINE(v7_1, "pc-i440fx-7.1", NULL, + pc_i440fx_7_1_machine_options); + +static void pc_i440fx_7_0_machine_options(MachineClass *m) +{ + pc_i440fx_7_1_machine_options(m); + m->alias =3D NULL; + m->is_default =3D false; + compat_props_add(m->compat_props, hw_compat_7_0, hw_compat_7_0_len); + compat_props_add(m->compat_props, pc_compat_7_0, pc_compat_7_0_len); +} + DEFINE_I440FX_MACHINE(v7_0, "pc-i440fx-7.0", NULL, pc_i440fx_7_0_machine_options); =20 diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c index 1780f79bc1..302288342a 100644 --- a/hw/i386/pc_q35.c +++ b/hw/i386/pc_q35.c @@ -360,7 +360,7 @@ static void pc_q35_machine_options(MachineClass *m) m->max_cpus =3D 288; } =20 -static void pc_q35_7_0_machine_options(MachineClass *m) +static void pc_q35_7_1_machine_options(MachineClass *m) { PCMachineClass *pcmc =3D PC_MACHINE_CLASS(m); pc_q35_machine_options(m); @@ -368,6 +368,17 @@ static void pc_q35_7_0_machine_options(MachineClass *m) pcmc->default_cpu_version =3D 1; } =20 +DEFINE_Q35_MACHINE(v7_1, "pc-q35-7.1", NULL, + pc_q35_7_1_machine_options); + +static void pc_q35_7_0_machine_options(MachineClass *m) +{ + pc_q35_7_1_machine_options(m); + m->alias =3D NULL; + compat_props_add(m->compat_props, hw_compat_7_0, hw_compat_7_0_len); + compat_props_add(m->compat_props, pc_compat_7_0, pc_compat_7_0_len); +} + DEFINE_Q35_MACHINE(v7_0, "pc-q35-7.0", NULL, pc_q35_7_0_machine_options); =20 diff --git a/hw/m68k/virt.c b/hw/m68k/virt.c index 7de8b5f833..e215aa3d42 100644 --- a/hw/m68k/virt.c +++ b/hw/m68k/virt.c @@ -315,10 +315,17 @@ type_init(virt_machine_register_types) } \ type_init(machvirt_machine_##major##_##minor##_init); =20 +static void virt_machine_7_1_options(MachineClass *mc) +{ +} +DEFINE_VIRT_MACHINE(7, 1, true) + static void virt_machine_7_0_options(MachineClass *mc) { + virt_machine_7_1_options(mc); + compat_props_add(mc->compat_props, hw_compat_7_0, hw_compat_7_0_len); } -DEFINE_VIRT_MACHINE(7, 0, true) +DEFINE_VIRT_MACHINE(7, 0, false) =20 static void virt_machine_6_2_options(MachineClass *mc) { diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index cc11fcc8b2..22569305d2 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -4702,15 +4702,26 @@ static void spapr_machine_latest_class_options(Mach= ineClass *mc) } \ type_init(spapr_machine_register_##suffix) =20 +/* + * pseries-7.1 + */ +static void spapr_machine_7_1_class_options(MachineClass *mc) +{ + /* Defaults for the latest behaviour inherited from the base class */ +} + +DEFINE_SPAPR_MACHINE(7_1, "7.1", true); + /* * pseries-7.0 */ static void spapr_machine_7_0_class_options(MachineClass *mc) { - /* Defaults for the latest behaviour inherited from the base class */ + spapr_machine_7_1_class_options(mc); + compat_props_add(mc->compat_props, hw_compat_7_0, hw_compat_7_0_len); } =20 -DEFINE_SPAPR_MACHINE(7_0, "7.0", true); +DEFINE_SPAPR_MACHINE(7_0, "7.0", false); =20 /* * pseries-6.2 diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c index 2d32647d08..8fa488d13a 100644 --- a/hw/s390x/s390-virtio-ccw.c +++ b/hw/s390x/s390-virtio-ccw.c @@ -792,14 +792,26 @@ bool css_migration_enabled(void) } = \ type_init(ccw_machine_register_##suffix) =20 +static void ccw_machine_7_1_instance_options(MachineState *machine) +{ +} + +static void ccw_machine_7_1_class_options(MachineClass *mc) +{ +} +DEFINE_CCW_MACHINE(7_1, "7.1", true); + static void ccw_machine_7_0_instance_options(MachineState *machine) { + ccw_machine_7_1_instance_options(machine); } =20 static void ccw_machine_7_0_class_options(MachineClass *mc) { + ccw_machine_7_1_class_options(mc); + compat_props_add(mc->compat_props, hw_compat_7_0, hw_compat_7_0_len); } -DEFINE_CCW_MACHINE(7_0, "7.0", true); +DEFINE_CCW_MACHINE(7_0, "7.0", false); =20 static void ccw_machine_6_2_instance_options(MachineState *machine) { --=20 2.27.0 From nobody Sun May 5 09:17:53 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1650451574524495.9238221458136; Wed, 20 Apr 2022 03:46:14 -0700 (PDT) Received: from localhost ([::1]:50854 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nh7qf-0006Wv-Ef for importer@patchew.org; Wed, 20 Apr 2022 06:46:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59068) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nh7eW-0001Sx-RX for qemu-devel@nongnu.org; Wed, 20 Apr 2022 06:33:40 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:57572) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nh7eV-0006se-4q for qemu-devel@nongnu.org; Wed, 20 Apr 2022 06:33:40 -0400 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-135-0fPdRzR0P0aGMDH0sqKRbA-1; Wed, 20 Apr 2022 06:33:35 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id F2A6C18A6583; Wed, 20 Apr 2022 10:33:34 +0000 (UTC) Received: from thuth.com (unknown [10.39.195.200]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0D12FC52CA5; Wed, 20 Apr 2022 10:33:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1650450818; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=3c0z3U84XOIWhtTX2pEQ6pAkGIeMLDxfYaaSkIEmZh8=; b=KcakBGh4sJcHE22KTZWp+J+lLYDa7qfDRVHBJSQXi0njG2xrs5vQyGVW2m2lMlhmYVfp/l pp3INdmY2aROVq/3pKxMqFEL1vVlWAC8bqsLPiiKYTwXcwmudPPFlvfzmyZnQp8WFlMalb 33rlun5v2iBrVeP4msVphVFpvto8988= X-MC-Unique: 0fPdRzR0P0aGMDH0sqKRbA-1 From: Thomas Huth To: qemu-devel@nongnu.org, Richard Henderson , Peter Maydell Subject: [PULL 7/7] tests/avocado: Allow overwrite smp and memory size command line options Date: Wed, 20 Apr 2022 12:33:09 +0200 Message-Id: <20220420103309.264479-8-thuth@redhat.com> In-Reply-To: <20220420103309.264479-1-thuth@redhat.com> References: <20220420103309.264479-1-thuth@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 2.85 on 10.11.54.8 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -28 X-Spam_score: -2.9 X-Spam_bar: -- X-Spam_report: (-2.9 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.082, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ahmed Abouzied , Philippe Mathieu-Daude , Wainer dos Santos Moschetta Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1650451575950100001 Content-Type: text/plain; charset="utf-8" From: Ahmed Abouzied Removes the hard-coded values in setUp(). Class inheriting from avocado_qemu.LinuxTest can overwrite the default smp and memory instead. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/453 Signed-off-by: Ahmed Abouzied Message-Id: <20210802222257.50946-1-email@aabouzied.com> Reviewed-by: Wainer dos Santos Moschetta Reviewed-by: Philippe Mathieu-Daude Signed-off-by: Thomas Huth --- tests/avocado/avocado_qemu/__init__.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/avocado/avocado_qemu/__init__.py b/tests/avocado/avocado= _qemu/__init__.py index ac85e36a4d..39f15c1d51 100644 --- a/tests/avocado/avocado_qemu/__init__.py +++ b/tests/avocado/avocado_qemu/__init__.py @@ -516,6 +516,8 @@ class LinuxTest(LinuxSSHMixIn, QemuSystemTest): distro =3D None username =3D 'root' password =3D 'password' + smp =3D '2' + memory =3D '1024' =20 def _set_distro(self): distro_name =3D self.params.get( @@ -546,8 +548,8 @@ def _set_distro(self): def setUp(self, ssh_pubkey=3DNone, network_device_type=3D'virtio-net'): super().setUp() self._set_distro() - self.vm.add_args('-smp', '2') - self.vm.add_args('-m', '1024') + self.vm.add_args('-smp', self.smp) + self.vm.add_args('-m', self.memory) # The following network device allows for SSH connections self.vm.add_args('-netdev', 'user,id=3Dvnet,hostfwd=3D:127.0.0.1:0= -:22', '-device', '%s,netdev=3Dvnet' % network_device_ty= pe) --=20 2.27.0