From nobody Sun Feb 8 23:43:03 2026 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 1640173069624829.6201949012877; Wed, 22 Dec 2021 03:37:49 -0800 (PST) Received: from localhost ([::1]:33802 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mzzwK-0005jk-LA for importer@patchew.org; Wed, 22 Dec 2021 06:37:48 -0500 Received: from eggs.gnu.org ([209.51.188.92]:51038) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mzzsa-00014k-R1 for qemu-devel@nongnu.org; Wed, 22 Dec 2021 06:33:56 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:35020) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mzzsZ-00071T-9U for qemu-devel@nongnu.org; Wed, 22 Dec 2021 06:33:56 -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-613-RdGqzlsOOYKUCzfaUwDkdw-1; Wed, 22 Dec 2021 06:33:47 -0500 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 mimecast-mx01.redhat.com (Postfix) with ESMTPS id A53551023F53; Wed, 22 Dec 2021 11:33:46 +0000 (UTC) Received: from thuth.com (unknown [10.39.192.135]) by smtp.corp.redhat.com (Postfix) with ESMTP id E90BE7B01D; Wed, 22 Dec 2021 11:33:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1640172833; 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=ePwBjrIdXczl3c2wHRgJ1SmHdaUFXtRhV80KcYS6f1s=; b=UitgY+m9tYyGa6dXsdC3ju44TFPuUuy0KyEoXL+ZZmz16buy3GavnjYNdyYjhTnUSTKrS8 sMHgS8HSRSytCWa8TohqZzju8f5w09xJEAmenfBEvMHs5zUpRK6AfMIB4ScaeEBFg8+fyh MoWK2KXxiAD4eVyzggpYneoFErDBC+E= X-MC-Unique: RdGqzlsOOYKUCzfaUwDkdw-1 From: Thomas Huth To: qemu-devel@nongnu.org Subject: [PULL 1/9] failover: Silence warning messages during qtest Date: Wed, 22 Dec 2021 12:32:51 +0100 Message-Id: <20211222113259.823203-2-thuth@redhat.com> In-Reply-To: <20211222113259.823203-1-thuth@redhat.com> References: <20211222113259.823203-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 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-Type: text/plain; charset="utf-8" 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.129.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -29 X-Spam_score: -3.0 X-Spam_bar: --- X-Spam_report: (-3.0 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.203, 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_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 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 , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Jason Wang , Richard Henderson 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: 1640173071645100001 From: Laurent Vivier virtio-net-failover test tries several device combinations that produces some expected warnings. These warning can be confusing, so we disable them during the qtest sequence. Reported-by: Thomas Huth Signed-off-by: Laurent Vivier Message-Id: <20211220145314.390697-1-lvivier@redhat.com> Reviewed-by: Philippe Mathieu-Daud=C3=A9 Acked-by: Jason Wang [thuth: Fix memory leak by using error_free()] Signed-off-by: Thomas Huth --- hw/net/virtio-net.c | 7 ++++++- migration/migration.c | 4 +++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c index f2014d5ea0..cf8ab0f8af 100644 --- a/hw/net/virtio-net.c +++ b/hw/net/virtio-net.c @@ -44,6 +44,7 @@ #include "hw/pci/pci.h" #include "net_rx_pkt.h" #include "hw/virtio/vhost.h" +#include "sysemu/qtest.h" =20 #define VIRTIO_NET_VM_VERSION 11 =20 @@ -926,7 +927,11 @@ static void virtio_net_set_features(VirtIODevice *vdev= , uint64_t features) qatomic_set(&n->failover_primary_hidden, false); failover_add_primary(n, &err); if (err) { - warn_report_err(err); + if (!qtest_enabled()) { + warn_report_err(err); + } else { + error_free(err); + } } } } diff --git a/migration/migration.c b/migration/migration.c index 3de11ae921..0652165610 100644 --- a/migration/migration.c +++ b/migration/migration.c @@ -60,6 +60,7 @@ #include "qemu/yank.h" #include "sysemu/cpus.h" #include "yank_functions.h" +#include "sysemu/qtest.h" =20 #define MAX_THROTTLE (128 << 20) /* Migration transfer speed throttl= ing */ =20 @@ -3766,7 +3767,8 @@ static void qemu_savevm_wait_unplug(MigrationState *s= , int old_state, while (timeout-- && qemu_savevm_state_guest_unplug_pending()) { qemu_sem_timedwait(&s->wait_unplug_sem, 250); } - if (qemu_savevm_state_guest_unplug_pending()) { + if (qemu_savevm_state_guest_unplug_pending() && + !qtest_enabled()) { warn_report("migration: partially unplugged device on " "failure"); } --=20 2.27.0 From nobody Sun Feb 8 23:43:03 2026 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 1640173101608893.5973746737805; Wed, 22 Dec 2021 03:38:21 -0800 (PST) Received: from localhost ([::1]:34694 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mzzwq-0006KX-Fa for importer@patchew.org; Wed, 22 Dec 2021 06:38:20 -0500 Received: from eggs.gnu.org ([209.51.188.92]:51028) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mzzsb-00011C-6L for qemu-devel@nongnu.org; Wed, 22 Dec 2021 06:33:57 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:54146) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mzzsX-00071E-7x for qemu-devel@nongnu.org; Wed, 22 Dec 2021 06:33:55 -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-641-YwEp-zZIPYaCiqmAmDB0Wg-1; Wed, 22 Dec 2021 06:33:49 -0500 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 mimecast-mx01.redhat.com (Postfix) with ESMTPS id 8FA7081CCB4; Wed, 22 Dec 2021 11:33:48 +0000 (UTC) Received: from thuth.com (unknown [10.39.192.135]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2FA357B015; Wed, 22 Dec 2021 11:33:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1640172832; 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=q7HEwSW5CmcozoOgGeD5JmUQ5/pq/T+6BVd8h5XX9RM=; b=A5jEtQBRqwT5nMHF+Kt+bfLZNh+sP/qYP18QwK50zEiKs2wlgqP9rpMB+jIXYMTFCvzwD7 HH9pI8Lww9C+qwFXaiwDSZv8BwIyb9eUcS/qUIr5/7HMHYZkK/7uC0JMBYXz7KDk0NzJfz +esJImWnHX80+yAvxsUCZ2Ulm4Q7Pc4= X-MC-Unique: YwEp-zZIPYaCiqmAmDB0Wg-1 From: Thomas Huth To: qemu-devel@nongnu.org Subject: [PULL 2/9] tests/qtest/boot-serial-test: Silence the warning about deprecated sga device Date: Wed, 22 Dec 2021 12:32:52 +0100 Message-Id: <20211222113259.823203-3-thuth@redhat.com> In-Reply-To: <20211222113259.823203-1-thuth@redhat.com> References: <20211222113259.823203-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 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-Type: text/plain; charset="utf-8" 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.129.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -29 X-Spam_score: -3.0 X-Spam_bar: --- X-Spam_report: (-3.0 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.203, 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_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 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?= , Richard Henderson 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: 1640173102357100001 When running the qtests, there are currently a bunch of warnings about the deprecated sga device during the boot-serial-test. Switch to "-M graphics=3Doff" to silence these warnings. Message-Id: <20211220164042.397028-1-thuth@redhat.com> Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Signed-off-by: Thomas Huth --- tests/qtest/boot-serial-test.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/qtest/boot-serial-test.c b/tests/qtest/boot-serial-test.c index 4d8e1343bd..d72a82d629 100644 --- a/tests/qtest/boot-serial-test.c +++ b/tests/qtest/boot-serial-test.c @@ -157,11 +157,11 @@ static testdef_t tests[] =3D { { "ppc64", "powernv8", "", "OPAL" }, { "ppc64", "powernv9", "", "OPAL" }, { "ppc64", "sam460ex", "-device e1000", "8086 100e" }, - { "i386", "isapc", "-cpu qemu32 -device sga", "SGABIOS" }, - { "i386", "pc", "-device sga", "SGABIOS" }, - { "i386", "q35", "-device sga", "SGABIOS" }, - { "x86_64", "isapc", "-cpu qemu32 -device sga", "SGABIOS" }, - { "x86_64", "q35", "-device sga", "SGABIOS" }, + { "i386", "isapc", "-cpu qemu32 -M graphics=3Doff", "SeaBIOS" }, + { "i386", "pc", "-M graphics=3Doff", "SeaBIOS" }, + { "i386", "q35", "-M graphics=3Doff", "SeaBIOS" }, + { "x86_64", "isapc", "-cpu qemu32 -M graphics=3Doff", "SeaBIOS" }, + { "x86_64", "q35", "-M graphics=3Doff", "SeaBIOS" }, { "sparc", "LX", "", "TMS390S10" }, { "sparc", "SS-4", "", "MB86904" }, { "sparc", "SS-600MP", "", "TMS390Z55" }, --=20 2.27.0 From nobody Sun Feb 8 23:43:03 2026 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 1640173341278172.84670955795332; Wed, 22 Dec 2021 03:42:21 -0800 (PST) Received: from localhost ([::1]:42410 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n000i-00038a-1R for importer@patchew.org; Wed, 22 Dec 2021 06:42:20 -0500 Received: from eggs.gnu.org ([209.51.188.92]:51078) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mzzsd-00017S-EY for qemu-devel@nongnu.org; Wed, 22 Dec 2021 06:34:00 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:42144) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mzzsb-00071r-5l for qemu-devel@nongnu.org; Wed, 22 Dec 2021 06:33:59 -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-453-jLXCcWuQNaSHO4gNwPGI2g-1; Wed, 22 Dec 2021 06:33:51 -0500 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 mimecast-mx01.redhat.com (Postfix) with ESMTPS id 7B1F0344AF; Wed, 22 Dec 2021 11:33:50 +0000 (UTC) Received: from thuth.com (unknown [10.39.192.135]) by smtp.corp.redhat.com (Postfix) with ESMTP id E90607B01D; Wed, 22 Dec 2021 11:33:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1640172836; 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=KnA4d834X7x0MMRZLyTCguOZv4E8PuzWzd6W57KV73o=; b=NZhlCTOZerilBhIpzUgBGNK1O4kVC/E0uH/YCnThxNs2c9GB37Aj1axFJLmJUS25Hiy3yI 3XGbsxxkqDzEUz9j9nXOLZhnddpY/O7iafawpjkmkz8H55wBn8isNp3sKeRLtvCCZAdupe G7A5Z4kBNKch3+DFlb6trSozprwU4fI= X-MC-Unique: jLXCcWuQNaSHO4gNwPGI2g-1 From: Thomas Huth To: qemu-devel@nongnu.org Subject: [PULL 3/9] tests/qtest: Make the filter tests independent from a specific NIC Date: Wed, 22 Dec 2021 12:32:53 +0100 Message-Id: <20211222113259.823203-4-thuth@redhat.com> In-Reply-To: <20211222113259.823203-1-thuth@redhat.com> References: <20211222113259.823203-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 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.129.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -29 X-Spam_score: -3.0 X-Spam_bar: --- X-Spam_report: (-3.0 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.203, 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_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 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: Zhang Chen , Richard Henderson 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: 1640173341834100001 Content-Type: text/plain; charset="utf-8" These filter tests need a NIC, no matter which one, so they use a common NIC by default. However, these common NIC models might not always have been compiled into the QEMU target binary, so assuming that a certain NIC is available is a bad idea. Since the exact type of NIC does not really matter for these tests, let's switch to "-nic" instead of "-netdev" so that QEMU can simply pick a default NIC for us. This way we can now run the tests on other targets that have a default machine with an on-board/default NIC, too. Signed-off-by: Thomas Huth Message-Id: <20211220103025.311759-1-thuth@redhat.com> Reviewed-by: Zhang Chen Signed-off-by: Thomas Huth --- tests/qtest/meson.build | 40 +++++++++++++++++++++------- tests/qtest/test-filter-mirror.c | 10 ++----- tests/qtest/test-filter-redirector.c | 20 +++----------- tests/qtest/test-netfilter.c | 8 +----- 4 files changed, 38 insertions(+), 40 deletions(-) diff --git a/tests/qtest/meson.build b/tests/qtest/meson.build index 1b2bde6660..37e1eaa449 100644 --- a/tests/qtest/meson.build +++ b/tests/qtest/meson.build @@ -47,7 +47,6 @@ qtests_i386 =3D \ (have_tools ? ['ahci-test'] : []) + = \ (config_all_devices.has_key('CONFIG_ISA_TESTDEV') ? ['endianness-test'] = : []) + \ (config_all_devices.has_key('CONFIG_SGA') ? ['boot-serial-test'] : []) += \ - (config_all_devices.has_key('CONFIG_RTL8139_PCI') ? ['test-filter-redire= ctor'] : []) + \ (config_all_devices.has_key('CONFIG_ISA_IPMI_KCS') ? ['ipmi-kcs-test'] := []) + \ (config_host.has_key('CONFIG_LINUX') and = \ config_all_devices.has_key('CONFIG_ISA_IPMI_BT') ? ['ipmi-bt-test'] : [= ]) + \ @@ -90,7 +89,9 @@ qtests_i386 =3D \ 'vmgenid-test', 'migration-test', 'test-x86-cpuid-compat', - 'numa-test'] + 'numa-test', + 'test-filter-redirector' + ] =20 if dbus_display qtests_i386 +=3D ['dbus-display-test'] @@ -113,31 +114,49 @@ endif =20 qtests_x86_64 =3D qtests_i386 =20 -qtests_alpha =3D [ 'boot-serial-test' ] + = \ +qtests_alpha =3D ['boot-serial-test'] + \ + ['test-filter-mirror', 'test-filter-redirector'] + \ + (slirp.found() ? ['test-netfilter'] : []) + \ (config_all_devices.has_key('CONFIG_VGA') ? ['display-vga-test'] : []) =20 qtests_avr =3D [ 'boot-serial-test' ] =20 -qtests_hppa =3D [ 'boot-serial-test' ] + = \ +qtests_hppa =3D ['boot-serial-test'] + \ + ['test-filter-mirror', 'test-filter-redirector'] + \ + (slirp.found() ? ['test-netfilter'] : []) + \ (config_all_devices.has_key('CONFIG_VGA') ? ['display-vga-test'] : []) =20 -qtests_m68k =3D [ 'boot-serial-test' ] -qtests_microblaze =3D [ 'boot-serial-test' ] +qtests_m68k =3D ['boot-serial-test'] + \ + ['test-filter-mirror', 'test-filter-redirector'] + \ + (slirp.found() ? ['test-netfilter'] : []) + +qtests_microblaze =3D ['boot-serial-test'] + \ + ['test-filter-mirror', 'test-filter-redirector'] + \ + (slirp.found() ? ['test-netfilter'] : []) + qtests_microblazeel =3D qtests_microblaze =20 qtests_mips =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'] : []) =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'] : []) =20 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'] : []) =20 qtests_ppc =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_M48T59') ? ['m48t59-test'] : []) + = \ ['boot-order-test', 'prom-env-test', 'boot-serial-test'] = \ @@ -147,19 +166,22 @@ qtests_ppc64 =3D \ (config_all_devices.has_key('CONFIG_PSERIES') ? ['device-plug-test'] : [= ]) + \ (config_all_devices.has_key('CONFIG_POWERNV') ? ['pnv-xscom-test'] : [])= + \ (config_all_devices.has_key('CONFIG_PSERIES') ? ['rtas-test'] : []) + = \ - (slirp.found() ? ['pxe-test', 'test-netfilter'] : []) + \ + (slirp.found() ? ['pxe-test'] : []) + \ (config_all_devices.has_key('CONFIG_USB_UHCI') ? ['usb-hcd-uhci-test'] := []) + \ (config_all_devices.has_key('CONFIG_USB_XHCI_NEC') ? ['usb-hcd-xhci-test= '] : []) + \ - (config_host.has_key('CONFIG_POSIX') ? ['test-filter-mirror'] : []) + = \ qtests_pci + ['migration-test', 'numa-test', 'cpu-plug-test', 'drive_del= -test'] =20 qtests_sh4 =3D (config_all_devices.has_key('CONFIG_ISA_TESTDEV') ? ['endia= nness-test'] : []) qtests_sh4eb =3D (config_all_devices.has_key('CONFIG_ISA_TESTDEV') ? ['end= ianness-test'] : []) =20 -qtests_sparc =3D ['prom-env-test', 'm48t59-test', 'boot-serial-test'] +qtests_sparc =3D ['prom-env-test', 'm48t59-test', 'boot-serial-test'] + \ + ['test-filter-mirror', 'test-filter-redirector'] + \ + (slirp.found() ? ['test-netfilter'] : []) =20 qtests_sparc64 =3D \ (config_all_devices.has_key('CONFIG_ISA_TESTDEV') ? ['endianness-test'] = : []) + \ + (slirp.found() ? ['test-netfilter'] : []) + \ + ['test-filter-mirror', 'test-filter-redirector'] + \ ['prom-env-test', 'boot-serial-test'] =20 qtests_npcm7xx =3D \ diff --git a/tests/qtest/test-filter-mirror.c b/tests/qtest/test-filter-mir= ror.c index bc0dee64dd..95367d14d3 100644 --- a/tests/qtest/test-filter-mirror.c +++ b/tests/qtest/test-filter-mirror.c @@ -28,13 +28,8 @@ static void test_mirror(void) char *recv_buf; uint32_t size =3D sizeof(send_buf); size =3D htonl(size); - const char *devstr =3D "e1000"; QTestState *qts; =20 - if (g_str_equal(qtest_get_arch(), "s390x")) { - devstr =3D "virtio-net-ccw"; - } - ret =3D socketpair(PF_UNIX, SOCK_STREAM, 0, send_sock); g_assert_cmpint(ret, !=3D, -1); =20 @@ -42,11 +37,10 @@ static void test_mirror(void) g_assert_cmpint(ret, !=3D, -1); =20 qts =3D qtest_initf( - "-netdev socket,id=3Dqtest-bn0,fd=3D%d " - "-device %s,netdev=3Dqtest-bn0,id=3Dqtest-e0 " + "-nic socket,id=3Dqtest-bn0,fd=3D%d " "-chardev socket,id=3Dmirror0,fd=3D%d " "-object filter-mirror,id=3Dqtest-f0,netdev=3Dqtest-bn0,queue=3Dtx= ,outdev=3Dmirror0 " - , send_sock[1], devstr, recv_sock[1]); + , send_sock[1], recv_sock[1]); =20 struct iovec iov[] =3D { { diff --git a/tests/qtest/test-filter-redirector.c b/tests/qtest/test-filter= -redirector.c index 4269b2cdd9..4f3f59cba8 100644 --- a/tests/qtest/test-filter-redirector.c +++ b/tests/qtest/test-filter-redirector.c @@ -62,16 +62,6 @@ /* TODO actually test the results and get rid of this */ #define qmp_discard_response(qs, ...) qobject_unref(qtest_qmp(qs, __VA_ARG= S__)) =20 -static const char *get_devstr(void) -{ - if (g_str_equal(qtest_get_arch(), "s390x")) { - return "virtio-net-ccw"; - } - - return "rtl8139"; -} - - static void test_redirector_tx(void) { int backend_sock[2], recv_sock; @@ -93,8 +83,7 @@ static void test_redirector_tx(void) g_assert_cmpint(ret, !=3D, -1); =20 qts =3D qtest_initf( - "-netdev socket,id=3Dqtest-bn0,fd=3D%d " - "-device %s,netdev=3Dqtest-bn0,id=3Dqtest-e0 " + "-nic socket,id=3Dqtest-bn0,fd=3D%d " "-chardev socket,id=3Dredirector0,path=3D%s,server=3Don,wait=3Doff= " "-chardev socket,id=3Dredirector1,path=3D%s,server=3Don,wait=3Doff= " "-chardev socket,id=3Dredirector2,path=3D%s " @@ -103,7 +92,7 @@ static void test_redirector_tx(void) "-object filter-redirector,id=3Dqtest-f1,netdev=3Dqtest-bn0," "queue=3Dtx,indev=3Dredirector2 " "-object filter-redirector,id=3Dqtest-f2,netdev=3Dqtest-bn0," - "queue=3Dtx,outdev=3Dredirector1 ", backend_sock[1], get_devstr(), + "queue=3Dtx,outdev=3Dredirector1 ", backend_sock[1], sock_path0, sock_path1, sock_path0); =20 recv_sock =3D unix_connect(sock_path1, NULL); @@ -163,8 +152,7 @@ static void test_redirector_rx(void) g_assert_cmpint(ret, !=3D, -1); =20 qts =3D qtest_initf( - "-netdev socket,id=3Dqtest-bn0,fd=3D%d " - "-device %s,netdev=3Dqtest-bn0,id=3Dqtest-e0 " + "-nic socket,id=3Dqtest-bn0,fd=3D%d " "-chardev socket,id=3Dredirector0,path=3D%s,server=3Don,wait=3Doff= " "-chardev socket,id=3Dredirector1,path=3D%s,server=3Don,wait=3Doff= " "-chardev socket,id=3Dredirector2,path=3D%s " @@ -173,7 +161,7 @@ static void test_redirector_rx(void) "-object filter-redirector,id=3Dqtest-f1,netdev=3Dqtest-bn0," "queue=3Drx,outdev=3Dredirector2 " "-object filter-redirector,id=3Dqtest-f2,netdev=3Dqtest-bn0," - "queue=3Drx,indev=3Dredirector1 ", backend_sock[1], get_devstr(), + "queue=3Drx,indev=3Dredirector1 ", backend_sock[1], sock_path0, sock_path1, sock_path0); =20 struct iovec iov[] =3D { diff --git a/tests/qtest/test-netfilter.c b/tests/qtest/test-netfilter.c index 785b6f3226..b09ef7fae9 100644 --- a/tests/qtest/test-netfilter.c +++ b/tests/qtest/test-netfilter.c @@ -178,11 +178,6 @@ int main(int argc, char **argv) { int ret; char *args; - const char *devstr =3D "e1000"; - - if (g_str_equal(qtest_get_arch(), "s390x")) { - devstr =3D "virtio-net-ccw"; - } =20 g_test_init(&argc, &argv, NULL); qtest_add_func("/netfilter/addremove_one", add_one_netfilter); @@ -192,8 +187,7 @@ int main(int argc, char **argv) qtest_add_func("/netfilter/remove_netdev_multi", remove_netdev_with_multi_netfilter); =20 - args =3D g_strdup_printf("-netdev user,id=3Dqtest-bn0 " - "-device %s,netdev=3Dqtest-bn0", devstr); + args =3D g_strdup_printf("-nic user,id=3Dqtest-bn0"); qtest_start(args); ret =3D g_test_run(); =20 --=20 2.27.0 From nobody Sun Feb 8 23:43:03 2026 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 164017302905247.35149688928891; Wed, 22 Dec 2021 03:37:09 -0800 (PST) Received: from localhost ([::1]:60172 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mzzvg-0004TK-2F for importer@patchew.org; Wed, 22 Dec 2021 06:37:08 -0500 Received: from eggs.gnu.org ([209.51.188.92]:51124) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mzzss-0001EB-Ea for qemu-devel@nongnu.org; Wed, 22 Dec 2021 06:34:16 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:60530) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mzzsf-00072G-0o for qemu-devel@nongnu.org; Wed, 22 Dec 2021 06:34:02 -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-152-gAF_jUbbOeaj67Gn8hGQfA-1; Wed, 22 Dec 2021 06:33:53 -0500 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 mimecast-mx01.redhat.com (Postfix) with ESMTPS id D313A344AF; Wed, 22 Dec 2021 11:33:52 +0000 (UTC) Received: from thuth.com (unknown [10.39.192.135]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0FCCC7B015; Wed, 22 Dec 2021 11:33:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1640172839; 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=yvm2gTsfNk5eQoHi6FOvOaupdeHDRW59fCfzQtFQypc=; b=hQQovUb/OHlmfHMiksG8rDdhYk6S8Get+MJCPPsm21/rEduVft1ssfbxVNZ7IjwY/Mq1iD v1GeMRPBVeqqsHo40kkbwYI7LQPHq+cj4yoPekSgDoD/HqL48yvvlvtK3rn94q+sAfLP/g HaDKBGrwwN6GPu/qgOxntIO9vltVS5g= X-MC-Unique: gAF_jUbbOeaj67Gn8hGQfA-1 From: Thomas Huth To: qemu-devel@nongnu.org Subject: [PULL 4/9] MAINTAINERS: Update COLO Proxy section Date: Wed, 22 Dec 2021 12:32:54 +0100 Message-Id: <20211222113259.823203-5-thuth@redhat.com> In-Reply-To: <20211222113259.823203-1-thuth@redhat.com> References: <20211222113259.823203-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 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-Type: text/plain; charset="utf-8" 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: -29 X-Spam_score: -3.0 X-Spam_bar: --- X-Spam_report: (-3.0 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.203, 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_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 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: Zhang Chen , Richard Henderson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= 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: 1640173029649100001 From: Zhang Chen Signed-off-by: Zhang Chen Message-Id: <20211221080400.1492980-1-chen.zhang@intel.com> Reviewed-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Thomas Huth --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index 5dcefc0d01..5456536805 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2987,6 +2987,7 @@ F: docs/colo-proxy.txt F: net/colo* F: net/filter-rewriter.c F: net/filter-mirror.c +F: tests/qtest/test-filter* =20 Record/replay M: Pavel Dovgalyuk --=20 2.27.0 From nobody Sun Feb 8 23:43:03 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=1640173224; cv=none; d=zohomail.com; s=zohoarc; b=PAt8fF/OS47lBONRBUk2u/hVjncZNKjlqWdiJrEnjjaFU2mDAhmOwU5w1tq1RomlLY6fZg29Dv4R3R7lU06gEYDKkfwJ+A0IptpQNCFAWsKOjutAVyeuG34zuCm3OJfobYmBlaebklbt3zydI/iK6icBni/GKBrQQ+t8bsiUWwI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1640173224; 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=ULItV55ClMD89PONenpXjyxWa6vKn3YoZCOn0zOTF+Y=; b=JMf0CCTuDz8z7sqJl7ZdUeAmXxxvxG/X8HTtOv5qL9ZAiT4E7zsPrcLkaK45AbZn3h92z7cdTIBKh4CQnoHabvnTCFsSQS6SxG+KYr8QJSOeJb/zW21LQQuIw+WZ+mo6WVh4vl+REvAwzmEA3pWqS7T5/Iqu3WzbAAhb9eVDyWs= 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 1640173224171580.7590890109069; Wed, 22 Dec 2021 03:40:24 -0800 (PST) Received: from localhost ([::1]:39696 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mzzym-0001Dz-Ka for importer@patchew.org; Wed, 22 Dec 2021 06:40:20 -0500 Received: from eggs.gnu.org ([209.51.188.92]:51090) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mzzsf-00017o-9Q for qemu-devel@nongnu.org; Wed, 22 Dec 2021 06:34:02 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:47265) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mzzsc-00071x-53 for qemu-devel@nongnu.org; Wed, 22 Dec 2021 06:33:59 -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-302-pQeZ49FwMy-dZHd-hLqpCQ-1; Wed, 22 Dec 2021 06:33:56 -0500 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 mimecast-mx01.redhat.com (Postfix) with ESMTPS id 7F370801962; Wed, 22 Dec 2021 11:33:55 +0000 (UTC) Received: from thuth.com (unknown [10.39.192.135]) by smtp.corp.redhat.com (Postfix) with ESMTP id 52F7E7B015; Wed, 22 Dec 2021 11:33:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1640172837; 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=ULItV55ClMD89PONenpXjyxWa6vKn3YoZCOn0zOTF+Y=; b=X1zsSxNMf1dQrEmsbKen80BqTnfd7QxLc/Swim0sCV4ZqLZwUChwOk8Wtnek0Kq8k24xRS 5TT2oBjy4hIcO5qoTwMP2YLuAJ0jhraQZoWlsdJRtS0HHv4YfWwPVcF1+xL8vGItT8W1mO ji+wwAK6pHRnDYHDbBm3PqFzXXIi0fI= X-MC-Unique: pQeZ49FwMy-dZHd-hLqpCQ-1 From: Thomas Huth To: qemu-devel@nongnu.org Subject: [PULL 5/9] tests/qtest: Add a function that checks whether a device is available Date: Wed, 22 Dec 2021 12:32:55 +0100 Message-Id: <20211222113259.823203-6-thuth@redhat.com> In-Reply-To: <20211222113259.823203-1-thuth@redhat.com> References: <20211222113259.823203-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 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: -29 X-Spam_score: -3.0 X-Spam_bar: --- X-Spam_report: (-3.0 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.203, 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_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 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: Richard Henderson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1640173225266100001 Content-Type: text/plain; charset="utf-8" Devices might not always be compiled into the QEMU target binaries. We already have the libqos framework that is good for handling such situations, but some of the qtests are not a real good fit for the libqos framework. Let's add a qtest_has_device() function for such tests instead. Message-Id: <20211220081054.151515-2-thuth@redhat.com> Signed-off-by: Thomas Huth --- tests/qtest/libqos/libqtest.h | 8 +++++++ tests/qtest/libqtest.c | 44 +++++++++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+) diff --git a/tests/qtest/libqos/libqtest.h b/tests/qtest/libqos/libqtest.h index a6d38d7ef7..cf38d273f5 100644 --- a/tests/qtest/libqos/libqtest.h +++ b/tests/qtest/libqos/libqtest.h @@ -718,6 +718,14 @@ void qtest_cb_for_every_machine(void (*cb)(const char = *machine), */ bool qtest_has_machine(const char *machine); =20 +/** + * qtest_has_device: + * @device: The device to look for + * + * Returns: true if the device is available in the target binary. + */ +bool qtest_has_device(const char *device); + /** * qtest_qmp_device_add_qdict: * @qts: QTestState instance to operate on diff --git a/tests/qtest/libqtest.c b/tests/qtest/libqtest.c index a68326caae..41f4da4e54 100644 --- a/tests/qtest/libqtest.c +++ b/tests/qtest/libqtest.c @@ -1418,6 +1418,50 @@ bool qtest_has_machine(const char *machine) return false; } =20 +bool qtest_has_device(const char *device) +{ + static QList *list; + const QListEntry *p; + QObject *qobj; + QString *qstr; + QDict *devinfo; + int idx; + + if (!list) { + QDict *resp; + QDict *args; + QTestState *qts =3D qtest_init("-machine none"); + + args =3D qdict_new(); + qdict_put_bool(args, "abstract", false); + qdict_put_str(args, "implements", "device"); + + resp =3D qtest_qmp(qts, "{'execute': 'qom-list-types', 'arguments'= : %p }", + args); + g_assert(qdict_haskey(resp, "return")); + list =3D qdict_get_qlist(resp, "return"); + qobject_ref(list); + qobject_unref(resp); + + qtest_quit(qts); + } + + for (p =3D qlist_first(list), idx =3D 0; p; p =3D qlist_next(p), idx++= ) { + devinfo =3D qobject_to(QDict, qlist_entry_obj(p)); + g_assert(devinfo); + + qobj =3D qdict_get(devinfo, "name"); + g_assert(qobj); + qstr =3D qobject_to(QString, qobj); + g_assert(qstr); + if (g_str_equal(qstring_get_str(qstr), device)) { + return true; + } + } + + return false; +} + /* * Generic hot-plugging test via the device_add QMP commands. */ --=20 2.27.0 From nobody Sun Feb 8 23:43:03 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=1640173587; cv=none; d=zohomail.com; s=zohoarc; b=NbVaW9fSYyb3xj905EFVXK4I3kvX9OF/PyHgg8usqjR2BcHNVOP0B+O8PuqYVXqPNuZxU+YjGOfKjqPMSbX841VmWVTfCzRLmxS0W9qTxobw3yG7/xgTLrhtS9Z2M3osfsO+p2iNwGared/pSpZfKaYkfONP9Vhdl6DLSEHLUrU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1640173587; 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=+VfZjxbclXGxpSGf66sql3q/0k8675QShcJgFOeJNuA=; b=RThdHsdtwbU1/SlbzX5wGesEFDcWgBVAMWdWyW65YFerPmUu292YiVbkTtzfl1I3eKCQIxXpHU45kBgocC/rv8quhnSIZkARUhXgcrR2JGiLstNEBIGuFASYso/j18Dy+hpPkP5GLnWdwAmN/ZLKmhfZeWClEIs1KReSJI/ApqE= 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 1640173587913120.41200187929098; Wed, 22 Dec 2021 03:46:27 -0800 (PST) Received: from localhost ([::1]:51208 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n004g-0000fA-TX for importer@patchew.org; Wed, 22 Dec 2021 06:46:26 -0500 Received: from eggs.gnu.org ([209.51.188.92]:51122) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mzzss-0001EA-EW for qemu-devel@nongnu.org; Wed, 22 Dec 2021 06:34:16 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:26746) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mzzse-00072E-Tt for qemu-devel@nongnu.org; Wed, 22 Dec 2021 06:34:02 -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-518-vr9jNuz6NFiZP9fD54E64A-1; Wed, 22 Dec 2021 06:33:57 -0500 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 mimecast-mx01.redhat.com (Postfix) with ESMTPS id F053D1023F4D; Wed, 22 Dec 2021 11:33:56 +0000 (UTC) Received: from thuth.com (unknown [10.39.192.135]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0D8F57B015; Wed, 22 Dec 2021 11:33:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1640172839; 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=+VfZjxbclXGxpSGf66sql3q/0k8675QShcJgFOeJNuA=; b=i2xKzzCeNhUYi27mgM4CwhFrohgKuJ7M+DE4T+x6tKLHoVFUCiNZj9nx5JonustDh1cOvU IfqDZfcv30ag+7VS2E/wRN9R+azz0f1AMTO2B+UvsXBLxO0LTo7u4snC7QNogpC4Ffaevs Nh0tSlYvv/lY8XhKyv7yZbZn4jomXTU= X-MC-Unique: vr9jNuz6NFiZP9fD54E64A-1 From: Thomas Huth To: qemu-devel@nongnu.org Subject: [PULL 6/9] tests/qtest: Improve endianness-test to work with missing machines and devices Date: Wed, 22 Dec 2021 12:32:56 +0100 Message-Id: <20211222113259.823203-7-thuth@redhat.com> In-Reply-To: <20211222113259.823203-1-thuth@redhat.com> References: <20211222113259.823203-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 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: -29 X-Spam_score: -3.0 X-Spam_bar: --- X-Spam_report: (-3.0 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.203, 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_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 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: Richard Henderson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1640173588689100001 Content-Type: text/plain; charset="utf-8" The users might have built QEMU with less machines or without the i82378 superio device. Add some checks to the endianess-test so that it is able to deal with such stripped down QEMU versions, too. Message-Id: <20211220081054.151515-3-thuth@redhat.com> Signed-off-by: Thomas Huth --- tests/qtest/endianness-test.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/qtest/endianness-test.c b/tests/qtest/endianness-test.c index 09ecb531f1..9c03b72dc9 100644 --- a/tests/qtest/endianness-test.c +++ b/tests/qtest/endianness-test.c @@ -281,7 +281,10 @@ int main(int argc, char **argv) =20 for (i =3D 0; test_cases[i].arch; i++) { gchar *path; - if (strcmp(test_cases[i].arch, arch) !=3D 0) { + + if (!g_str_equal(test_cases[i].arch, arch) || + !qtest_has_machine(test_cases[i].machine) || + (test_cases[i].superio && !qtest_has_device(test_cases[i].supe= rio))) { continue; } path =3D g_strdup_printf("endianness/%s", --=20 2.27.0 From nobody Sun Feb 8 23:43:03 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=1640173295; cv=none; d=zohomail.com; s=zohoarc; b=XpFaIMh9uG2KEOpZJwV3+9L4rAvY2NSMjlYT9N5recQ546GXS+zuhV1OcKQVZaDbnmOZUfPTsK/1eUkmxoI8aq2rtd2JrMYMGXlHEZHeL/zVMAbLOnnNuO24KKJNIUVxChtvocC6DXtuyxK/JApI4U8yHRC/cuuVnHbZUtwtIls= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1640173295; 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=6nLHH+PavWlXtin13BQXlBnd2GGMZZrZTTES7htzRf0=; b=aGedCKOp7DgD1KlZOPL/7b6MCow6AYMdEZ9Lu7Wl6sfjpoqI06HHuh2DV+FoC06/R0TYzy2O4eJuOYOrUGXZYQJzDjW+F2xBH/nLXIJSyu9Nd+NOTd4FuWU3ZKWJJROEvMR9EjU9I0Qt0O7/K6RHc360s6XtmZ/wh/Z/1WYKXs8= 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 1640173295279252.22013564613246; Wed, 22 Dec 2021 03:41:35 -0800 (PST) Received: from localhost ([::1]:40542 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mzzzy-0001nm-6n for importer@patchew.org; Wed, 22 Dec 2021 06:41:34 -0500 Received: from eggs.gnu.org ([209.51.188.92]:51158) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mzzsw-0001JS-RL for qemu-devel@nongnu.org; Wed, 22 Dec 2021 06:34:18 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:45253) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mzzso-00072c-BS for qemu-devel@nongnu.org; Wed, 22 Dec 2021 06:34:15 -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-440-wYAOb5NjNdOk_m6FvjLXwA-1; Wed, 22 Dec 2021 06:33:59 -0500 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 mimecast-mx01.redhat.com (Postfix) with ESMTPS id 8EEC11006AA4; Wed, 22 Dec 2021 11:33:58 +0000 (UTC) Received: from thuth.com (unknown [10.39.192.135]) by smtp.corp.redhat.com (Postfix) with ESMTP id 84C8C78DFB; Wed, 22 Dec 2021 11:33:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1640172845; 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=6nLHH+PavWlXtin13BQXlBnd2GGMZZrZTTES7htzRf0=; b=KtZVRa7kQVFamzL+8v4TwZuTFvu0lEroqK1Vr+JaEYuK6zzsUq2g2l/cqpLbI4hfMNCGE6 zaW1lpJNmjRNOl+lylQNmoMOam+CQfXQpQkqq++V98puy6Vg4euKEydO64KklN/Vg2s4m2 2hYil8/R/wQndDJh8tINenyuuhmO/ig= X-MC-Unique: wYAOb5NjNdOk_m6FvjLXwA-1 From: Thomas Huth To: qemu-devel@nongnu.org Subject: [PULL 7/9] tests/qtest/cdrom-test: Check whether devices are available before using them Date: Wed, 22 Dec 2021 12:32:57 +0100 Message-Id: <20211222113259.823203-8-thuth@redhat.com> In-Reply-To: <20211222113259.823203-1-thuth@redhat.com> References: <20211222113259.823203-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 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: -29 X-Spam_score: -3.0 X-Spam_bar: --- X-Spam_report: (-3.0 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.203, 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_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 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: Richard Henderson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1640173297201100003 Content-Type: text/plain; charset="utf-8" Downstream users might want to disable legacy devices in their binaries, so we should not blindly assume that they are available. Add some proper checks before using them. Message-Id: <20211220081054.151515-4-thuth@redhat.com> Signed-off-by: Thomas Huth --- tests/qtest/cdrom-test.c | 60 ++++++++++++++++++++++++++-------------- 1 file changed, 39 insertions(+), 21 deletions(-) diff --git a/tests/qtest/cdrom-test.c b/tests/qtest/cdrom-test.c index c1fcac5c45..cfca24fa94 100644 --- a/tests/qtest/cdrom-test.c +++ b/tests/qtest/cdrom-test.c @@ -142,21 +142,36 @@ static void add_x86_tests(void) qtest_add_data_func("cdrom/boot/isapc", "-M isapc " "-drive if=3Dide,media=3Dcdrom,file=3D", test_= cdboot); } - qtest_add_data_func("cdrom/boot/am53c974", - "-device am53c974 -device scsi-cd,drive=3Dcd1 " - "-drive if=3Dnone,id=3Dcd1,format=3Draw,file=3D", = test_cdboot); - qtest_add_data_func("cdrom/boot/dc390", - "-device dc390 -device scsi-cd,drive=3Dcd1 " - "-blockdev file,node-name=3Dcd1,filename=3D", test= _cdboot); - qtest_add_data_func("cdrom/boot/lsi53c895a", - "-device lsi53c895a -device scsi-cd,drive=3Dcd1 " - "-blockdev file,node-name=3Dcd1,filename=3D", test= _cdboot); - qtest_add_data_func("cdrom/boot/megasas", "-M q35 " - "-device megasas -device scsi-cd,drive=3Dcd1 " - "-blockdev file,node-name=3Dcd1,filename=3D", test= _cdboot); - qtest_add_data_func("cdrom/boot/megasas-gen2", "-M q35 " - "-device megasas-gen2 -device scsi-cd,drive=3Dcd1 " - "-blockdev file,node-name=3Dcd1,filename=3D", test= _cdboot); + if (qtest_has_device("am53c974")) { + qtest_add_data_func("cdrom/boot/am53c974", + "-device am53c974 -device scsi-cd,drive=3Dcd1 " + "-drive if=3Dnone,id=3Dcd1,format=3Draw,file= =3D", + test_cdboot); + } + if (qtest_has_device("dc390")) { + qtest_add_data_func("cdrom/boot/dc390", + "-device dc390 -device scsi-cd,drive=3Dcd1 " + "-blockdev file,node-name=3Dcd1,filename=3D", + test_cdboot); + } + if (qtest_has_device("lsi53c895a")) { + qtest_add_data_func("cdrom/boot/lsi53c895a", + "-device lsi53c895a -device scsi-cd,drive=3Dcd= 1 " + "-blockdev file,node-name=3Dcd1,filename=3D", + test_cdboot); + } + if (qtest_has_device("megasas")) { + qtest_add_data_func("cdrom/boot/megasas", "-M q35 " + "-device megasas -device scsi-cd,drive=3Dcd1 " + "-blockdev file,node-name=3Dcd1,filename=3D", + test_cdboot); + } + if (qtest_has_device("megasas-gen2")) { + qtest_add_data_func("cdrom/boot/megasas-gen2", "-M q35 " + "-device megasas-gen2 -device scsi-cd,drive=3D= cd1 " + "-blockdev file,node-name=3Dcd1,filename=3D", + test_cdboot); + } } =20 static void add_s390x_tests(void) @@ -171,12 +186,15 @@ static void add_s390x_tests(void) "-drive driver=3Dnull-co,read-zeroes=3Don,if=3Dnon= e,id=3Dd1 " "-device virtio-blk,drive=3Dd2,bootindex=3D1 " "-drive if=3Dnone,id=3Dd2,media=3Dcdrom,file=3D", = test_cdboot); - qtest_add_data_func("cdrom/boot/without-bootindex", - "-device virtio-scsi -device virtio-serial " - "-device x-terminal3270 -device virtio-blk,drive= =3Dd1 " - "-drive driver=3Dnull-co,read-zeroes=3Don,if=3Dnon= e,id=3Dd1 " - "-device virtio-blk,drive=3Dd2 " - "-drive if=3Dnone,id=3Dd2,media=3Dcdrom,file=3D", = test_cdboot); + if (qtest_has_device("x-terminal3270")) { + qtest_add_data_func("cdrom/boot/without-bootindex", + "-device virtio-scsi -device virtio-serial " + "-device x-terminal3270 -device virtio-blk,dri= ve=3Dd1 " + "-drive driver=3Dnull-co,read-zeroes=3Don,if= =3Dnone,id=3Dd1 " + "-device virtio-blk,drive=3Dd2 " + "-drive if=3Dnone,id=3Dd2,media=3Dcdrom,file= =3D", + test_cdboot); + } } =20 int main(int argc, char **argv) --=20 2.27.0 From nobody Sun Feb 8 23:43:03 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=1640173590; cv=none; d=zohomail.com; s=zohoarc; b=DcCIMBR899+nb+pYCHIWt+uNfDu+pJLna56AghEsatCMmbsgp9uN7LMNMK5gZeaeDZ3yLZRRpgEx6c2mAO5tZVKrhIHxIsdC9yC7693Zbnrl3jnQeW8tuE6TRMCaVlaUYKIU+ikUk8a+b7XuHbZRP0AjOWigo4o2xB5e0LgMm2E= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1640173590; 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=udEztULZ4lqPUg1czD/LOzeZJLmpXbIItISvorfhQIk=; b=UnaKRqP8LufIKBWEhW1Wi97TZa3uyT6pTNH8Mcn3RzEfZxKfc9xV5r8EAwbydHUcrVdAQ9ZnVt2UqZ5ALrvfUtiuKhAIhLQF7eKVXeQj/jTzfKCOGoagC7GHqlU5uok1Twnv6levbo7H9OcjkqTCkIvE64AyNAuIynDoUP66nN8= 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 1640173590895436.7385800069345; Wed, 22 Dec 2021 03:46:30 -0800 (PST) Received: from localhost ([::1]:51650 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n004j-0000xg-Us for importer@patchew.org; Wed, 22 Dec 2021 06:46:30 -0500 Received: from eggs.gnu.org ([209.51.188.92]:51154) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mzzsw-0001JB-P9 for qemu-devel@nongnu.org; Wed, 22 Dec 2021 06:34:18 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:22774) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mzzsi-00072W-MH for qemu-devel@nongnu.org; Wed, 22 Dec 2021 06:34:15 -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-449-ZetR0qGLNdGcwK0UPKirwQ-1; Wed, 22 Dec 2021 06:34:00 -0500 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 mimecast-mx01.redhat.com (Postfix) with ESMTPS id DC691801ADB; Wed, 22 Dec 2021 11:33:59 +0000 (UTC) Received: from thuth.com (unknown [10.39.192.135]) by smtp.corp.redhat.com (Postfix) with ESMTP id ED34378DFB; Wed, 22 Dec 2021 11:33:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1640172842; 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=udEztULZ4lqPUg1czD/LOzeZJLmpXbIItISvorfhQIk=; b=PelFmp8Yyk7yI7q74DeLl4u0yna2wZ5tJ+eBfRbv9/tW8c4VE6M/7Lls0yojO3Zv8sUuvh B8S+5bmkjpUuo+5f+W77QJ1SL+AMN/E6xzD30/PSK+6H8IfKpbxzsbzcbw97pinCT1gnvh D1iO33T4ODYodlfJZ3bngyuDDzOhiWA= X-MC-Unique: ZetR0qGLNdGcwK0UPKirwQ-1 From: Thomas Huth To: qemu-devel@nongnu.org Subject: [PULL 8/9] tests/qtest/boot-order-test: Check whether machines are available Date: Wed, 22 Dec 2021 12:32:58 +0100 Message-Id: <20211222113259.823203-9-thuth@redhat.com> In-Reply-To: <20211222113259.823203-1-thuth@redhat.com> References: <20211222113259.823203-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 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.129.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -29 X-Spam_score: -3.0 X-Spam_bar: --- X-Spam_report: (-3.0 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.203, 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_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 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: Richard Henderson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1640173591272100001 Content-Type: text/plain; charset="utf-8" Machines might not always be compiled into the QEMU binary, so we should skip the test instead of failing if it is not available. Message-Id: <20211220081054.151515-5-thuth@redhat.com> Signed-off-by: Thomas Huth --- tests/qtest/boot-order-test.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/qtest/boot-order-test.c b/tests/qtest/boot-order-test.c index fac580d6c4..f1f59b1261 100644 --- a/tests/qtest/boot-order-test.c +++ b/tests/qtest/boot-order-test.c @@ -34,6 +34,11 @@ static void test_a_boot_order(const char *machine, uint64_t actual; QTestState *qts; =20 + if (machine && !qtest_has_machine(machine)) { + g_test_skip("Machine is not available"); + return; + } + qts =3D qtest_initf("-nodefaults%s%s %s", machine ? " -M " : "", machine ?: "", test_args); actual =3D read_boot_order(qts); --=20 2.27.0 From nobody Sun Feb 8 23:43:03 2026 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 1640173391854454.87341454167927; Wed, 22 Dec 2021 03:43:11 -0800 (PST) Received: from localhost ([::1]:43218 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n001T-0003gl-Ck for importer@patchew.org; Wed, 22 Dec 2021 06:43:10 -0500 Received: from eggs.gnu.org ([209.51.188.92]:51156) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mzzsw-0001JC-PE for qemu-devel@nongnu.org; Wed, 22 Dec 2021 06:34:18 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:48588) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mzzss-00072v-5W for qemu-devel@nongnu.org; Wed, 22 Dec 2021 06:34:16 -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-255-N-NgwmUdMMObprNlRlH1eA-1; Wed, 22 Dec 2021 06:34:02 -0500 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 mimecast-mx01.redhat.com (Postfix) with ESMTPS id 5B40781CCB4; Wed, 22 Dec 2021 11:34:01 +0000 (UTC) Received: from thuth.com (unknown [10.39.192.135]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3E26F7B015; Wed, 22 Dec 2021 11:34:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1640172848; 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=Xykkt6Z3Ra1B4KvEgNzsN/0gvucadKbt9IM1q85ysJo=; b=f+H0LsNjpTYZyqkcfYzjBbO8L/EHv6w74wVGbXDO5gPs1BIoPhBRYAKQzTu7N8sczSfrS7 GuT9CJi+5+8z/e/BUr/5TvSJOsRo3mwyxMqXNGmF5NMxI0IMow6AzaWUdGn9ucWpfYs+7I USXx5zngplZ9jga4Il4kmBwK/cAb6bs= X-MC-Unique: N-NgwmUdMMObprNlRlH1eA-1 From: Thomas Huth To: qemu-devel@nongnu.org Subject: [PULL 9/9] tests/qtest/virtio-net-failover: Use g_file_open_tmp() to create temporary file Date: Wed, 22 Dec 2021 12:32:59 +0100 Message-Id: <20211222113259.823203-10-thuth@redhat.com> In-Reply-To: <20211222113259.823203-1-thuth@redhat.com> References: <20211222113259.823203-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 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-Type: text/plain; charset="utf-8" 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.129.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -29 X-Spam_score: -3.0 X-Spam_bar: --- X-Spam_report: (-3.0 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.203, 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_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 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?= , Richard Henderson 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: 1640173392790100001 g_test_rand_int() must not be called before g_test_init(), otherwise the glib will show a "g_rand_int: assertion 'rand !=3D NULL' failed" message in the log. So we could change the order here, but actually, it's safer to use g_file_open_tmp() anyway, so let's use that function now instead. Reported-by: Philippe Mathieu-Daud=C3=A9 Suggested-by: Richard Henderson Message-Id: <20211222083652.776592-1-thuth@redhat.com> Signed-off-by: Thomas Huth --- tests/qtest/virtio-net-failover.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tests/qtest/virtio-net-failover.c b/tests/qtest/virtio-net-fai= lover.c index 4b2ba8a106..22ad54bb95 100644 --- a/tests/qtest/virtio-net-failover.c +++ b/tests/qtest/virtio-net-failover.c @@ -1306,13 +1306,15 @@ static void test_multi_in(gconstpointer opaque) =20 int main(int argc, char **argv) { - const gchar *tmpdir =3D g_get_tmp_dir(); - gchar *tmpfile =3D g_strdup_printf("%s/failover_test_migrate-%u-%u", - tmpdir, getpid(), g_test_rand_int()); + gchar *tmpfile; int ret; =20 g_test_init(&argc, &argv, NULL); =20 + ret =3D g_file_open_tmp("failover_test_migrate-XXXXXX", &tmpfile, NULL= ); + g_assert_true(ret >=3D 0); + close(ret); + qtest_add_func("failover-virtio-net/params/error/id", test_error_id); qtest_add_func("failover-virtio-net/params/error/pcie", test_error_pci= e); qtest_add_func("failover-virtio-net/params/on", test_on); --=20 2.27.0