[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 11/25] tests/pxe-test: Remove unnecessary special cas
From: |
Michael S. Tsirkin |
Subject: |
[Qemu-devel] [PULL 11/25] tests/pxe-test: Remove unnecessary special case test functions |
Date: |
Thu, 21 Dec 2017 16:29:14 +0200 |
From: David Gibson <address@hidden>
All of the x86 and some of the other test cases here use a common test
function, test_pxe_ipv4(), but one ppc and one s390 test use different
functions.
In the s390 case, this is completely pointless, the right parameter to
test_pxe_ipv4() will already do exactly the right thing. For the
spapr-vlan case there's a slight difference - it will use IPv6 instead of
IPv4.
But testing just one case with IPv6 (and NOT IPv4) is rather haphazard.
Change everything to use the common test function, until we have a better
way of testing IPv6 across the board.
Signed-off-by: David Gibson <address@hidden>
Reviewed-by: Thomas Huth <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>
---
tests/pxe-test.c | 15 +++------------
1 file changed, 3 insertions(+), 12 deletions(-)
diff --git a/tests/pxe-test.c b/tests/pxe-test.c
index 937f29e..eb70aa2 100644
--- a/tests/pxe-test.c
+++ b/tests/pxe-test.c
@@ -47,16 +47,6 @@ static void test_pxe_ipv4(gconstpointer data)
g_free(dev_arg);
}
-static void test_pxe_spapr_vlan(void)
-{
- test_pxe_one("-device spapr-vlan,netdev=" NETNAME, true);
-}
-
-static void test_pxe_virtio_ccw(void)
-{
- test_pxe_one("-device virtio-net-ccw,bootindex=1,netdev=" NETNAME, false);
-}
-
int main(int argc, char *argv[])
{
int ret;
@@ -79,13 +69,14 @@ int main(int argc, char *argv[])
qtest_add_data_func("pxe/vmxnet3", "vmxnet3", test_pxe_ipv4);
}
} else if (strcmp(arch, "ppc64") == 0) {
- qtest_add_func("pxe/spapr-vlan", test_pxe_spapr_vlan);
+ qtest_add_data_func("pxe/spapr-vlan", "spapr-vlan", test_pxe_ipv4);
if (g_test_slow()) {
qtest_add_data_func("pxe/virtio", "virtio-net-pci", test_pxe_ipv4);
qtest_add_data_func("pxe/e1000", "e1000", test_pxe_ipv4);
}
} else if (g_str_equal(arch, "s390x")) {
- qtest_add_func("pxe/virtio-ccw", test_pxe_virtio_ccw);
+ qtest_add_data_func("pxe/virtio-ccw",
+ "virtio-net-ccw,bootindex=1", test_pxe_ipv4);
}
ret = g_test_run();
boot_sector_cleanup(disk);
--
MST
- [Qemu-devel] [PULL 00/25] pc, pci, virtio: features, fixes, cleanups, Michael S. Tsirkin, 2017/12/21
- [Qemu-devel] [PULL 01/25] smbios: support setting OEM strings table, Michael S. Tsirkin, 2017/12/21
- [Qemu-devel] [PULL 02/25] qdev-properties: add UUID property type, Michael S. Tsirkin, 2017/12/21
- [Qemu-devel] [PULL 03/25] vmgenid: use UUID property type, Michael S. Tsirkin, 2017/12/21
- [Qemu-devel] [PULL 04/25] tests: add test to check VirtQueue object, Michael S. Tsirkin, 2017/12/21
- [Qemu-devel] [PULL 05/25] pci: Rename root bus initialization functions for clarity, Michael S. Tsirkin, 2017/12/21
- [Qemu-devel] [PULL 06/25] pci: Move bridge data structures from pci_bus.h to pci_bridge.h, Michael S. Tsirkin, 2017/12/21
- [Qemu-devel] [PULL 07/25] pci: Add pci_dev_bus_num() helper, Michael S. Tsirkin, 2017/12/21
- [Qemu-devel] [PULL 10/25] virtio_error: don't invoke status callbacks, Michael S. Tsirkin, 2017/12/21
- [Qemu-devel] [PULL 09/25] pci: Eliminate pci_find_primary_bus(), Michael S. Tsirkin, 2017/12/21
- [Qemu-devel] [PULL 11/25] tests/pxe-test: Remove unnecessary special case test functions,
Michael S. Tsirkin <=
- [Qemu-devel] [PULL 14/25] tests/pxe-test: Add some extra tests, Michael S. Tsirkin, 2017/12/21
- [Qemu-devel] [PULL 08/25] pci: Eliminate redundant PCIDevice::bus pointer, Michael S. Tsirkin, 2017/12/21
- [Qemu-devel] [PULL 12/25] tests/pxe-test: Use table of testcases rather than open-coding, Michael S. Tsirkin, 2017/12/21
- [Qemu-devel] [PULL 13/25] tests/pxe-test: Test net booting over IPv6 in some cases, Michael S. Tsirkin, 2017/12/21
- [Qemu-devel] [PULL 15/25] hw/block/nvme: QOM'ify PCI NVME, Michael S. Tsirkin, 2017/12/21
- [Qemu-devel] [PULL 16/25] hw/pci-host/piix: QOM'ify the IGD Passthrough host bridge, Michael S. Tsirkin, 2017/12/21
- [Qemu-devel] [PULL 17/25] hw/pci-host/xilinx: QOM'ify the AXI-PCIe host bridge, Michael S. Tsirkin, 2017/12/21
- [Qemu-devel] [PULL 18/25] hw/pci: remove obsolete PCIDevice->init(), Michael S. Tsirkin, 2017/12/21