[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 02/17] qtest: use correct boolean type for failover property
|
From: |
Thomas Huth |
|
Subject: |
[PULL 02/17] qtest: use correct boolean type for failover property |
|
Date: |
Thu, 11 Jan 2024 18:00:31 +0100 |
From: Daniel P. Berrangé <berrange@redhat.com>
QMP device_add does not historically validate the parameter types.
At some point it will likely change to enforce correct types, to
match behaviour of -device. The failover property is expected to
be a boolean in JSON.
Signed-off-by: "Daniel P. Berrangé" <berrange@redhat.com>
Message-ID: <20240103123005.2400437-1-berrange@redhat.com>
Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
tests/qtest/virtio-net-failover.c | 36 +++++++++++++++----------------
1 file changed, 18 insertions(+), 18 deletions(-)
diff --git a/tests/qtest/virtio-net-failover.c
b/tests/qtest/virtio-net-failover.c
index 0d40bc1f2d..73dfabc272 100644
--- a/tests/qtest/virtio-net-failover.c
+++ b/tests/qtest/virtio-net-failover.c
@@ -486,7 +486,7 @@ static void test_hotplug_1_reverse(void)
qtest_qmp_device_add(qts, "virtio-net", "standby0",
"{'bus': 'root0',"
- "'failover': 'on',"
+ "'failover': true,"
"'netdev': 'hs0',"
"'mac': '"MAC_STANDBY0"'}");
@@ -517,7 +517,7 @@ static void test_hotplug_2(void)
qtest_qmp_device_add(qts, "virtio-net", "standby0",
"{'bus': 'root0',"
- "'failover': 'on',"
+ "'failover': true,"
"'netdev': 'hs0',"
"'mac': '"MAC_STANDBY0"'}");
@@ -566,7 +566,7 @@ static void test_hotplug_2_reverse(void)
qtest_qmp_device_add(qts, "virtio-net", "standby0",
"{'bus': 'root0',"
- "'failover': 'on',"
+ "'failover': true,"
"'netdev': 'hs0',"
"'rombar': 0,"
"'romfile': '',"
@@ -639,7 +639,7 @@ static void test_migrate_out(gconstpointer opaque)
qtest_qmp_device_add(qts, "virtio-net", "standby0",
"{'bus': 'root0',"
- "'failover': 'on',"
+ "'failover': true,"
"'netdev': 'hs0',"
"'mac': '"MAC_STANDBY0"'}");
@@ -754,7 +754,7 @@ static void test_migrate_in(gconstpointer opaque)
qtest_qmp_device_add(qts, "virtio-net", "standby0",
"{'bus': 'root0',"
- "'failover': 'on',"
+ "'failover': true,"
"'netdev': 'hs0',"
"'mac': '"MAC_STANDBY0"'}");
@@ -808,7 +808,7 @@ static void test_off_migrate_out(gconstpointer opaque)
qtest_qmp_device_add(qts, "virtio-net", "standby0",
"{'bus': 'root0',"
- "'failover': 'off',"
+ "'failover': false,"
"'netdev': 'hs0',"
"'mac': '"MAC_STANDBY0"'}");
@@ -876,7 +876,7 @@ static void test_off_migrate_in(gconstpointer opaque)
qtest_qmp_device_add(qts, "virtio-net", "standby0",
"{'bus': 'root0',"
- "'failover': 'off',"
+ "'failover': false,"
"'netdev': 'hs0',"
"'mac': '"MAC_STANDBY0"'}");
@@ -927,7 +927,7 @@ static void test_guest_off_migrate_out(gconstpointer opaque)
qtest_qmp_device_add(qts, "virtio-net", "standby0",
"{'bus': 'root0',"
- "'failover': 'on',"
+ "'failover': true,"
"'netdev': 'hs0',"
"'mac': '"MAC_STANDBY0"'}");
@@ -1003,7 +1003,7 @@ static void test_guest_off_migrate_in(gconstpointer
opaque)
qtest_qmp_device_add(qts, "virtio-net", "standby0",
"{'bus': 'root0',"
- "'failover': 'on',"
+ "'failover': true,"
"'netdev': 'hs0',"
"'mac': '"MAC_STANDBY0"'}");
@@ -1054,7 +1054,7 @@ static void test_migrate_guest_off_abort(gconstpointer
opaque)
qtest_qmp_device_add(qts, "virtio-net", "standby0",
"{'bus': 'root0',"
- "'failover': 'on',"
+ "'failover': true,"
"'netdev': 'hs0',"
"'mac': '"MAC_STANDBY0"'}");
@@ -1154,7 +1154,7 @@ static void test_migrate_abort_wait_unplug(gconstpointer
opaque)
qtest_qmp_device_add(qts, "virtio-net", "standby0",
"{'bus': 'root0',"
- "'failover': 'on',"
+ "'failover': true,"
"'netdev': 'hs0',"
"'mac': '"MAC_STANDBY0"'}");
@@ -1243,7 +1243,7 @@ static void test_migrate_abort_active(gconstpointer
opaque)
qtest_qmp_device_add(qts, "virtio-net", "standby0",
"{'bus': 'root0',"
- "'failover': 'on',"
+ "'failover': true,"
"'netdev': 'hs0',"
"'mac': '"MAC_STANDBY0"'}");
@@ -1342,7 +1342,7 @@ static void test_migrate_off_abort(gconstpointer opaque)
qtest_qmp_device_add(qts, "virtio-net", "standby0",
"{'bus': 'root0',"
- "'failover': 'off',"
+ "'failover': false,"
"'netdev': 'hs0',"
"'mac': '"MAC_STANDBY0"'}");
@@ -1434,7 +1434,7 @@ static void test_migrate_abort_timeout(gconstpointer
opaque)
qtest_qmp_device_add(qts, "virtio-net", "standby0",
"{'bus': 'root0',"
- "'failover': 'on',"
+ "'failover': true,"
"'netdev': 'hs0',"
"'mac': '"MAC_STANDBY0"'}");
@@ -1530,7 +1530,7 @@ static void test_multi_out(gconstpointer opaque)
qtest_qmp_device_add(qts, "virtio-net", "standby0",
"{'bus': 'root0',"
- "'failover': 'on',"
+ "'failover': true,"
"'netdev': 'hs0',"
"'mac': '"MAC_STANDBY0"'}");
@@ -1561,7 +1561,7 @@ static void test_multi_out(gconstpointer opaque)
qtest_qmp_device_add(qts, "virtio-net", "standby1",
"{'bus': 'root2',"
- "'failover': 'on',"
+ "'failover': true,"
"'netdev': 'hs2',"
"'mac': '"MAC_STANDBY1"'}");
@@ -1700,7 +1700,7 @@ static void test_multi_in(gconstpointer opaque)
qtest_qmp_device_add(qts, "virtio-net", "standby0",
"{'bus': 'root0',"
- "'failover': 'on',"
+ "'failover': true,"
"'netdev': 'hs0',"
"'mac': '"MAC_STANDBY0"'}");
@@ -1724,7 +1724,7 @@ static void test_multi_in(gconstpointer opaque)
qtest_qmp_device_add(qts, "virtio-net", "standby1",
"{'bus': 'root2',"
- "'failover': 'on',"
+ "'failover': true,"
"'netdev': 'hs2',"
"'mac': '"MAC_STANDBY1"'}");
--
2.43.0
- [PULL 00/17] Misc patches (qtests, s390x, m68k, gitlab-ci), Thomas Huth, 2024/01/11
- [PULL 01/17] q800: move dp8393x_prom memory region to Q800MachineState, Thomas Huth, 2024/01/11
- [PULL 03/17] Revert "netdev: set timeout depending on loadavg", Thomas Huth, 2024/01/11
- [PULL 06/17] net: add explicit info about connecting/listening state, Thomas Huth, 2024/01/11
- [PULL 02/17] qtest: use correct boolean type for failover property,
Thomas Huth <=
- [PULL 07/17] net: handle QIOTask completion to report useful error message, Thomas Huth, 2024/01/11
- [PULL 05/17] Revert "tests/qtest/netdev-socket: Raise connection timeout to 120 seconds", Thomas Huth, 2024/01/11
- [PULL 08/17] qtest: ensure netdev-socket tests have non-overlapping names, Thomas Huth, 2024/01/11
- [PULL 04/17] Revert "osdep: add getloadavg", Thomas Huth, 2024/01/11
- [PULL 10/17] gitlab: fix s390x tag for avocado-system-centos, Thomas Huth, 2024/01/11
- [PULL 11/17] target/s390x/kvm/pv: Provide some more useful information if decryption fails, Thomas Huth, 2024/01/11
- [PULL 09/17] tests/qtest/virtio-ccw: Fix device presence checking, Thomas Huth, 2024/01/11
- [PULL 13/17] hw/s390x/ccw: Replace dirname() with g_path_get_dirname(), Thomas Huth, 2024/01/11
- [PULL 15/17] target/s390x: Fix LAE setting a wrong access register, Thomas Huth, 2024/01/11
- [PULL 14/17] scripts/checkpatch: Support codespell checking, Thomas Huth, 2024/01/11