[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 2/7] tests/q35-test: push down qtest_start / qtest_en
From: |
Michael S. Tsirkin |
Subject: |
[Qemu-devel] [PULL 2/7] tests/q35-test: push down qtest_start / qtest_end to test case(s) |
Date: |
Fri, 16 Jun 2017 18:49:45 +0300 |
From: Laszlo Ersek <address@hidden>
A test program can start up QEMU several times, with different command
lines. For such cases, qtest_start() and qtest_end() are called from
within the individual test functions. Examples: "virtio-console-test.c",
"numa-test.c", and many others.
Cc: "Michael S. Tsirkin" <address@hidden>
Cc: Gerd Hoffmann <address@hidden>
Cc: Paolo Bonzini <address@hidden>
Signed-off-by: Laszlo Ersek <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>
---
tests/q35-test.c | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/tests/q35-test.c b/tests/q35-test.c
index cc58f3e..6c21b40 100644
--- a/tests/q35-test.c
+++ b/tests/q35-test.c
@@ -42,6 +42,8 @@ static void test_smram_lock(void)
QPCIDevice *pcidev;
QDict *response;
+ qtest_start("-M q35");
+
pcibus = qpci_init_pc(NULL);
g_assert(pcibus != NULL);
@@ -74,19 +76,15 @@ static void test_smram_lock(void)
g_free(pcidev);
qpci_free_pc(pcibus);
+
+ qtest_end();
}
int main(int argc, char **argv)
{
- int ret;
-
g_test_init(&argc, &argv, NULL);
qtest_add_func("/q35/smram/lock", test_smram_lock);
- qtest_start("-M q35");
- ret = g_test_run();
- qtest_end();
-
- return ret;
+ return g_test_run();
}
--
MST
- [Qemu-devel] [PULL 0/7] pc: fixes, cleanups, features, Michael S. Tsirkin, 2017/06/16
- [Qemu-devel] [PULL 1/7] q35/mch: implement extended TSEG sizes, Michael S. Tsirkin, 2017/06/16
- [Qemu-devel] [PULL 2/7] tests/q35-test: push down qtest_start / qtest_end to test case(s),
Michael S. Tsirkin <=
- [Qemu-devel] [PULL 3/7] tests/q35-test: add TSEG size checks, Michael S. Tsirkin, 2017/06/16
- [Qemu-devel] [PULL 5/7] intel_iommu: cleanup vtd_{do_}iommu_translate(), Michael S. Tsirkin, 2017/06/16
- [Qemu-devel] [PULL 6/7] intel_iommu: cleanup vtd_interrupt_remap_msi(), Michael S. Tsirkin, 2017/06/16
- [Qemu-devel] [PULL 7/7] hw/i386: fix nvdimm check error path, Michael S. Tsirkin, 2017/06/16
- [Qemu-devel] [PULL 4/7] intel_iommu: switching the rest DPRINTF to trace, Michael S. Tsirkin, 2017/06/16
- Re: [Qemu-devel] [PULL 0/7] pc: fixes, cleanups, features, Peter Maydell, 2017/06/22