[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 13/22] test/qtest: Fix coding style in device-plug-test.c
From: |
Thomas Huth |
Subject: |
[PULL 13/22] test/qtest: Fix coding style in device-plug-test.c |
Date: |
Tue, 14 Feb 2023 12:21:39 +0100 |
From: Fabiano Rosas <farosas@suse.de>
We should not mix declarations and statements in QEMU code.
Signed-off-by: Fabiano Rosas <farosas@suse.de>
Message-Id: <20230208194700.11035-7-farosas@suse.de>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
tests/qtest/device-plug-test.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/tests/qtest/device-plug-test.c b/tests/qtest/device-plug-test.c
index 5a6afa2b57..4f92617335 100644
--- a/tests/qtest/device-plug-test.c
+++ b/tests/qtest/device-plug-test.c
@@ -64,6 +64,7 @@ static void process_device_remove(QTestState *qtest, const
char *id)
static void test_pci_unplug_request(void)
{
+ QTestState *qtest;
const char *arch = qtest_get_arch();
const char *machine_addition = "";
@@ -71,8 +72,8 @@ static void test_pci_unplug_request(void)
machine_addition = "-machine pc";
}
- QTestState *qtest = qtest_initf("%s -device virtio-mouse-pci,id=dev0",
- machine_addition);
+ qtest = qtest_initf("%s -device virtio-mouse-pci,id=dev0",
+ machine_addition);
process_device_remove(qtest, "dev0");
@@ -94,6 +95,7 @@ static void test_q35_pci_unplug_request(void)
static void test_pci_unplug_json_request(void)
{
+ QTestState *qtest;
const char *arch = qtest_get_arch();
const char *machine_addition = "";
@@ -101,7 +103,7 @@ static void test_pci_unplug_json_request(void)
machine_addition = "-machine pc";
}
- QTestState *qtest = qtest_initf(
+ qtest = qtest_initf(
"%s -device \"{'driver': 'virtio-mouse-pci', 'id': 'dev0'}\"",
machine_addition);
--
2.31.1
- [PULL 11/22] tests/qtest: Add dependence on PCIE_PORT for virtio-net-failover.c, (continued)
- [PULL 11/22] tests/qtest: Add dependence on PCIE_PORT for virtio-net-failover.c, Thomas Huth, 2023/02/14
- [PULL 14/22] tests/qtest: Skip unplug tests that use missing devices, Thomas Huth, 2023/02/14
- [PULL 15/22] tests/qtest: drive_del-test: Skip tests that require missing devices, Thomas Huth, 2023/02/14
- [PULL 16/22] tests/qtest: Check for devices in bios-tables-test, Thomas Huth, 2023/02/14
- [PULL 18/22] tests/qemu-iotests: Require virtio-scsi-pci, Thomas Huth, 2023/02/14
- [PULL 17/22] tests/qtest: Do not include hexloader-test if loader device is not present, Thomas Huth, 2023/02/14
- [PULL 19/22] tests/qtest: bios-tables-test: Skip if missing configs, Thomas Huth, 2023/02/14
- [PULL 21/22] tests/tcg/s390x: Use -nostdlib for softmmu tests, Thomas Huth, 2023/02/14
- [PULL 20/22] tests/qtest: Don't build virtio-serial-test.c if device not present, Thomas Huth, 2023/02/14
- [PULL 22/22] hw/s390x/event-facility: Replace DO_UPCAST(SCLPEvent) by SCLP_EVENT(), Thomas Huth, 2023/02/14
- [PULL 13/22] test/qtest: Fix coding style in device-plug-test.c,
Thomas Huth <=
- Re: [PULL 00/22] qtest, s390x and misc patches, Peter Maydell, 2023/02/15