From nobody Sun Feb 8 17:28:12 2026 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=1645445597; cv=none; d=zohomail.com; s=zohoarc; b=UB3l1wByIMq6ctHHpiyR24lXCCpwtFc1ezidxV1O0VSqcY0DMZ4zA5loM1fVwXPLJJc5dfQSqxdMa7vKHRZNedmRU/Uts9ufZ9FLVsyI4iJP0URmDtwGETou3tZEcMFAXnFXVGjnapZknRGyuxALHw/Bgw8LinGyId0NQwysFT0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1645445597; 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=7SfeLVQvW3QhCwiN0g1lj2EogeRm2oo4dajVxTWNLuQ=; b=k4IZGkYvJqljnknWFRFYAPl/4PmihF1vu3qacg4F6InDx51YiJtMGl4+VGg+WDT64cYWWLuK9JkSnOH6v7K1fbFmW4VwVFGbMQcOzNXRbyYToGz+cp4Liz4hfGY1XTJ/tWYbeC4qz4r5MZx5VFAjwGjfECsNRiLLP6YOMXZkDxw= 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 1645445597974539.1246920869945; Mon, 21 Feb 2022 04:13:17 -0800 (PST) Received: from localhost ([::1]:60114 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nM7Z6-0004Sk-Ib for importer@patchew.org; Mon, 21 Feb 2022 07:13:16 -0500 Received: from eggs.gnu.org ([209.51.188.92]:50144) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nM7NN-0003qS-8d for qemu-devel@nongnu.org; Mon, 21 Feb 2022 07:01:14 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:29949) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nM7NJ-0000of-Hj for qemu-devel@nongnu.org; Mon, 21 Feb 2022 07:01:07 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-218-QL-pilqHPcmGmliHs_Q5aw-1; Mon, 21 Feb 2022 07:01:01 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id EB1298144E2; Mon, 21 Feb 2022 12:01:00 +0000 (UTC) Received: from thuth.com (unknown [10.39.195.168]) by smtp.corp.redhat.com (Postfix) with ESMTP id E2E5773162; Mon, 21 Feb 2022 12:00:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1645444865; 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=7SfeLVQvW3QhCwiN0g1lj2EogeRm2oo4dajVxTWNLuQ=; b=RWSEhQbrtg1ZmJChc5PkMdo9UQaeJJ5roOGIDaFznMju7ByH09GEO5UsEaPyREdja4tNob UCoBZlVPjMuGZzgZ/8JWVi5/hfJPgAzmjjouV6Tj8Tx49TN8LyoFf3tU3F0PmkkV6u5i3i moRlnFl1Xaa3XuRsHAkpucrhx2rfB6E= X-MC-Unique: QL-pilqHPcmGmliHs_Q5aw-1 From: Thomas Huth To: qemu-devel@nongnu.org Subject: [PULL 02/25] tests/x86: Use 'pc' machine type for hotplug tests Date: Mon, 21 Feb 2022 12:59:45 +0100 Message-Id: <20220221120008.600114-3-thuth@redhat.com> In-Reply-To: <20220221120008.600114-1-thuth@redhat.com> References: <20220221120008.600114-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=thuth@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=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, 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: Peter Maydell , "Dr. David Alan Gilbert" Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1645445600127100001 Content-Type: text/plain; charset="utf-8" From: "Dr. David Alan Gilbert" Hotplug tests need a bridge setting up on q35, for now keep them on 'pc'. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Thomas Huth Message-Id: <20220215162537.605030-3-dgilbert@redhat.com> Signed-off-by: Thomas Huth --- tests/qtest/device-plug-test.c | 20 +++++++++++++++++-- tests/qtest/drive_del-test.c | 35 +++++++++++++++++++++++++++++----- tests/qtest/hd-geo-test.c | 4 ++-- tests/qtest/ivshmem-test.c | 7 ++++++- 4 files changed, 56 insertions(+), 10 deletions(-) diff --git a/tests/qtest/device-plug-test.c b/tests/qtest/device-plug-test.c index ad79bd4c14..404a92e132 100644 --- a/tests/qtest/device-plug-test.c +++ b/tests/qtest/device-plug-test.c @@ -63,7 +63,15 @@ static void wait_device_deleted_event(QTestState *qtest,= const char *id) =20 static void test_pci_unplug_request(void) { - QTestState *qtest =3D qtest_initf("-device virtio-mouse-pci,id=3Ddev0"= ); + const char *arch =3D qtest_get_arch(); + const char *machine_addition =3D ""; + + if (strcmp(arch, "i386") =3D=3D 0 || strcmp(arch, "x86_64") =3D=3D 0) { + machine_addition =3D "-machine pc"; + } + + QTestState *qtest =3D qtest_initf("%s -device virtio-mouse-pci,id=3Dde= v0", + machine_addition); =20 /* * Request device removal. As the guest is not running, the request wo= n't @@ -79,8 +87,16 @@ static void test_pci_unplug_request(void) =20 static void test_pci_unplug_json_request(void) { + const char *arch =3D qtest_get_arch(); + const char *machine_addition =3D ""; + + if (strcmp(arch, "i386") =3D=3D 0 || strcmp(arch, "x86_64") =3D=3D 0) { + machine_addition =3D "-machine pc"; + } + QTestState *qtest =3D qtest_initf( - "-device '{\"driver\": \"virtio-mouse-pci\", \"id\": \"dev0\"}'"); + "%s -device '{\"driver\": \"virtio-mouse-pci\", \"id\": \"dev0\"}'= ", + machine_addition); =20 /* * Request device removal. As the guest is not running, the request wo= n't diff --git a/tests/qtest/drive_del-test.c b/tests/qtest/drive_del-test.c index 8d08ee9995..0cc18dfa4a 100644 --- a/tests/qtest/drive_del-test.c +++ b/tests/qtest/drive_del-test.c @@ -235,14 +235,21 @@ static void test_drive_del_device_del(void) static void test_cli_device_del(void) { QTestState *qts; + const char *arch =3D qtest_get_arch(); + const char *machine_addition =3D ""; + + if (strcmp(arch, "i386") =3D=3D 0 || strcmp(arch, "x86_64") =3D=3D 0) { + machine_addition =3D "-machine pc"; + } =20 /* * -drive/-device and device_del. Start with a drive used by a * device that unplugs after reset. */ - qts =3D qtest_initf("-drive if=3Dnone,id=3Ddrive0,file=3Dnull-co://," + qts =3D qtest_initf("%s -drive if=3Dnone,id=3Ddrive0,file=3Dnull-co://= ," "file.read-zeroes=3Don,format=3Draw" " -device virtio-blk-%s,drive=3Ddrive0,id=3Ddev0", + machine_addition, qvirtio_get_dev_type()); =20 device_del(qts, true); @@ -266,13 +273,19 @@ static void test_empty_device_del(void) static void test_device_add_and_del(void) { QTestState *qts; + const char *arch =3D qtest_get_arch(); + const char *machine_addition =3D ""; + + if (strcmp(arch, "i386") =3D=3D 0 || strcmp(arch, "x86_64") =3D=3D 0) { + machine_addition =3D "-machine pc"; + } =20 /* * -drive/device_add and device_del. Start with a drive used by a * device that unplugs after reset. */ - qts =3D qtest_init("-drive if=3Dnone,id=3Ddrive0,file=3Dnull-co://," - "file.read-zeroes=3Don,format=3Draw"); + qts =3D qtest_initf("%s -drive if=3Dnone,id=3Ddrive0,file=3Dnull-co://= ," + "file.read-zeroes=3Don,format=3Draw", machine_additio= n); =20 device_add(qts); device_del(qts, true); @@ -284,8 +297,14 @@ static void test_device_add_and_del(void) static void test_drive_add_device_add_and_del(void) { QTestState *qts; + const char *arch =3D qtest_get_arch(); + const char *machine_addition =3D ""; + + if (strcmp(arch, "i386") =3D=3D 0 || strcmp(arch, "x86_64") =3D=3D 0) { + machine_addition =3D "-machine pc"; + } =20 - qts =3D qtest_init(""); + qts =3D qtest_init(machine_addition); =20 /* * drive_add/device_add and device_del. The drive is used by a @@ -302,8 +321,14 @@ static void test_drive_add_device_add_and_del(void) static void test_blockdev_add_device_add_and_del(void) { QTestState *qts; + const char *arch =3D qtest_get_arch(); + const char *machine_addition =3D ""; + + if (strcmp(arch, "i386") =3D=3D 0 || strcmp(arch, "x86_64") =3D=3D 0) { + machine_addition =3D "-machine pc"; + } =20 - qts =3D qtest_init(""); + qts =3D qtest_init(machine_addition); =20 /* * blockdev_add/device_add and device_del. The it drive is used by a diff --git a/tests/qtest/hd-geo-test.c b/tests/qtest/hd-geo-test.c index 3554b5d500..64023c0574 100644 --- a/tests/qtest/hd-geo-test.c +++ b/tests/qtest/hd-geo-test.c @@ -839,7 +839,7 @@ static void test_override_scsi_hot_unplug(void) =20 joined_args =3D g_strjoinv(" ", args->argv); =20 - qts =3D qtest_init(joined_args); + qts =3D qtest_initf("-machine pc %s", joined_args); fw_cfg =3D pc_fw_cfg_init(qts); =20 read_bootdevices(fw_cfg, expected); @@ -899,7 +899,7 @@ static void test_override_virtio_hot_unplug(void) =20 joined_args =3D g_strjoinv(" ", args->argv); =20 - qts =3D qtest_init(joined_args); + qts =3D qtest_initf("-machine pc %s", joined_args); fw_cfg =3D pc_fw_cfg_init(qts); =20 read_bootdevices(fw_cfg, expected); diff --git a/tests/qtest/ivshmem-test.c b/tests/qtest/ivshmem-test.c index fe94dd3b96..4e8af42a9d 100644 --- a/tests/qtest/ivshmem-test.c +++ b/tests/qtest/ivshmem-test.c @@ -385,7 +385,12 @@ static void test_ivshmem_hotplug(void) QTestState *qts; const char *arch =3D qtest_get_arch(); =20 - qts =3D qtest_init("-object memory-backend-ram,size=3D1M,id=3Dmb1"); + if (strcmp(arch, "i386") =3D=3D 0 || strcmp(arch, "x86_64") =3D=3D 0) { + qts =3D qtest_init("-object memory-backend-ram,size=3D1M,id=3Dmb1" + " -machine pc"); + } else { + qts =3D qtest_init("-object memory-backend-ram,size=3D1M,id=3Dmb1"= ); + } =20 qtest_qmp_device_add(qts, "ivshmem-plain", "iv1", "{'addr': %s, 'memdev': 'mb1'}", --=20 2.27.0