From: Fabiano Rosas <farosas@suse.de>
To: qemu-devel@nongnu.org
Cc: Thomas Huth <thuth@redhat.com>,
Laurent Vivier <lvivier@redhat.com>,
Paolo Bonzini <pbonzini@redhat.com>
Subject: [PATCH v3 06/12] tests/qtest: Fix coding style in device-plug-test.c
Date: Mon, 13 Feb 2023 18:07:32 -0300 [thread overview]
Message-ID: <20230213210738.9719-7-farosas@suse.de> (raw)
In-Reply-To: <20230213210738.9719-1-farosas@suse.de>
We should not mix declarations and statements in QEMU code.
Signed-off-by: Fabiano Rosas <farosas@suse.de>
Reviewed-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.35.3
next prev parent reply other threads:[~2023-02-13 21:11 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-13 21:07 [PATCH v3 00/12] qtests vs. default devices Fabiano Rosas
2023-02-13 21:07 ` [PATCH v3 01/12] tests/qtest: Skip PXE tests for missing devices Fabiano Rosas
2023-02-13 21:07 ` [PATCH v3 02/12] tests/qtest: Do not run lsi53c895a test if device is not present Fabiano Rosas
2023-02-13 21:07 ` [PATCH v3 03/12] tests/qtest: Add dependence on PCIE_PORT for virtio-net-failover.c Fabiano Rosas
2023-02-13 21:07 ` [PATCH v3 04/12] tests/qtest: Don't build virtio-serial-test.c if device not present Fabiano Rosas
2023-02-14 7:57 ` Thomas Huth
2023-02-13 21:07 ` [PATCH v3 05/12] tests/qtest: hd-geo-test: Check for missing devices Fabiano Rosas
2023-02-13 21:07 ` Fabiano Rosas [this message]
2023-02-13 21:07 ` [PATCH v3 07/12] tests/qtest: Skip unplug tests that use " Fabiano Rosas
2023-02-13 21:07 ` [PATCH v3 08/12] tests/qtest: drive_del-test: Skip tests that require " Fabiano Rosas
2023-02-13 21:07 ` [PATCH v3 09/12] tests/qtest: Check for devices in bios-tables-test Fabiano Rosas
2023-02-13 21:07 ` [PATCH v3 10/12] tests/qtest: Do not include hexloader-test if loader device is not present Fabiano Rosas
2023-02-13 21:07 ` [PATCH v3 11/12] tests/qemu-iotests: Require virtio-scsi-pci Fabiano Rosas
2023-02-13 21:07 ` [PATCH v3 12/12] tests/qtest: bios-tables-test: Skip if missing configs Fabiano Rosas
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=20230213210738.9719-7-farosas@suse.de \
--to=farosas@suse.de \
--cc=lvivier@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--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).