[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 16/55] tests/qtest: add assert to catch bad features
From: |
Michael S. Tsirkin |
Subject: |
[PULL 16/55] tests/qtest: add assert to catch bad features |
Date: |
Mon, 10 Oct 2022 13:29:47 -0400 |
From: Alex Bennée <alex.bennee@linaro.org>
No device driver (which is what the qvirtio_ access functions
represent) should be setting UNUSED(30) in the feature space. Although
existing libqos users mask it out lets ensure nothing sneaks through.
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20220802095010.3330793-20-alex.bennee@linaro.org>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
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 09ec09b655..03056e5187 100644
--- a/tests/qtest/libqos/virtio.c
+++ b/tests/qtest/libqos/virtio.c
@@ -101,6 +101,8 @@ uint64_t qvirtio_get_features(QVirtioDevice *d)
void qvirtio_set_features(QVirtioDevice *d, uint64_t features)
{
+ g_assert(!(features & QVIRTIO_F_BAD_FEATURE));
+
d->features = features;
d->bus->set_features(d, features);
--
MST
- Re: Regression save/restore of vsock: (was [PULL 07/55] hw/virtio: move vm_running check to virtio_device_started), (continued)
[PULL 08/55] hw/virtio: move vhd->started check into helper and add FIXME, Michael S. Tsirkin, 2022/10/10
[PULL 09/55] hw/virtio: add boilerplate for vhost-user-gpio device, Michael S. Tsirkin, 2022/10/10
[PULL 10/55] hw/virtio: add vhost-user-gpio-pci boilerplate, Michael S. Tsirkin, 2022/10/10
[PULL 11/55] tests/qtest: pass stdout/stderr down to subtests, Michael S. Tsirkin, 2022/10/10
[PULL 12/55] tests/qtest: add a timeout for subprocess_run_one_test, Michael S. Tsirkin, 2022/10/10
[PULL 13/55] tests/qtest: use qos_printf instead of g_test_message, Michael S. Tsirkin, 2022/10/10
[PULL 14/55] tests/qtest: catch unhandled vhost-user messages, Michael S. Tsirkin, 2022/10/10
[PULL 15/55] tests/qtest: plain g_assert for VHOST_USER_F_PROTOCOL_FEATURES, Michael S. Tsirkin, 2022/10/10
[PULL 16/55] tests/qtest: add assert to catch bad features,
Michael S. Tsirkin <=
[PULL 17/55] tests/qtest: implement stub for VHOST_USER_GET_CONFIG, Michael S. Tsirkin, 2022/10/10
[PULL 18/55] tests/qtest: add a get_features op to vhost-user-test, Michael S. Tsirkin, 2022/10/10
[PULL 19/55] tests/qtest: enable tests for virtio-gpio, Michael S. Tsirkin, 2022/10/10
[PULL 20/55] virtio: introduce VirtIOConfigSizeParams & virtio_get_config_size, Michael S. Tsirkin, 2022/10/10
[PULL 21/55] virtio-blk: move config size params to virtio-blk-common, Michael S. Tsirkin, 2022/10/10
[PULL 22/55] vhost-user-blk: make it possible to disable write-zeroes/discard, Michael S. Tsirkin, 2022/10/10
[PULL 23/55] vhost-user-blk: make 'config_wce' part of 'host_features', Michael S. Tsirkin, 2022/10/10
[PULL 24/55] vhost-user-blk: dynamically resize config space based on features, Michael S. Tsirkin, 2022/10/10
[PULL 25/55] tests/acpi: virt: allow acpi GTDT changes, Michael S. Tsirkin, 2022/10/10
[PULL 26/55] acpi: arm/virt: build_gtdt: fix invalid 64-bit physical addresses, Michael S. Tsirkin, 2022/10/10