From: "Michael S. Tsirkin" <mst@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Peter Maydell" <peter.maydell@linaro.org>,
"Thomas Weißschuh" <thomas@t-8ch.de>,
"Thomas Huth" <thuth@redhat.com>,
"Cornelia Huck" <cohuck@redhat.com>,
"Laurent Vivier" <lvivier@redhat.com>,
"Paolo Bonzini" <pbonzini@redhat.com>
Subject: [PULL 32/91] tests/qtest/pvpanic: use centralized definition of supported events
Date: Tue, 2 Jul 2024 10:08:37 -0400 [thread overview]
Message-ID: <462dc749c110fe8e41ae0fb554b9bc2f2671e973.1719929191.git.mst@redhat.com> (raw)
In-Reply-To: <cover.1719929191.git.mst@redhat.com>
From: Thomas Weißschuh <thomas@t-8ch.de>
Avoid the necessity to update all tests when new events are added
to the device.
Acked-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
Message-Id: <20240527-pvpanic-shutdown-v8-4-5a28ec02558b@t-8ch.de>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
tests/qtest/pvpanic-pci-test.c | 5 +++--
tests/qtest/pvpanic-test.c | 5 +++--
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/tests/qtest/pvpanic-pci-test.c b/tests/qtest/pvpanic-pci-test.c
index 2c05b376ba..b372caf41d 100644
--- a/tests/qtest/pvpanic-pci-test.c
+++ b/tests/qtest/pvpanic-pci-test.c
@@ -16,6 +16,7 @@
#include "qapi/qmp/qdict.h"
#include "libqos/pci.h"
#include "libqos/pci-pc.h"
+#include "hw/misc/pvpanic.h"
#include "hw/pci/pci_regs.h"
static void test_panic_nopause(void)
@@ -34,7 +35,7 @@ static void test_panic_nopause(void)
bar = qpci_iomap(dev, 0, NULL);
qpci_memread(dev, bar, 0, &val, sizeof(val));
- g_assert_cmpuint(val, ==, 3);
+ g_assert_cmpuint(val, ==, PVPANIC_EVENTS);
val = 1;
qpci_memwrite(dev, bar, 0, &val, sizeof(val));
@@ -67,7 +68,7 @@ static void test_panic(void)
bar = qpci_iomap(dev, 0, NULL);
qpci_memread(dev, bar, 0, &val, sizeof(val));
- g_assert_cmpuint(val, ==, 3);
+ g_assert_cmpuint(val, ==, PVPANIC_EVENTS);
val = 1;
qpci_memwrite(dev, bar, 0, &val, sizeof(val));
diff --git a/tests/qtest/pvpanic-test.c b/tests/qtest/pvpanic-test.c
index 78f1cf8186..ccc603472f 100644
--- a/tests/qtest/pvpanic-test.c
+++ b/tests/qtest/pvpanic-test.c
@@ -10,6 +10,7 @@
#include "qemu/osdep.h"
#include "libqtest.h"
#include "qapi/qmp/qdict.h"
+#include "hw/misc/pvpanic.h"
static void test_panic_nopause(void)
{
@@ -20,7 +21,7 @@ static void test_panic_nopause(void)
qts = qtest_init("-device pvpanic -action panic=none");
val = qtest_inb(qts, 0x505);
- g_assert_cmpuint(val, ==, 3);
+ g_assert_cmpuint(val, ==, PVPANIC_EVENTS);
qtest_outb(qts, 0x505, 0x1);
@@ -43,7 +44,7 @@ static void test_panic(void)
qts = qtest_init("-device pvpanic -action panic=pause");
val = qtest_inb(qts, 0x505);
- g_assert_cmpuint(val, ==, 3);
+ g_assert_cmpuint(val, ==, PVPANIC_EVENTS);
qtest_outb(qts, 0x505, 0x1);
--
MST
next prev parent reply other threads:[~2024-07-02 14:12 UTC|newest]
Thread overview: 94+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-02 14:06 [PULL 00/91] virtio: features,fixes Michael S. Tsirkin
2024-07-02 14:06 ` [PULL 01/91] vhost: dirty log should be per backend type Michael S. Tsirkin
2024-07-02 14:07 ` [PULL 02/91] vhost: Perform memory section dirty scans once per iteration Michael S. Tsirkin
2024-07-02 14:07 ` [PULL 03/91] vhost-vdpa: check vhost_vdpa_set_vring_ready() return value Michael S. Tsirkin
2024-07-02 14:07 ` [PULL 04/91] virtio/virtio-pci: Handle extra notification data Michael S. Tsirkin
2024-07-02 14:07 ` [PULL 05/91] virtio: Prevent creation of device using notification-data with ioeventfd Michael S. Tsirkin
2024-07-02 14:07 ` [PULL 06/91] virtio-mmio: Handle extra notification data Michael S. Tsirkin
2024-07-02 14:07 ` [PULL 07/91] virtio-ccw: " Michael S. Tsirkin
2024-07-02 14:07 ` [PULL 08/91] vhost/vhost-user: Add VIRTIO_F_NOTIFICATION_DATA to vhost feature bits Michael S. Tsirkin
2024-07-02 14:07 ` [PULL 09/91] Fix vhost user assertion when sending more than one fd Michael S. Tsirkin
2024-07-02 14:07 ` [PULL 10/91] vhost-vsock: add VIRTIO_F_RING_PACKED to feature_bits Michael S. Tsirkin
2024-07-02 14:07 ` [PULL 11/91] hw/virtio: Fix obtain the buffer id from the last descriptor Michael S. Tsirkin
2024-07-02 14:07 ` [PULL 12/91] virtio-pci: only reset pm state during resetting Michael S. Tsirkin
2024-07-02 14:07 ` [PULL 13/91] vhost-user-gpu: fix import of DMABUF Michael S. Tsirkin
2024-07-02 14:07 ` [PULL 14/91] Revert "vhost-user: fix lost reconnect" Michael S. Tsirkin
2024-07-02 14:07 ` [PULL 15/91] vhost-user: fix lost reconnect again Michael S. Tsirkin
2024-07-02 14:07 ` [PULL 16/91] hw/cxl/mailbox: change CCI cmd set structure to be a member, not a reference Michael S. Tsirkin
2024-07-02 14:07 ` [PULL 17/91] hw/cxl/mailbox: interface to add CCI commands to an existing CCI Michael S. Tsirkin
2024-07-02 14:07 ` [PULL 18/91] hw/cxl/cxl-mailbox-utils: Add dc_event_log_size field to output payload of identify memory device command Michael S. Tsirkin
2024-07-02 14:07 ` [PULL 19/91] hw/cxl/cxl-mailbox-utils: Add dynamic capacity region representative and mailbox command support Michael S. Tsirkin
2024-07-02 14:07 ` [PULL 20/91] include/hw/cxl/cxl_device: Rename mem_size as static_mem_size for type3 memory devices Michael S. Tsirkin
2024-07-02 14:08 ` [PULL 21/91] hw/mem/cxl_type3: Add support to create DC regions to " Michael S. Tsirkin
2024-07-02 14:08 ` [PULL 22/91] hw/mem/cxl-type3: Refactor ct3_build_cdat_entries_for_mr to take mr size instead of mr as argument Michael S. Tsirkin
2024-07-02 14:08 ` [PULL 23/91] hw/mem/cxl_type3: Add host backend and address space handling for DC regions Michael S. Tsirkin
2024-07-02 14:08 ` [PULL 24/91] hw/mem/cxl_type3: Add DC extent list representative and get DC extent list mailbox support Michael S. Tsirkin
2024-07-02 14:08 ` [PULL 25/91] hw/cxl/cxl-mailbox-utils: Add mailbox commands to support add/release dynamic capacity response Michael S. Tsirkin
2024-07-02 14:08 ` [PULL 26/91] hw/cxl/events: Add qmp interfaces to add/release dynamic capacity extents Michael S. Tsirkin
2024-07-02 14:08 ` [PULL 27/91] hw/mem/cxl_type3: Add DPA range validation for accesses to DC regions Michael S. Tsirkin
2024-07-02 14:08 ` [PULL 28/91] hw/cxl/cxl-mailbox-utils: Add superset extent release mailbox support Michael S. Tsirkin
2024-07-02 14:08 ` [PULL 29/91] hw/mem/cxl_type3: Allow to release extent superset in QMP interface Michael S. Tsirkin
2024-07-02 14:08 ` [PULL 30/91] linux-headers: update to 6.10-rc1 Michael S. Tsirkin
2024-07-02 14:08 ` [PULL 31/91] hw/misc/pvpanic: centralize definition of supported events Michael S. Tsirkin
2024-07-02 14:08 ` Michael S. Tsirkin [this message]
2024-07-02 14:08 ` [PULL 33/91] hw/misc/pvpanic: add support for normal shutdowns Michael S. Tsirkin
2024-07-02 14:08 ` [PULL 34/91] pvpanic: Emit GUEST_PVSHUTDOWN QMP event on pvpanic shutdown signal Michael S. Tsirkin
2024-07-02 14:08 ` [PULL 35/91] tests/qtest/pvpanic: add tests for pvshutdown event Michael S. Tsirkin
2024-07-02 14:08 ` [PULL 36/91] Revert "docs/specs/pvpanic: mark shutdown event as not implemented" Michael S. Tsirkin
2024-07-02 14:08 ` [PULL 37/91] virtio-pci: Fix the failure process in kvm_virtio_pci_vector_use_one() Michael S. Tsirkin
2024-07-02 14:08 ` [PULL 38/91] hw/cxl: Fix read from bogus memory Michael S. Tsirkin
2024-07-02 14:08 ` [PULL 39/91] virtio-pci: implement No_Soft_Reset bit Michael S. Tsirkin
2024-07-02 14:09 ` [PULL 40/91] vhost-user-test: don't set call fd -1 non-blocking Michael S. Tsirkin
2024-07-02 14:09 ` [PULL 41/91] i386/apic: Add hint on boot failure because of disabling x2APIC Michael S. Tsirkin
2024-07-02 14:09 ` [PULL 42/91] hw/virtio: Free vqs after vhost_dev_cleanup() Michael S. Tsirkin
2024-07-02 14:09 ` [PULL 43/91] virtio-iommu: add error check before assert Michael S. Tsirkin
2024-07-02 14:09 ` [PULL 44/91] vhost-user: Skip unnecessary duplicated VHOST_USER_SET_LOG_BASE requests Michael S. Tsirkin
2024-07-02 14:09 ` [PULL 45/91] hw/net/virtio-net.c: fix crash in iov_copy() Michael S. Tsirkin
2024-07-02 14:09 ` [PULL 46/91] qapi: clarify that the default is backend dependent Michael S. Tsirkin
2024-07-02 14:09 ` [PULL 47/91] libvhost-user: set msg.msg_control to NULL when it is empty Michael S. Tsirkin
2024-07-02 14:09 ` [PULL 48/91] libvhost-user: fail vu_message_write() if sendmsg() is failing Michael S. Tsirkin
2024-07-02 14:09 ` [PULL 49/91] libvhost-user: mask F_INFLIGHT_SHMFD if memfd is not supported Michael S. Tsirkin
2024-07-02 14:09 ` [PULL 50/91] vhost-user-server: do not set memory fd non-blocking Michael S. Tsirkin
2024-07-02 14:09 ` [PULL 51/91] contrib/vhost-user-blk: fix bind() using the right size of the address Michael S. Tsirkin
2024-07-02 14:09 ` [PULL 52/91] contrib/vhost-user-*: use QEMU bswap helper functions Michael S. Tsirkin
2024-07-02 14:09 ` [PULL 53/91] vhost-user: enable frontends on any POSIX system Michael S. Tsirkin
2024-07-02 14:09 ` [PULL 54/91] libvhost-user: enable it " Michael S. Tsirkin
2024-07-02 14:09 ` [PULL 55/91] contrib/vhost-user-blk: " Michael S. Tsirkin
2024-07-02 14:09 ` [PULL 56/91] hostmem: add a new memory backend based on POSIX shm_open() Michael S. Tsirkin
2024-07-02 14:09 ` [PULL 57/91] tests/qtest/vhost-user-blk-test: use memory-backend-shm Michael S. Tsirkin
2024-07-02 14:09 ` [PULL 58/91] tests/qtest/vhost-user-test: add a test case for memory-backend-shm Michael S. Tsirkin
2024-07-02 14:10 ` [PULL 59/91] hw/virtio: Fix the de-initialization of vhost-user devices Michael S. Tsirkin
2024-07-02 14:10 ` [PULL 60/91] hw/arm/virt-acpi-build: Drop local iort_node_offset Michael S. Tsirkin
2024-07-02 14:10 ` [PULL 61/91] hw/i386/fw_cfg: Add etc/e820 to fw_cfg late Michael S. Tsirkin
2024-07-02 14:10 ` [PULL 62/91] hw/arm/virt-acpi-build: Fix id_count in build_iort_id_mapping Michael S. Tsirkin
2024-07-02 14:10 ` [PULL 63/91] uefi-test-tools/UefiTestToolsPkg: Add RISC-V support Michael S. Tsirkin
2024-07-02 14:10 ` [PULL 64/91] uefi-test-tools: Add support for python based build script Michael S. Tsirkin
2024-07-02 14:10 ` [PULL 65/91] tests/data/uefi-boot-images: Add RISC-V ISO image Michael S. Tsirkin
2024-07-02 14:10 ` [PULL 66/91] qtest: bios-tables-test: Rename aarch64 tests with aarch64 in them Michael S. Tsirkin
2024-07-02 14:10 ` [PULL 67/91] tests/qtest/bios-tables-test.c: Add support for arch in path Michael S. Tsirkin
2024-07-02 14:10 ` [PULL 68/91] tests/qtest/bios-tables-test.c: Set "arch" for aarch64 tests Michael S. Tsirkin
2024-07-02 14:10 ` [PULL 69/91] tests/qtest/bios-tables-test.c: Set "arch" for x86 tests Michael S. Tsirkin
2024-07-02 14:10 ` [PULL 70/91] tests/data/acpi: Move x86 ACPI tables under x86/${machine} path Michael S. Tsirkin
2024-07-02 14:10 ` [PULL 71/91] tests/data/acpi/virt: Move ARM64 ACPI tables under aarch64/${machine} path Michael S. Tsirkin
2024-07-02 14:10 ` [PULL 72/91] meson.build: Add RISC-V to the edk2-target list Michael S. Tsirkin
2024-07-02 14:10 ` [PULL 73/91] pc-bios/meson.build: Add support for RISC-V in unpack_edk2_blobs Michael S. Tsirkin
2024-07-02 14:10 ` [PULL 74/91] tests/data/acpi/rebuild-expected-aml.sh: Add RISC-V Michael S. Tsirkin
2024-07-02 14:10 ` [PULL 75/91] tests/qtest/bios-tables-test: Add empty ACPI data files for RISC-V Michael S. Tsirkin
2024-07-02 14:10 ` [PULL 76/91] tests/qtest/bios-tables-test.c: Enable basic testing " Michael S. Tsirkin
2024-07-02 14:10 ` [PULL 77/91] tests/qtest/bios-tables-test: Add expected ACPI data files " Michael S. Tsirkin
2024-07-02 14:11 ` [PULL 78/91] hw/cxl/events: Improve QMP interfaces and documentation for add/release dynamic capacity Michael S. Tsirkin
2024-07-02 14:11 ` [PULL 79/91] hw/cxl/events: Mark cxl-add-dynamic-capacity and cxl-release-dynamic-capcity unstable Michael S. Tsirkin
2024-07-02 14:11 ` [PULL 80/91] virtio: remove virtio_tswap16s() call in vring_packed_event_read() Michael S. Tsirkin
2024-07-02 14:11 ` [PULL 81/91] virtio-iommu: Clear IOMMUDevice when VFIO device is unplugged Michael S. Tsirkin
2024-07-02 14:11 ` [PULL 82/91] hw/pci: Rename has_power to enabled Michael S. Tsirkin
2024-07-02 14:11 ` [PULL 83/91] hw/ppc/spapr_pci: Do not create DT for disabled PCI device Michael S. Tsirkin
2024-07-02 14:11 ` [PULL 84/91] hw/ppc/spapr_pci: Do not reject VFs created after a PF Michael S. Tsirkin
2024-07-02 14:11 ` [PULL 85/91] pcie_sriov: Do not manually unrealize Michael S. Tsirkin
2024-07-02 14:11 ` [PULL 86/91] pcie_sriov: Ensure VF function number does not overflow Michael S. Tsirkin
2024-07-02 14:11 ` [PULL 87/91] pcie_sriov: Reuse SR-IOV VF device instances Michael S. Tsirkin
2024-07-02 14:11 ` [PULL 88/91] pcie_sriov: Release VFs failed to realize Michael S. Tsirkin
2024-07-02 14:11 ` [PULL 89/91] pcie_sriov: Remove num_vfs from PCIESriovPF Michael S. Tsirkin
2024-07-02 14:11 ` [PULL 90/91] pcie_sriov: Register VFs after migration Michael S. Tsirkin
2024-07-02 14:11 ` [PULL 91/91] hw/pci: Replace -1 with UINT32_MAX for romsize Michael S. Tsirkin
2024-07-02 14:35 ` [PULL 00/91] virtio: features,fixes Michael S. Tsirkin
2024-07-02 15:25 ` Michael S. Tsirkin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=462dc749c110fe8e41ae0fb554b9bc2f2671e973.1719929191.git.mst@redhat.com \
--to=mst@redhat.com \
--cc=cohuck@redhat.com \
--cc=lvivier@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=thomas@t-8ch.de \
--cc=thuth@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).