[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 16/21] tests/qtest: device-plug-test: Reverse the usage of double/
From: |
Thomas Huth |
Subject: |
[PULL 16/21] tests/qtest: device-plug-test: Reverse the usage of double/single quotes |
Date: |
Fri, 28 Oct 2022 15:22:59 +0200 |
From: Bin Meng <bin.meng@windriver.com>
The usage of double/single quotes in test_q35_pci_unplug_json_request()
should be reversed to work on both win32 and non-win32 platforms:
- The value of -device parameter needs to be surrounded by "" as
Windows does not drop '' when passing it to QEMU which causes
QEMU command line option parser failure.
- The JSON key/value pairs need to be surrounded by '' to make the
JSON parser happy on Windows.
Fixes: a12f1a7e56b7 ("tests/x86: Add subtest with 'q35' machine type to
device-plug-test")
Signed-off-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20221028045736.679903-5-bin.meng@windriver.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
tests/qtest/device-plug-test.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/tests/qtest/device-plug-test.c b/tests/qtest/device-plug-test.c
index 3f44f731d1..5a6afa2b57 100644
--- a/tests/qtest/device-plug-test.c
+++ b/tests/qtest/device-plug-test.c
@@ -112,16 +112,16 @@ static void test_pci_unplug_json_request(void)
static void test_q35_pci_unplug_json_request(void)
{
- const char *port = "-device '{\"driver\": \"pcie-root-port\", "
- "\"id\": \"p1\"}'";
+ const char *port = "-device \"{'driver': 'pcie-root-port', "
+ "'id': 'p1'}\"";
- const char *bridge = "-device '{\"driver\": \"pcie-pci-bridge\", "
- "\"id\": \"b1\", "
- "\"bus\": \"p1\"}'";
+ const char *bridge = "-device \"{'driver': 'pcie-pci-bridge', "
+ "'id': 'b1', "
+ "'bus': 'p1'}\"";
- const char *device = "-device '{\"driver\": \"virtio-mouse-pci\", "
- "\"bus\": \"b1\", "
- "\"id\": \"dev0\"}'";
+ const char *device = "-device \"{'driver': 'virtio-mouse-pci', "
+ "'bus': 'b1', "
+ "'id': 'dev0'}\"";
QTestState *qtest = qtest_initf("-machine q35 %s %s %s",
port, bridge, device);
--
2.31.1
- [PULL 02/21] s390x: step down as general arch maintainer, (continued)
- [PULL 02/21] s390x: step down as general arch maintainer, Thomas Huth, 2022/10/28
- [PULL 07/21] MAINTAINERS: target/s390x/: add Ilya as reviewer, Thomas Huth, 2022/10/28
- [PULL 01/21] s390x/pv: remove semicolon from macro definition, Thomas Huth, 2022/10/28
- [PULL 06/21] tests/tcg/s390x: Add a test for the vistr instruction, Thomas Huth, 2022/10/28
- [PULL 09/21] tests/qtest/cxl-test: Remove temporary directories after testing, Thomas Huth, 2022/10/28
- [PULL 08/21] tests/qtest/tpm: Clean up remainders of swtpm, Thomas Huth, 2022/10/28
- [PULL 12/21] tests: Add sndio to the FreeBSD CI containers / VM, Thomas Huth, 2022/10/28
- [PULL 15/21] tests/qtest: Support libqtest to build and run on Windows, Thomas Huth, 2022/10/28
- [PULL 10/21] tests/qtest/libqos/e1000e: Use e1000_regs.h, Thomas Huth, 2022/10/28
- [PULL 13/21] accel/qtest: Support qtest accelerator for Windows, Thomas Huth, 2022/10/28
- [PULL 16/21] tests/qtest: device-plug-test: Reverse the usage of double/single quotes,
Thomas Huth <=
- [PULL 11/21] tests/vm: update openbsd to release 7.2, Thomas Huth, 2022/10/28
- [PULL 14/21] tests/qtest: Use send/recv for socket communication, Thomas Huth, 2022/10/28
- [PULL 18/21] tests/qtest: libqtest: Introduce qtest_wait_qemu(), Thomas Huth, 2022/10/28
- [PULL 19/21] tests/qtest: migration-test: Make sure QEMU process "to" exited after migration is canceled, Thomas Huth, 2022/10/28
- [PULL 20/21] tests/qtest: libqos: Do not build virtio-9p unconditionally, Thomas Huth, 2022/10/28
- [PULL 21/21] tests/qtest: libqtest: Correct the timeout unit of blocking receive calls for win32, Thomas Huth, 2022/10/28
- [PULL 17/21] tests/qtest: Use EXIT_FAILURE instead of magic number, Thomas Huth, 2022/10/28
- Re: [PULL 00/21] s390x and qtest patches, Stefan Hajnoczi, 2022/10/31
- Re: [PULL 00/21] s390x and qtest patches, Stefan Hajnoczi, 2022/10/31