Skip to contentSkip to conversation

qtest: Prepare PCI NIC, virtio, IndustryPack tests

PATCH Superseded Andreas Färber 5 participants 31 messages Feb 9, 2014 – Apr 7, 2014

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

v2 cover qtest: Prepare PCI NIC, virtio, IndustryPack tests

Hello Stefan and Michael,

This series starts preparing tests to cover optional PCI devices. They don't do any functional tests but assure that QOM/PCI/VMState refactorings don't break the basic usage of devices not covered by qom-test.

pcnet-test.c is intended to handle sparc's lance as well.

v2 starts to cover virtio devices and covers ipack.

NB that the Makefile is being prepared for testing ...
* PCI devices on different architectures and
* VirtIO devices on different transports and
* IndustryPack devices on different bridges,
but the tests themselves will need some follow-up for choosing the right -machine or adding the required bus -device. My focus for now is on testing devices at all.

I'd like to include the IndustryPack tests in my upcoming pull (Monday) and am hoping I can do so on top of the original set of NIC tests for convenience.

Regards,
Andreas

v1 -> v2:
* Reordered includes (stefanha)
* Used qtest_end() where applicable
* Added qtest for tpci200 and ipoctal232 (for my IndustryPack refactoring series)
* Added qtests for ne2000, virtio-net, virtio-blk, virtio-balloon, virtio-rng

Cc Stefan Hajnoczi <[email protected]>
Cc Michael S. Tsirkin <[email protected]>
Cc Kevin Wolf <[email protected]>
Cc Alberto Garcia <[email protected]>
Cc Anthony Liguori <[email protected]>
Cc Paolo Bonzini <[email protected]>
Cc Peter Maydell <[email protected]>
Cc Alexey Kardashevskiy <[email protected]>

Andreas Färber (12):
tests: Add e1000 qtest
tests: Add vmxnet3 qtest
tests: Add rtl8139 qtest
tests: Add pcnet qtest
tests: Add eepro100 qtest
tests: Add tpci200 qtest
tests: Add ne2000 qtest
tests: Add virtio-net qtest
tests: Add virtio-blk qtest
tests: Add virtio-balloon qtest
tests: Add virtio-rng qtest
tests: Add ipoctal232 qtest

 tests/Makefile              | 49 +++++++++++++++++++++++++++++++++++
 tests/e1000-test.c          | 33 ++++++++++++++++++++++++
 tests/eepro100-test.c       | 63 +++++++++++++++++++++++++++++++++++++++++++++
 tests/ipoctal232-test.c     | 33 ++++++++++++++++++++++++
 tests/ne2000-test.c         | 33 ++++++++++++++++++++++++
 tests/pcnet-test.c          | 33 ++++++++++++++++++++++++
 tests/rtl8139-test.c        | 33 ++++++++++++++++++++++++
 tests/tpci200-test.c        | 33 ++++++++++++++++++++++++
 tests/virtio-balloon-test.c | 33 ++++++++++++++++++++++++
 tests/virtio-blk-test.c     | 34 ++++++++++++++++++++++++
 tests/virtio-net-test.c     | 33 ++++++++++++++++++++++++
 tests/virtio-rng-test.c     | 33 ++++++++++++++++++++++++
 tests/vmxnet3-test.c        | 33 ++++++++++++++++++++++++
 13 files changed, 476 insertions(+)
 create mode 100644 tests/e1000-test.c
 create mode 100644 tests/eepro100-test.c
 create mode 100644 tests/ipoctal232-test.c
 create mode 100644 tests/ne2000-test.c
 create mode 100644 tests/pcnet-test.c
 create mode 100644 tests/rtl8139-test.c
 create mode 100644 tests/tpci200-test.c
 create mode 100644 tests/virtio-balloon-test.c
 create mode 100644 tests/virtio-blk-test.c
 create mode 100644 tests/virtio-net-test.c
 create mode 100644 tests/virtio-rng-test.c
 create mode 100644 tests/vmxnet3-test.c
Signature · 1 line
1.8.4.5
#1 lore raw

PATCH v2 1/12 tests: Add e1000 qtest

Cc Stefan Hajnoczi <[email protected]>
Cc Michael S. Tsirkin <[email protected]>
---
 tests/Makefile     |  7 +++++++
 tests/e1000-test.c | 33 +++++++++++++++++++++++++++++++++
 2 files changed, 40 insertions(+)
 create mode 100644 tests/e1000-test.c
tests/Makefile +7 -0
index 42a52ff..57e21fc 100644
@@ -64,6 +64,10 @@ check-block-$(CONFIG_POSIX) += tests/qemu-iotests-quick.sh
 
 # All QTests for now are POSIX-only, but the dependencies are
 # really in libqtest, not in the testcases themselves.
+
+check-qtest-pci-y += tests/e1000-test$(EXESUF)
+gcov-files-pci-y += hw/net/e1000.c
+
 check-qtest-i386-y = tests/endianness-test$(EXESUF)
 check-qtest-i386-y += tests/fdc-test$(EXESUF)
 gcov-files-i386-y = hw/fdc.c
@@ -77,6 +81,8 @@ check-qtest-i386-y += tests/i440fx-test$(EXESUF)
 check-qtest-i386-y += tests/fw_cfg-test$(EXESUF)
 check-qtest-i386-y += tests/blockdev-test$(EXESUF)
 check-qtest-i386-y += tests/qdev-monitor-test$(EXESUF)
+check-qtest-i386-y += $(check-qtest-pci-y)
+gcov-files-i386-y += $(gcov-files-pci-y)
 check-qtest-x86_64-y = $(check-qtest-i386-y)
 gcov-files-i386-y += i386-softmmu/hw/mc146818rtc.c
 gcov-files-x86_64-y = $(subst i386-softmmu/,x86_64-softmmu/,$(gcov-files-i386-y))
@@ -196,6 +202,7 @@ tests/acpi-test$(EXESUF): tests/acpi-test.o $(libqos-obj-y)
 tests/tmp105-test$(EXESUF): tests/tmp105-test.o $(libqos-omap-obj-y)
 tests/i440fx-test$(EXESUF): tests/i440fx-test.o $(libqos-pc-obj-y)
 tests/fw_cfg-test$(EXESUF): tests/fw_cfg-test.o $(libqos-pc-obj-y)
+tests/e1000-test$(EXESUF): tests/e1000-test.o
 tests/qom-test$(EXESUF): tests/qom-test.o
 tests/blockdev-test$(EXESUF): tests/blockdev-test.o $(libqos-pc-obj-y)
 tests/qdev-monitor-test$(EXESUF): tests/qdev-monitor-test.o $(libqos-pc-obj-y)
tests/e1000-test.c new file +33 -0
new file mode 100644
index 0000000..a8ba2fc
@@ -0,0 +1,33 @@
+/*
+ * QTest testcase for e1000 NIC
+ *
+ * Copyright (c) 2013-2014 SUSE LINUX Products GmbH
+ *
+ * This work is licensed under the terms of the GNU GPL, version 2 or later.
+ * See the COPYING file in the top-level directory.
+ */
+
+#include <glib.h>
+#include <string.h>
+#include "libqtest.h"
+#include "qemu/osdep.h"
+
+/* Tests only initialization so far. TODO: Replace with functional tests */
+static void nop(void)
+{
+}
+
+int main(int argc, char **argv)
+{
+    int ret;
+
+    g_test_init(&argc, &argv, NULL);
+    qtest_add_func("/e1000/nop", nop);
+
+    qtest_start("-device e1000");
+    ret = g_test_run();
+
+    qtest_end();
+
+    return ret;
+}
Signature · 1 line
1.8.4.5
#2 lore raw

PATCH v2 2/12 tests: Add vmxnet3 qtest

In reply to Andreas Färber

Note that this will emit a warning:
[vmxnet3][WR][vmxnet3_peer_has_vnet_hdr]: Peer has no virtio extension. Task offloads will be emulated.

Cc Dmitry Fleytman <[email protected]>
Cc Stefan Hajnoczi <[email protected]>
---
 tests/Makefile       |  5 +++++
 tests/vmxnet3-test.c | 33 +++++++++++++++++++++++++++++++++
 2 files changed, 38 insertions(+)
 create mode 100644 tests/vmxnet3-test.c
tests/Makefile +5 -0
index 57e21fc..323c600 100644
@@ -83,6 +83,10 @@ check-qtest-i386-y += tests/blockdev-test$(EXESUF)
 check-qtest-i386-y += tests/qdev-monitor-test$(EXESUF)
 check-qtest-i386-y += $(check-qtest-pci-y)
 gcov-files-i386-y += $(gcov-files-pci-y)
+check-qtest-i386-y += tests/vmxnet3-test$(EXESUF)
+gcov-files-i386-y += hw/net/vmxnet3.c
+gcov-files-i386-y += hw/net/vmxnet_rx_pkt.c
+gcov-files-i386-y += hw/net/vmxnet_tx_pkt.c
 check-qtest-x86_64-y = $(check-qtest-i386-y)
 gcov-files-i386-y += i386-softmmu/hw/mc146818rtc.c
 gcov-files-x86_64-y = $(subst i386-softmmu/,x86_64-softmmu/,$(gcov-files-i386-y))
@@ -203,6 +207,7 @@ tests/tmp105-test$(EXESUF): tests/tmp105-test.o $(libqos-omap-obj-y)
 tests/i440fx-test$(EXESUF): tests/i440fx-test.o $(libqos-pc-obj-y)
 tests/fw_cfg-test$(EXESUF): tests/fw_cfg-test.o $(libqos-pc-obj-y)
 tests/e1000-test$(EXESUF): tests/e1000-test.o
+tests/vmxnet3-test$(EXESUF): tests/vmxnet3-test.o
 tests/qom-test$(EXESUF): tests/qom-test.o
 tests/blockdev-test$(EXESUF): tests/blockdev-test.o $(libqos-pc-obj-y)
 tests/qdev-monitor-test$(EXESUF): tests/qdev-monitor-test.o $(libqos-pc-obj-y)
tests/vmxnet3-test.c new file +33 -0
new file mode 100644
index 0000000..a2ebed3
@@ -0,0 +1,33 @@
+/*
+ * QTest testcase for vmxnet3 NIC
+ *
+ * Copyright (c) 2013-2014 SUSE LINUX Products GmbH
+ *
+ * This work is licensed under the terms of the GNU GPL, version 2 or later.
+ * See the COPYING file in the top-level directory.
+ */
+
+#include <glib.h>
+#include <string.h>
+#include "libqtest.h"
+#include "qemu/osdep.h"
+
+/* Tests only initialization so far. TODO: Replace with functional tests */
+static void nop(void)
+{
+}
+
+int main(int argc, char **argv)
+{
+    int ret;
+
+    g_test_init(&argc, &argv, NULL);
+    qtest_add_func("/vmxnet3/nop", nop);
+
+    qtest_start("-device vmxnet3");
+    ret = g_test_run();
+
+    qtest_end();
+
+    return ret;
+}
Signature · 1 line
1.8.4.5
Reviewed-by on v2 2/12
#3 lore raw

Re: [Qemu-devel] [PATCH qom-next v2 02/12] tests: Add vmxnet3 qtest

Quoted 4 lines · Andreas Färber

Note that this will emit a warning:
[vmxnet3][WR][vmxnet3_peer_has_vnet_hdr]: Peer has no virtio extension. Task offloads will be emulated.

Quoted 8 lines
Cc Dmitry Fleytman <[email protected]>
Cc Stefan Hajnoczi <[email protected]>

---
tests/Makefile | 5 +++++
tests/vmxnet3-test.c | 33 +++++++++++++++++++++++++++++++++

2 files changed, 38 insertions(+)

create mode 100644 tests/vmxnet3-test.c

Quoted 66 lines
tests/Makefile +4 -0
index 57e21fc..323c600 100644
@@ -83,6 +83,10 @@ check-qtest-i386-y += tests/blockdev-test$(EXESUF)
 check-qtest-i386-y += tests/qdev-monitor-test$(EXESUF)
 check-qtest-i386-y += $(check-qtest-pci-y)
 gcov-files-i386-y += $(gcov-files-pci-y)
+check-qtest-i386-y += tests/vmxnet3-test$(EXESUF)
+gcov-files-i386-y += hw/net/vmxnet3.c
+gcov-files-i386-y += hw/net/vmxnet_rx_pkt.c
+gcov-files-i386-y += hw/net/vmxnet_tx_pkt.c
 check-qtest-x86_64-y = $(check-qtest-i386-y)

gcov-files-i386-y += i386-softmmu/hw/mc146818rtc.c gcov-files-x86_64-y = $(subst i386-softmmu/,x86_64-softmmu/,$(gcov-files-i386-y))

tests/Makefile +0 -0
@@ -203,6 +207,7 @@ tests/tmp105-test$(EXESUF): tests/tmp105-test.o $(libqos-omap-obj-y)
 tests/i440fx-test$(EXESUF): tests/i440fx-test.o $(libqos-pc-obj-y)
 tests/fw_cfg-test$(EXESUF): tests/fw_cfg-test.o $(libqos-pc-obj-y)

tests/e1000-test$(EXESUF): tests/e1000-test.o +tests/vmxnet3-test$(EXESUF): tests/vmxnet3-test.o tests/qom-test$(EXESUF): tests/qom-test.o tests/blockdev-test$(EXESUF): tests/blockdev-test.o $(libqos-pc-obj-y) tests/qdev-monitor-test$(EXESUF): tests/qdev-monitor-test.o $(libqos-pc-obj-y)

tests/vmxnet3-test.c new file +33 -0
new file mode 100644
index 0000000..a2ebed3
@@ -0,0 +1,33 @@
+/*
+ * QTest testcase for vmxnet3 NIC
+ *
+ * Copyright (c) 2013-2014 SUSE LINUX Products GmbH
+ *
+ * This work is licensed under the terms of the GNU GPL, version 2 or later.
+ * See the COPYING file in the top-level directory.
+ */
+
+#include <glib.h>
+#include <string.h>
+#include "libqtest.h"
+#include "qemu/osdep.h"
+
+/* Tests only initialization so far. TODO: Replace with functional tests */
+static void nop(void)
+{
+}
+
+int main(int argc, char **argv)
+{
+    int ret;
+
+    g_test_init(&argc, &argv, NULL);
+    qtest_add_func("/vmxnet3/nop", nop);
+
+    qtest_start("-device vmxnet3");
+    ret = g_test_run();
+
+    qtest_end();
+
+    return ret;
+}
Signature · 1 line
1.8.4.5
#4 lore raw

PATCH v2 3/12 tests: Add rtl8139 qtest

In reply to Andreas Färber
---
 tests/Makefile       |  3 +++
 tests/rtl8139-test.c | 33 +++++++++++++++++++++++++++++++++
 2 files changed, 36 insertions(+)
 create mode 100644 tests/rtl8139-test.c
tests/Makefile +3 -0
index 323c600..eabdf98 100644
@@ -67,6 +67,8 @@ check-block-$(CONFIG_POSIX) += tests/qemu-iotests-quick.sh
 
 check-qtest-pci-y += tests/e1000-test$(EXESUF)
 gcov-files-pci-y += hw/net/e1000.c
+check-qtest-pci-y += tests/rtl8139-test$(EXESUF)
+gcov-files-pci-y += hw/net/rtl8139.c
 
 check-qtest-i386-y = tests/endianness-test$(EXESUF)
 check-qtest-i386-y += tests/fdc-test$(EXESUF)
@@ -207,6 +209,7 @@ tests/tmp105-test$(EXESUF): tests/tmp105-test.o $(libqos-omap-obj-y)
 tests/i440fx-test$(EXESUF): tests/i440fx-test.o $(libqos-pc-obj-y)
 tests/fw_cfg-test$(EXESUF): tests/fw_cfg-test.o $(libqos-pc-obj-y)
 tests/e1000-test$(EXESUF): tests/e1000-test.o
+tests/rtl8139-test$(EXESUF): tests/rtl8139-test.o
 tests/vmxnet3-test$(EXESUF): tests/vmxnet3-test.o
 tests/qom-test$(EXESUF): tests/qom-test.o
 tests/blockdev-test$(EXESUF): tests/blockdev-test.o $(libqos-pc-obj-y)
tests/rtl8139-test.c new file +33 -0
new file mode 100644
index 0000000..f6a1be3
@@ -0,0 +1,33 @@
+/*
+ * QTest testcase for Realtek 8139 NIC
+ *
+ * Copyright (c) 2013-2014 SUSE LINUX Products GmbH
+ *
+ * This work is licensed under the terms of the GNU GPL, version 2 or later.
+ * See the COPYING file in the top-level directory.
+ */
+
+#include <glib.h>
+#include <string.h>
+#include "libqtest.h"
+#include "qemu/osdep.h"
+
+/* Tests only initialization so far. TODO: Replace with functional tests */
+static void nop(void)
+{
+}
+
+int main(int argc, char **argv)
+{
+    int ret;
+
+    g_test_init(&argc, &argv, NULL);
+    qtest_add_func("/rtl8139/nop", nop);
+
+    qtest_start("-device rtl8139");
+    ret = g_test_run();
+
+    qtest_end();
+
+    return ret;
+}
Signature · 1 line
1.8.4.5
#5 lore raw

PATCH v2 4/12 tests: Add pcnet qtest

In reply to Andreas Färber

Test PCI only for now.

---
 tests/Makefile     |  4 ++++
 tests/pcnet-test.c | 33 +++++++++++++++++++++++++++++++++
 2 files changed, 37 insertions(+)
 create mode 100644 tests/pcnet-test.c
tests/Makefile +4 -0
index eabdf98..867d931 100644
@@ -69,6 +69,9 @@ check-qtest-pci-y += tests/e1000-test$(EXESUF)
 gcov-files-pci-y += hw/net/e1000.c
 check-qtest-pci-y += tests/rtl8139-test$(EXESUF)
 gcov-files-pci-y += hw/net/rtl8139.c
+check-qtest-pci-y += tests/pcnet-test$(EXESUF)
+gcov-files-pci-y += hw/net/pcnet.c
+gcov-files-pci-y += hw/net/pcnet-pci.c
 
 check-qtest-i386-y = tests/endianness-test$(EXESUF)
 check-qtest-i386-y += tests/fdc-test$(EXESUF)
@@ -210,6 +213,7 @@ tests/i440fx-test$(EXESUF): tests/i440fx-test.o $(libqos-pc-obj-y)
 tests/fw_cfg-test$(EXESUF): tests/fw_cfg-test.o $(libqos-pc-obj-y)
 tests/e1000-test$(EXESUF): tests/e1000-test.o
 tests/rtl8139-test$(EXESUF): tests/rtl8139-test.o
+tests/pcnet-test$(EXESUF): tests/pcnet-test.o
 tests/vmxnet3-test$(EXESUF): tests/vmxnet3-test.o
 tests/qom-test$(EXESUF): tests/qom-test.o
 tests/blockdev-test$(EXESUF): tests/blockdev-test.o $(libqos-pc-obj-y)
tests/pcnet-test.c new file +33 -0
new file mode 100644
index 0000000..84af4f3
@@ -0,0 +1,33 @@
+/*
+ * QTest testcase for PC-Net NIC
+ *
+ * Copyright (c) 2013-2014 SUSE LINUX Products GmbH
+ *
+ * This work is licensed under the terms of the GNU GPL, version 2 or later.
+ * See the COPYING file in the top-level directory.
+ */
+
+#include <glib.h>
+#include <string.h>
+#include "libqtest.h"
+#include "qemu/osdep.h"
+
+/* Tests only initialization so far. TODO: Replace with functional tests */
+static void pci_nop(void)
+{
+}
+
+int main(int argc, char **argv)
+{
+    int ret;
+
+    g_test_init(&argc, &argv, NULL);
+    qtest_add_func("/pcnet/pci/nop", pci_nop);
+
+    qtest_start("-device pcnet");
+    ret = g_test_run();
+
+    qtest_end();
+
+    return ret;
+}
Signature · 1 line
1.8.4.5
#6 lore raw

PATCH v2 5/12 tests: Add eepro100 qtest

In reply to Andreas Färber
---
 tests/Makefile        |  3 +++
 tests/eepro100-test.c | 63 +++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 66 insertions(+)
 create mode 100644 tests/eepro100-test.c
tests/Makefile +3 -0
index 867d931..4f9dd6d 100644
@@ -72,6 +72,8 @@ gcov-files-pci-y += hw/net/rtl8139.c
 check-qtest-pci-y += tests/pcnet-test$(EXESUF)
 gcov-files-pci-y += hw/net/pcnet.c
 gcov-files-pci-y += hw/net/pcnet-pci.c
+check-qtest-pci-y += tests/eepro100-test$(EXESUF)
+gcov-files-pci-y += hw/net/eepro100.c
 
 check-qtest-i386-y = tests/endianness-test$(EXESUF)
 check-qtest-i386-y += tests/fdc-test$(EXESUF)
@@ -214,6 +216,7 @@ tests/fw_cfg-test$(EXESUF): tests/fw_cfg-test.o $(libqos-pc-obj-y)
 tests/e1000-test$(EXESUF): tests/e1000-test.o
 tests/rtl8139-test$(EXESUF): tests/rtl8139-test.o
 tests/pcnet-test$(EXESUF): tests/pcnet-test.o
+tests/eepro100-test$(EXESUF): tests/eepro100-test.o
 tests/vmxnet3-test$(EXESUF): tests/vmxnet3-test.o
 tests/qom-test$(EXESUF): tests/qom-test.o
 tests/blockdev-test$(EXESUF): tests/blockdev-test.o $(libqos-pc-obj-y)
tests/eepro100-test.c new file +63 -0

63 lines not on this page · raw message

Signature · 1 line
1.8.4.5
#7 lore raw

PATCH v2 6/12 tests: Add tpci200 qtest

In reply to Andreas Färber
---
 tests/Makefile       |  3 +++
 tests/tpci200-test.c | 33 +++++++++++++++++++++++++++++++++
 2 files changed, 36 insertions(+)
 create mode 100644 tests/tpci200-test.c
tests/Makefile +3 -0
index 4f9dd6d..407b883 100644
@@ -74,6 +74,8 @@ gcov-files-pci-y += hw/net/pcnet.c
 gcov-files-pci-y += hw/net/pcnet-pci.c
 check-qtest-pci-y += tests/eepro100-test$(EXESUF)
 gcov-files-pci-y += hw/net/eepro100.c
+check-qtest-pci-y += tests/tpci200-test$(EXESUF)
+gcov-files-pci-y += hw/char/tpci200.c
 
 check-qtest-i386-y = tests/endianness-test$(EXESUF)
 check-qtest-i386-y += tests/fdc-test$(EXESUF)
@@ -218,6 +220,7 @@ tests/rtl8139-test$(EXESUF): tests/rtl8139-test.o
 tests/pcnet-test$(EXESUF): tests/pcnet-test.o
 tests/eepro100-test$(EXESUF): tests/eepro100-test.o
 tests/vmxnet3-test$(EXESUF): tests/vmxnet3-test.o
+tests/tpci200-test$(EXESUF): tests/tpci200-test.o
 tests/qom-test$(EXESUF): tests/qom-test.o
 tests/blockdev-test$(EXESUF): tests/blockdev-test.o $(libqos-pc-obj-y)
 tests/qdev-monitor-test$(EXESUF): tests/qdev-monitor-test.o $(libqos-pc-obj-y)
tests/tpci200-test.c new file +33 -0
new file mode 100644
index 0000000..9ae0127
@@ -0,0 +1,33 @@
+/*
+ * QTest testcase for tpci200 PCI-IndustryPack bridge
+ *
+ * Copyright (c) 2014 SUSE LINUX Products GmbH
+ *
+ * This work is licensed under the terms of the GNU GPL, version 2 or later.
+ * See the COPYING file in the top-level directory.
+ */
+
+#include <glib.h>
+#include <string.h>
+#include "libqtest.h"
+#include "qemu/osdep.h"
+
+/* Tests only initialization so far. TODO: Replace with functional tests */
+static void nop(void)
+{
+}
+
+int main(int argc, char **argv)
+{
+    int ret;
+
+    g_test_init(&argc, &argv, NULL);
+    qtest_add_func("/tpci200/nop", nop);
+
+    qtest_start("-device tpci200");
+    ret = g_test_run();
+
+    qtest_end();
+
+    return ret;
+}
Signature · 1 line
1.8.4.5
#8 lore raw

PATCH v2 7/12 tests: Add ne2000 qtest

In reply to Andreas Färber
---
 tests/Makefile      |  1 +
 tests/ne2000-test.c | 33 +++++++++++++++++++++++++++++++++
 2 files changed, 34 insertions(+)
 create mode 100644 tests/ne2000-test.c
tests/Makefile +1 -0
index 407b883..2bb484f 100644
@@ -220,6 +220,7 @@ tests/rtl8139-test$(EXESUF): tests/rtl8139-test.o
 tests/pcnet-test$(EXESUF): tests/pcnet-test.o
 tests/eepro100-test$(EXESUF): tests/eepro100-test.o
 tests/vmxnet3-test$(EXESUF): tests/vmxnet3-test.o
+tests/ne2000-test$(EXESUF): tests/ne2000-test.o
 tests/tpci200-test$(EXESUF): tests/tpci200-test.o
 tests/qom-test$(EXESUF): tests/qom-test.o
 tests/blockdev-test$(EXESUF): tests/blockdev-test.o $(libqos-pc-obj-y)
tests/ne2000-test.c new file +33 -0
new file mode 100644
index 0000000..61a678a
@@ -0,0 +1,33 @@
+/*
+ * QTest testcase for ne2000 NIC
+ *
+ * Copyright (c) 2014 SUSE LINUX Products GmbH
+ *
+ * This work is licensed under the terms of the GNU GPL, version 2 or later.
+ * See the COPYING file in the top-level directory.
+ */
+
+#include <glib.h>
+#include <string.h>
+#include "libqtest.h"
+#include "qemu/osdep.h"
+
+/* Tests only initialization so far. TODO: Replace with functional tests */
+static void pci_nop(void)
+{
+}
+
+int main(int argc, char **argv)
+{
+    int ret;
+
+    g_test_init(&argc, &argv, NULL);
+    qtest_add_func("/ne2000/pci/nop", pci_nop);
+
+    qtest_start("-device ne2k_pci");
+    ret = g_test_run();
+
+    qtest_end();
+
+    return ret;
+}
Signature · 1 line
1.8.4.5
#9 lore raw

PATCH v2 8/12 tests: Add virtio-net qtest

In reply to Andreas Färber
Cc Stefan Hajnoczi <[email protected]>
Cc Michael S. Tsirkin <[email protected]>
---
 tests/Makefile          |  7 +++++++
 tests/virtio-net-test.c | 33 +++++++++++++++++++++++++++++++++
 2 files changed, 40 insertions(+)
 create mode 100644 tests/virtio-net-test.c
tests/Makefile +7 -0
index 2bb484f..e52a4b9 100644
@@ -65,6 +65,10 @@ check-block-$(CONFIG_POSIX) += tests/qemu-iotests-quick.sh
 # All QTests for now are POSIX-only, but the dependencies are
 # really in libqtest, not in the testcases themselves.
 
+gcov-files-virtio-y += hw/virtio/virtio.c
+check-qtest-virtio-y += tests/virtio-net-test$(EXESUF)
+gcov-files-virtio-y += hw/net/virtio-net.c
+
 check-qtest-pci-y += tests/e1000-test$(EXESUF)
 gcov-files-pci-y += hw/net/e1000.c
 check-qtest-pci-y += tests/rtl8139-test$(EXESUF)
@@ -76,6 +80,8 @@ check-qtest-pci-y += tests/eepro100-test$(EXESUF)
 gcov-files-pci-y += hw/net/eepro100.c
 check-qtest-pci-y += tests/tpci200-test$(EXESUF)
 gcov-files-pci-y += hw/char/tpci200.c
+check-qtest-pci-y += $(check-qtest-virtio-y)
+gcov-files-pci-y += $(gcov-files-virtio-y) hw/virtio/virtio-pci.c
 
 check-qtest-i386-y = tests/endianness-test$(EXESUF)
 check-qtest-i386-y += tests/fdc-test$(EXESUF)
@@ -221,6 +227,7 @@ tests/pcnet-test$(EXESUF): tests/pcnet-test.o
 tests/eepro100-test$(EXESUF): tests/eepro100-test.o
 tests/vmxnet3-test$(EXESUF): tests/vmxnet3-test.o
 tests/ne2000-test$(EXESUF): tests/ne2000-test.o
+tests/virtio-net-test$(EXESUF): tests/virtio-net-test.o
 tests/tpci200-test$(EXESUF): tests/tpci200-test.o
 tests/qom-test$(EXESUF): tests/qom-test.o
 tests/blockdev-test$(EXESUF): tests/blockdev-test.o $(libqos-pc-obj-y)
tests/virtio-net-test.c new file +33 -0
new file mode 100644
index 0000000..df99343
@@ -0,0 +1,33 @@
+/*
+ * QTest testcase for VirtIO NIC
+ *
+ * Copyright (c) 2014 SUSE LINUX Products GmbH
+ *
+ * This work is licensed under the terms of the GNU GPL, version 2 or later.
+ * See the COPYING file in the top-level directory.
+ */
+
+#include <glib.h>
+#include <string.h>
+#include "libqtest.h"
+#include "qemu/osdep.h"
+
+/* Tests only initialization so far. TODO: Replace with functional tests */
+static void pci_nop(void)
+{
+}
+
+int main(int argc, char **argv)
+{
+    int ret;
+
+    g_test_init(&argc, &argv, NULL);
+    qtest_add_func("/virtio/net/pci/nop", pci_nop);
+
+    qtest_start("-device virtio-net-pci");
+    ret = g_test_run();
+
+    qtest_end();
+
+    return ret;
+}
Signature · 1 line
1.8.4.5
#10 lore raw

PATCH v2 9/12 tests: Add virtio-blk qtest

In reply to Andreas Färber
Cc Kevin Wolf <[email protected]>
Cc Stefan Hajnoczi <[email protected]>
---
 tests/Makefile          |  3 +++
 tests/virtio-blk-test.c | 34 ++++++++++++++++++++++++++++++++++
 2 files changed, 37 insertions(+)
 create mode 100644 tests/virtio-blk-test.c
tests/Makefile +3 -0
index e52a4b9..e24c49d 100644
@@ -68,6 +68,8 @@ check-block-$(CONFIG_POSIX) += tests/qemu-iotests-quick.sh
 gcov-files-virtio-y += hw/virtio/virtio.c
 check-qtest-virtio-y += tests/virtio-net-test$(EXESUF)
 gcov-files-virtio-y += hw/net/virtio-net.c
+check-qtest-virtio-y += tests/virtio-blk-test$(EXESUF)
+gcov-files-virtio-y += hw/block/virtio-blk.c
 
 check-qtest-pci-y += tests/e1000-test$(EXESUF)
 gcov-files-pci-y += hw/net/e1000.c
@@ -227,6 +229,7 @@ tests/pcnet-test$(EXESUF): tests/pcnet-test.o
 tests/eepro100-test$(EXESUF): tests/eepro100-test.o
 tests/vmxnet3-test$(EXESUF): tests/vmxnet3-test.o
 tests/ne2000-test$(EXESUF): tests/ne2000-test.o
+tests/virtio-blk-test$(EXESUF): tests/virtio-blk-test.o
 tests/virtio-net-test$(EXESUF): tests/virtio-net-test.o
 tests/tpci200-test$(EXESUF): tests/tpci200-test.o
 tests/qom-test$(EXESUF): tests/qom-test.o
tests/virtio-blk-test.c new file +34 -0
new file mode 100644
index 0000000..d53f875
@@ -0,0 +1,34 @@
+/*
+ * QTest testcase for VirtIO Block Device
+ *
+ * Copyright (c) 2014 SUSE LINUX Products GmbH
+ *
+ * This work is licensed under the terms of the GNU GPL, version 2 or later.
+ * See the COPYING file in the top-level directory.
+ */
+
+#include <glib.h>
+#include <string.h>
+#include "libqtest.h"
+#include "qemu/osdep.h"
+
+/* Tests only initialization so far. TODO: Replace with functional tests */
+static void pci_nop(void)
+{
+}
+
+int main(int argc, char **argv)
+{
+    int ret;
+
+    g_test_init(&argc, &argv, NULL);
+    qtest_add_func("/virtio/blk/pci/nop", pci_nop);
+
+    qtest_start("-drive id=drv0,if=none,file=/dev/null "
+                "-device virtio-blk-pci,drive=drv0");
+    ret = g_test_run();
+
+    qtest_end();
+
+    return ret;
+}
Signature · 1 line
1.8.4.5
#11 lore raw

PATCH v2 10/12 tests: Add virtio-balloon qtest

In reply to Andreas Färber
Cc Michael S. Tsirkin <[email protected]>
---
 tests/Makefile              |  3 +++
 tests/virtio-balloon-test.c | 33 +++++++++++++++++++++++++++++++++
 2 files changed, 36 insertions(+)
 create mode 100644 tests/virtio-balloon-test.c
tests/Makefile +3 -0
index e24c49d..8a35c3c 100644
@@ -68,6 +68,8 @@ check-block-$(CONFIG_POSIX) += tests/qemu-iotests-quick.sh
 gcov-files-virtio-y += hw/virtio/virtio.c
 check-qtest-virtio-y += tests/virtio-net-test$(EXESUF)
 gcov-files-virtio-y += hw/net/virtio-net.c
+check-qtest-virtio-y += tests/virtio-balloon-test$(EXESUF)
+gcov-files-virtio-y += hw/virtio/virtio-balloon.c
 check-qtest-virtio-y += tests/virtio-blk-test$(EXESUF)
 gcov-files-virtio-y += hw/block/virtio-blk.c
 
@@ -229,6 +231,7 @@ tests/pcnet-test$(EXESUF): tests/pcnet-test.o
 tests/eepro100-test$(EXESUF): tests/eepro100-test.o
 tests/vmxnet3-test$(EXESUF): tests/vmxnet3-test.o
 tests/ne2000-test$(EXESUF): tests/ne2000-test.o
+tests/virtio-balloon-test$(EXESUF): tests/virtio-balloon-test.o
 tests/virtio-blk-test$(EXESUF): tests/virtio-blk-test.o
 tests/virtio-net-test$(EXESUF): tests/virtio-net-test.o
 tests/tpci200-test$(EXESUF): tests/tpci200-test.o
tests/virtio-balloon-test.c new file +33 -0
new file mode 100644
index 0000000..becebb5
@@ -0,0 +1,33 @@
+/*
+ * QTest testcase for VirtIO Balloon
+ *
+ * Copyright (c) 2014 SUSE LINUX Products GmbH
+ *
+ * This work is licensed under the terms of the GNU GPL, version 2 or later.
+ * See the COPYING file in the top-level directory.
+ */
+
+#include <glib.h>
+#include <string.h>
+#include "libqtest.h"
+#include "qemu/osdep.h"
+
+/* Tests only initialization so far. TODO: Replace with functional tests */
+static void pci_nop(void)
+{
+}
+
+int main(int argc, char **argv)
+{
+    int ret;
+
+    g_test_init(&argc, &argv, NULL);
+    qtest_add_func("/virtio/balloon/pci/nop", pci_nop);
+
+    qtest_start("-device virtio-balloon-pci");
+    ret = g_test_run();
+
+    qtest_end();
+
+    return ret;
+}
Signature · 1 line
1.8.4.5
#12 lore raw

PATCH v2 11/12 tests: Add virtio-rng qtest

In reply to Andreas Färber
Cc Michael S. Tsirkin <[email protected]>
---
 tests/Makefile          |  3 +++
 tests/virtio-rng-test.c | 33 +++++++++++++++++++++++++++++++++
 2 files changed, 36 insertions(+)
 create mode 100644 tests/virtio-rng-test.c
tests/Makefile +3 -0
index 8a35c3c..2a7e104 100644
@@ -72,6 +72,8 @@ check-qtest-virtio-y += tests/virtio-balloon-test$(EXESUF)
 gcov-files-virtio-y += hw/virtio/virtio-balloon.c
 check-qtest-virtio-y += tests/virtio-blk-test$(EXESUF)
 gcov-files-virtio-y += hw/block/virtio-blk.c
+check-qtest-virtio-y += tests/virtio-rng-test$(EXESUF)
+gcov-files-virtio-y += hw/virtio/virtio-rng.c
 
 check-qtest-pci-y += tests/e1000-test$(EXESUF)
 gcov-files-pci-y += hw/net/e1000.c
@@ -234,6 +236,7 @@ tests/ne2000-test$(EXESUF): tests/ne2000-test.o
 tests/virtio-balloon-test$(EXESUF): tests/virtio-balloon-test.o
 tests/virtio-blk-test$(EXESUF): tests/virtio-blk-test.o
 tests/virtio-net-test$(EXESUF): tests/virtio-net-test.o
+tests/virtio-rng-test$(EXESUF): tests/virtio-rng-test.o
 tests/tpci200-test$(EXESUF): tests/tpci200-test.o
 tests/qom-test$(EXESUF): tests/qom-test.o
 tests/blockdev-test$(EXESUF): tests/blockdev-test.o $(libqos-pc-obj-y)
tests/virtio-rng-test.c new file +33 -0
new file mode 100644
index 0000000..402c206
@@ -0,0 +1,33 @@
+/*
+ * QTest testcase for VirtIO RNG
+ *
+ * Copyright (c) 2014 SUSE LINUX Products GmbH
+ *
+ * This work is licensed under the terms of the GNU GPL, version 2 or later.
+ * See the COPYING file in the top-level directory.
+ */
+
+#include <glib.h>
+#include <string.h>
+#include "libqtest.h"
+#include "qemu/osdep.h"
+
+/* Tests only initialization so far. TODO: Replace with functional tests */
+static void pci_nop(void)
+{
+}
+
+int main(int argc, char **argv)
+{
+    int ret;
+
+    g_test_init(&argc, &argv, NULL);
+    qtest_add_func("/virtio/rng/pci/nop", pci_nop);
+
+    qtest_start("-device virtio-rng-pci");
+    ret = g_test_run();
+
+    qtest_end();
+
+    return ret;
+}
Signature · 1 line
1.8.4.5
#13 lore raw

PATCH v2 12/12 tests: Add ipoctal232 qtest

In reply to Andreas Färber
---
 tests/Makefile          |  7 +++++++
 tests/ipoctal232-test.c | 33 +++++++++++++++++++++++++++++++++
 2 files changed, 40 insertions(+)
 create mode 100644 tests/ipoctal232-test.c
tests/Makefile +7 -0
index 2a7e104..89cc4cc 100644
@@ -65,6 +65,10 @@ check-block-$(CONFIG_POSIX) += tests/qemu-iotests-quick.sh
 # All QTests for now are POSIX-only, but the dependencies are
 # really in libqtest, not in the testcases themselves.
 
+gcov-files-ipack-y += hw/char/ipack.c
+check-qtest-ipack-y += tests/ipoctal232-test$(EXESUF)
+gcov-files-ipack-y += hw/char/ipoctal232.c
+
 gcov-files-virtio-y += hw/virtio/virtio.c
 check-qtest-virtio-y += tests/virtio-net-test$(EXESUF)
 gcov-files-virtio-y += hw/net/virtio-net.c
@@ -88,6 +92,8 @@ check-qtest-pci-y += tests/tpci200-test$(EXESUF)
 gcov-files-pci-y += hw/char/tpci200.c
 check-qtest-pci-y += $(check-qtest-virtio-y)
 gcov-files-pci-y += $(gcov-files-virtio-y) hw/virtio/virtio-pci.c
+check-qtest-pci-y += $(check-qtest-ipack-y)
+gcov-files-ipack-y += $(gcov-files-ipack-y) hw/char/tpci200.c
 
 check-qtest-i386-y = tests/endianness-test$(EXESUF)
 check-qtest-i386-y += tests/fdc-test$(EXESUF)
@@ -238,6 +244,7 @@ tests/virtio-blk-test$(EXESUF): tests/virtio-blk-test.o
 tests/virtio-net-test$(EXESUF): tests/virtio-net-test.o
 tests/virtio-rng-test$(EXESUF): tests/virtio-rng-test.o
 tests/tpci200-test$(EXESUF): tests/tpci200-test.o
+tests/ipoctal232-test$(EXESUF): tests/ipoctal232-test.o
 tests/qom-test$(EXESUF): tests/qom-test.o
 tests/blockdev-test$(EXESUF): tests/blockdev-test.o $(libqos-pc-obj-y)
 tests/qdev-monitor-test$(EXESUF): tests/qdev-monitor-test.o $(libqos-pc-obj-y)
tests/ipoctal232-test.c new file +33 -0
new file mode 100644
index 0000000..3ac1714
@@ -0,0 +1,33 @@
+/*
+ * QTest testcase for IndustryPack Octal-RS232
+ *
+ * Copyright (c) 2014 SUSE LINUX Products GmbH
+ *
+ * This work is licensed under the terms of the GNU GPL, version 2 or later.
+ * See the COPYING file in the top-level directory.
+ */
+
+#include <glib.h>
+#include <string.h>
+#include "libqtest.h"
+#include "qemu/osdep.h"
+
+/* Tests only initialization so far. TODO: Replace with functional tests */
+static void nop(void)
+{
+}
+
+int main(int argc, char **argv)
+{
+    int ret;
+
+    g_test_init(&argc, &argv, NULL);
+    qtest_add_func("/ipoctal232/tpci200/nop", nop);
+
+    qtest_start("-device tpci200,id=ipack0 -device ipoctal232,bus=ipack0.0");
+    ret = g_test_run();
+
+    qtest_end();
+
+    return ret;
+}
Signature · 1 line
1.8.4.5
#14 lore raw
In reply to Andreas Färber
Quoted 17 lines · Andreas Färber

Hello Stefan and Michael,

This series starts preparing tests to cover optional PCI devices. They don't do any functional tests but assure that QOM/PCI/VMState refactorings don't break the basic usage of devices not covered by qom-test.

pcnet-test.c is intended to handle sparc's lance as well.

v2 starts to cover virtio devices and covers ipack.

NB that the Makefile is being prepared for testing ...
* PCI devices on different architectures and
* VirtIO devices on different transports and
* IndustryPack devices on different bridges,
but the tests themselves will need some follow-up for choosing the right -machine or adding the required bus -device. My focus for now is on testing devices at all.

Quoted 2 lines

I'd like to include the IndustryPack tests in my upcoming pull (Monday) and am hoping I can do so on top of the original set of NIC tests for convenience.

How to apply these patches? They are quoted printable and "git am" does not parse them.

Besides that, I have a spapr-phb test which I posted here months ago but nobody seems to notice it :) I'll post it in this thread, it could go together with the other tests in this set.

Quoted 60 lines

Regards,
Andreas

v1 -> v2:
* Reordered includes (stefanha)
* Used qtest_end() where applicable
* Added qtest for tpci200 and ipoctal232 (for my IndustryPack refactoring series)
* Added qtests for ne2000, virtio-net, virtio-blk, virtio-balloon, virtio-rng

Cc Stefan Hajnoczi <[email protected]>
Cc Michael S. Tsirkin <[email protected]>
Cc Kevin Wolf <[email protected]>
Cc Alberto Garcia <[email protected]>
Cc Anthony Liguori <[email protected]>
Cc Paolo Bonzini <[email protected]>
Cc Peter Maydell <[email protected]>
Cc Alexey Kardashevskiy <[email protected]>

Andreas Färber (12):
tests: Add e1000 qtest
tests: Add vmxnet3 qtest
tests: Add rtl8139 qtest
tests: Add pcnet qtest
tests: Add eepro100 qtest
tests: Add tpci200 qtest
tests: Add ne2000 qtest
tests: Add virtio-net qtest
tests: Add virtio-blk qtest
tests: Add virtio-balloon qtest
tests: Add virtio-rng qtest
tests: Add ipoctal232 qtest

 tests/Makefile              | 49 +++++++++++++++++++++++++++++++++++
 tests/e1000-test.c          | 33 ++++++++++++++++++++++++
 tests/eepro100-test.c       | 63 +++++++++++++++++++++++++++++++++++++++++++++
 tests/ipoctal232-test.c     | 33 ++++++++++++++++++++++++
 tests/ne2000-test.c         | 33 ++++++++++++++++++++++++
 tests/pcnet-test.c          | 33 ++++++++++++++++++++++++
 tests/rtl8139-test.c        | 33 ++++++++++++++++++++++++
 tests/tpci200-test.c        | 33 ++++++++++++++++++++++++
 tests/virtio-balloon-test.c | 33 ++++++++++++++++++++++++
 tests/virtio-blk-test.c     | 34 ++++++++++++++++++++++++
 tests/virtio-net-test.c     | 33 ++++++++++++++++++++++++
 tests/virtio-rng-test.c     | 33 ++++++++++++++++++++++++
 tests/vmxnet3-test.c        | 33 ++++++++++++++++++++++++
 13 files changed, 476 insertions(+)
 create mode 100644 tests/e1000-test.c
 create mode 100644 tests/eepro100-test.c
 create mode 100644 tests/ipoctal232-test.c
 create mode 100644 tests/ne2000-test.c
 create mode 100644 tests/pcnet-test.c
 create mode 100644 tests/rtl8139-test.c
 create mode 100644 tests/tpci200-test.c
 create mode 100644 tests/virtio-balloon-test.c
 create mode 100644 tests/virtio-blk-test.c
 create mode 100644 tests/virtio-net-test.c
 create mode 100644 tests/virtio-rng-test.c
 create mode 100644 tests/vmxnet3-test.c
Signature · 1 line
Alexey
#15 lore raw

cover tests-ppc64: add spapr phb test

In reply to Andreas Färber

This adds ppc64 to check-cleanup rule in tests/Makefile and adds a test for SPAPR PHB.

Alexey Kardashevskiy (2):
tests-ppc64: add to cleanup rule
tests-ppc64: test for -device spapr-pci-host-bridge

 tests/Makefile         |  4 +++-
 tests/spapr-phb-test.c | 28 ++++++++++++++++++++++++++++
 2 files changed, 31 insertions(+), 1 deletion(-)
 create mode 100644 tests/spapr-phb-test.c
Signature · 1 line
1.8.4.rc4
#16 lore raw

PATCH 1/2 tests-ppc64: add to cleanup rule

This adds $(check-qtest-ppc64-y) to the check-clean rule.

---
 tests/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tests/Makefile +1 -1
index 0aaf657..3a00ea7 100644
@@ -319,7 +319,7 @@ check-block: $(patsubst %,check-%, $(check-block-y))
 check: check-qapi-schema check-unit check-qtest
 check-clean:
 	$(MAKE) -C tests/tcg clean
-	rm -rf $(check-unit-y) $(check-qtest-i386-y) $(check-qtest-x86_64-y) $(check-qtest-sparc64-y) $(check-qtest-sparc-y) tests/*.o $(QEMU_IOTESTS_HELPERS-y)
+	rm -rf $(check-unit-y) $(check-qtest-i386-y) $(check-qtest-x86_64-y) $(check-qtest-sparc64-y) $(check-qtest-sparc-y) $(check-qtest-ppc64-y) tests/*.o $(QEMU_IOTESTS_HELPERS-y)
 
 clean: check-clean
 
Signature · 1 line
1.8.4.rc4
#17 lore raw

Re: [Qemu-devel] [PATCH 1/2] tests-ppc64: add to cleanup rule

Am 10.02.2014 04:52, schrieb Alexey Kardashevskiy:

Quoted 3 lines

This adds $(check-qtest-ppc64-y) to the check-clean rule.

Nice catch!

Quoted 9 lines
---
 tests/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tests/Makefile +0 -0
index 0aaf657..3a00ea7 100644

tests/Makefile check-block: $(patsubst %,check-%, $(check-block-y)) · line 325

Quoted 8 lines
tests/Makefile +1 -1
@@ -319,7 +319,7 @@ check-block: $(patsubst %,check-%, $(check-block-y))
 check: check-qapi-schema check-unit check-qtest
 check-clean:
 	$(MAKE) -C tests/tcg clean
-	rm -rf $(check-unit-y) $(check-qtest-i386-y) $(check-qtest-x86_64-y) $(check-qtest-sparc64-y) $(check-qtest-sparc-y) tests/*.o $(QEMU_IOTESTS_HELPERS-y)
+	rm -rf $(check-unit-y) $(check-qtest-i386-y) $(check-qtest-x86_64-y) $(check-qtest-sparc64-y) $(check-qtest-sparc-y) $(check-qtest-ppc64-y) tests/*.o $(QEMU_IOTESTS_HELPERS-y)
 
 clean: check-clean
 

Can we use a $(foreach ...) for $(check-qtest-*-y) like Peter did for adding qom-test?

http://patchwork.ozlabs.org/patch/313650/

Regards,
Andreas

Signature · 2 lines
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
#18 lore raw

Re: [Qemu-devel] [PATCH 1/2] tests-ppc64: add to cleanup rule

Quoted 22 lines · Andreas Färber

Am 10.02.2014 04:52, schrieb Alexey Kardashevskiy:

Quoted 3 lines

This adds $(check-qtest-ppc64-y) to the check-clean rule.

Nice catch!

Quoted 15 lines
---
 tests/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tests/Makefile +1 -1
index 0aaf657..3a00ea7 100644
@@ -319,7 +319,7 @@ check-block: $(patsubst %,check-%, $(check-block-y))
 check: check-qapi-schema check-unit check-qtest
 check-clean:
 	$(MAKE) -C tests/tcg clean
-	rm -rf $(check-unit-y) $(check-qtest-i386-y) $(check-qtest-x86_64-y) $(check-qtest-sparc64-y) $(check-qtest-sparc-y) tests/*.o $(QEMU_IOTESTS_HELPERS-y)
+	rm -rf $(check-unit-y) $(check-qtest-i386-y) $(check-qtest-x86_64-y) $(check-qtest-sparc64-y) $(check-qtest-sparc-y) $(check-qtest-ppc64-y) tests/*.o $(QEMU_IOTESTS_HELPERS-y)
 
Quoted 7 lines

tests/Makefile check-block: $(patsubst %,check-%, $(check-block-y)) · line 325

Quoted 2 lines
tests/Makefile +0 -0
 clean: check-clean
 

Can we use a $(foreach ...) for $(check-qtest-*-y) like Peter did for adding qom-test?

http://patchwork.ozlabs.org/patch/313650/

Like this? Against what should I rebase my patches and repost them?

tests/Makefile +0 -1
index 94b32b7..2577843 100644
@@ -323,7 +323,9 @@ check-block: $(patsubst %,check-%, $(check-block-y))
 check: check-qapi-schema check-unit check-qtest
 check-clean:
        $(MAKE) -C tests/tcg clean
-       rm -rf $(check-unit-y) $(check-qtest-i386-y)

$(check-qtest-x86_64-y) $(check-qtest-sparc64-y) $(check-qtest-sparc-y) t
+ $(eval rmlist = $(check-unit-y) tests/*.o $(QEMU_IOTESTS_HELPERS-y))
+ $(foreach target,$(SYSEMU_TARGET_LIST), $(eval rmlist +=
$(check-qtest-$(target)-y)))
+ rm -rf $(rmlist)

clean: check-clean

Signature · 1 line
Alexey
#19 lore raw

Re: [Qemu-devel] [PATCH 1/2] tests-ppc64: add to cleanup rule

Quoted 29 lines · Alexey Kardashevskiy
Quoted 28 lines · Andreas Färber

Am 10.02.2014 04:52, schrieb Alexey Kardashevskiy:

Quoted 3 lines

This adds $(check-qtest-ppc64-y) to the check-clean rule.

Nice catch!

Quoted 9 lines
---
 tests/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tests/Makefile +0 -0
index 0aaf657..3a00ea7 100644

tests/Makefile check-block: $(patsubst %,check-%, $(check-block-y)) · line 325

Quoted 8 lines
tests/Makefile +1 -1
@@ -319,7 +319,7 @@ check-block: $(patsubst %,check-%, $(check-block-y))
 check: check-qapi-schema check-unit check-qtest
 check-clean:
 	$(MAKE) -C tests/tcg clean
-	rm -rf $(check-unit-y) $(check-qtest-i386-y) $(check-qtest-x86_64-y) $(check-qtest-sparc64-y) $(check-qtest-sparc-y) tests/*.o $(QEMU_IOTESTS_HELPERS-y)
+	rm -rf $(check-unit-y) $(check-qtest-i386-y) $(check-qtest-x86_64-y) $(check-qtest-sparc64-y) $(check-qtest-sparc-y) $(check-qtest-ppc64-y) tests/*.o $(QEMU_IOTESTS_HELPERS-y)
 
 clean: check-clean
 

Can we use a $(foreach ...) for $(check-qtest-*-y) like Peter did for adding qom-test?

Quoted 3 lines
Quoted 1 line

http://patchwork.ozlabs.org/patch/313650/

Like this? Against what should I rebase my patches and repost them?

Ping?

Quoted 20 lines
tests/Makefile +0 -1
index 94b32b7..2577843 100644
@@ -323,7 +323,9 @@ check-block: $(patsubst %,check-%, $(check-block-y))
 check: check-qapi-schema check-unit check-qtest
 check-clean:
        $(MAKE) -C tests/tcg clean
-       rm -rf $(check-unit-y) $(check-qtest-i386-y)

$(check-qtest-x86_64-y) $(check-qtest-sparc64-y) $(check-qtest-sparc-y) t

tests/Makefile +2 -0
+       $(eval rmlist = $(check-unit-y) tests/*.o $(QEMU_IOTESTS_HELPERS-y))
+       $(foreach target,$(SYSEMU_TARGET_LIST), $(eval rmlist +=

$(check-qtest-$(target)-y)))
+ rm -rf $(rmlist)

clean: check-clean

Signature · 1 line
Alexey
#20 lore raw

Re: [Qemu-devel] [PATCH 1/2] tests-ppc64: add to cleanup rule

In reply to Alexey Kardashevskiy

Am 14.02.2014 05:03, schrieb Alexey Kardashevskiy:

Quoted 29 lines · Andreas Färber
Quoted 28 lines

Am 10.02.2014 04:52, schrieb Alexey Kardashevskiy:

Quoted 3 lines

This adds $(check-qtest-ppc64-y) to the check-clean rule.

Nice catch!

Quoted 9 lines
---
 tests/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tests/Makefile +0 -0
index 0aaf657..3a00ea7 100644

tests/Makefile check-block: $(patsubst %,check-%, $(check-block-y)) · line 325

Quoted 8 lines
tests/Makefile +1 -1
@@ -319,7 +319,7 @@ check-block: $(patsubst %,check-%, $(check-block-y))
 check: check-qapi-schema check-unit check-qtest
 check-clean:
 	$(MAKE) -C tests/tcg clean
-	rm -rf $(check-unit-y) $(check-qtest-i386-y) $(check-qtest-x86_64-y) $(check-qtest-sparc64-y) $(check-qtest-sparc-y) tests/*.o $(QEMU_IOTESTS_HELPERS-y)
+	rm -rf $(check-unit-y) $(check-qtest-i386-y) $(check-qtest-x86_64-y) $(check-qtest-sparc64-y) $(check-qtest-sparc-y) $(check-qtest-ppc64-y) tests/*.o $(QEMU_IOTESTS_HELPERS-y)
 
 clean: check-clean
 

Can we use a $(foreach ...) for $(check-qtest-*-y) like Peter did for adding qom-test?

Quoted 3 lines
Quoted 1 line

http://patchwork.ozlabs.org/patch/313650/

Like this?

Maybe. Waiting for review from Peter (who did the foreach for qom-test) or anyone.

Quoted 1 line

Against what should I rebase my patches and repost them?

Sorry, didn't see this question...

Pushed a new working branch:
https://github.com/afaerber/qemu-cpu/commits/qtest

Some more tests were already pulled in, queue for upstream is:
https://github.com/afaerber/qemu-cpu/commits/qom-next

Regards,
Andreas

Quoted 17 lines
tests/Makefile +0 -1
index 94b32b7..2577843 100644
@@ -323,7 +323,9 @@ check-block: $(patsubst %,check-%, $(check-block-y))
 check: check-qapi-schema check-unit check-qtest
 check-clean:
        $(MAKE) -C tests/tcg clean
-       rm -rf $(check-unit-y) $(check-qtest-i386-y)

$(check-qtest-x86_64-y) $(check-qtest-sparc64-y) $(check-qtest-sparc-y) t

tests/Makefile +2 -0
+       $(eval rmlist = $(check-unit-y) tests/*.o $(QEMU_IOTESTS_HELPERS-y))
+       $(foreach target,$(SYSEMU_TARGET_LIST), $(eval rmlist +=

$(check-qtest-$(target)-y)))
+ rm -rf $(rmlist)

clean: check-clean

Signature · 2 lines
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
#21 lore raw

Re: [Qemu-devel] [PATCH 1/2] tests-ppc64: add to cleanup rule

In reply to Alexey Kardashevskiy
Quoted 15 lines · Alexey Kardashevskiy

Like this? Against what should I rebase my patches and repost them?

tests/Makefile +0 -1
index 94b32b7..2577843 100644
@@ -323,7 +323,9 @@ check-block: $(patsubst %,check-%, $(check-block-y))
 check: check-qapi-schema check-unit check-qtest
 check-clean:
        $(MAKE) -C tests/tcg clean
-       rm -rf $(check-unit-y) $(check-qtest-i386-y)

$(check-qtest-x86_64-y) $(check-qtest-sparc64-y) $(check-qtest-sparc-y) t

tests/Makefile +2 -0
+       $(eval rmlist = $(check-unit-y) tests/*.o $(QEMU_IOTESTS_HELPERS-y))
+       $(foreach target,$(SYSEMU_TARGET_LIST), $(eval rmlist +=
Quoted 2 lines

$(check-qtest-$(target)-y)))
+ rm -rf $(rmlist)

You don't need this intermediate rmlist variable. It should be possible to do something like
rm -rf $(foreach target,$(SYSEMU_TARGET_LIST), $(check-qtest-$(target)-y))

(untested!)

thanks
-- PMM

#22 lore raw

PATCH 2/2 tests-ppc64: test for -device spapr-pci-host-bridge

In reply to Alexey Kardashevskiy

This adds a test if SPAPR PHB can be added via the command line.

---
 tests/Makefile         |  2 ++
 tests/spapr-phb-test.c | 28 ++++++++++++++++++++++++++++
 2 files changed, 30 insertions(+)
 create mode 100644 tests/spapr-phb-test.c
tests/Makefile +2 -0
index 3a00ea7..303225e 100644
@@ -117,6 +117,7 @@ check-qtest-s390x-y += tests/qom-test$(EXESUF)
 check-qtest-unicore32-y += tests/qom-test$(EXESUF)
 check-qtest-xtensa-y += tests/qom-test$(EXESUF)
 check-qtest-xtensaeb-y = $(check-qtest-xtensa-y)
+check-qtest-ppc64-y += tests/spapr-phb-test$(EXESUF)
 
 check-qapi-schema-y := $(addprefix tests/qapi-schema/, \
         comments.json empty.json funny-char.json indented-expr.json \
@@ -203,6 +204,7 @@ libqos-omap-obj-y = $(libqos-obj-y) tests/libqos/i2c-omap.o
 tests/rtc-test$(EXESUF): tests/rtc-test.o
 tests/m48t59-test$(EXESUF): tests/m48t59-test.o
 tests/endianness-test$(EXESUF): tests/endianness-test.o
+tests/spapr-phb-test$(EXESUF): tests/spapr-phb-test.o $(libqos-obj-y)
 tests/fdc-test$(EXESUF): tests/fdc-test.o
 tests/ide-test$(EXESUF): tests/ide-test.o $(libqos-pc-obj-y)
 tests/hd-geo-test$(EXESUF): tests/hd-geo-test.o
tests/spapr-phb-test.c new file +28 -0
new file mode 100644
index 0000000..8cad354
@@ -0,0 +1,28 @@
+/*
+ * QTest testcase for SPAPR PHB
+ *
+ * This work is licensed under the terms of the GNU GPL, version 2 or later.
+ * See the COPYING file in the top-level directory.
+ */
+#include <glib.h>
+
+#include "libqtest.h"
+
+#define TYPE_SPAPR_PCI_HOST_BRIDGE "spapr-pci-host-bridge"
+
+static void test_phb_device(void)
+{
+    qtest_start("-device " TYPE_SPAPR_PCI_HOST_BRIDGE ",index=100");
+
+    qtest_end();
+}
+
+int main(int argc, char **argv)
+{
+    g_test_init(&argc, &argv, NULL);
+
+    qtest_add_func("/qmp/phb_device", test_phb_device);
+
+    return g_test_run();
+}
+
Signature · 1 line
1.8.4.rc4
#23 lore raw

Re: [Qemu-devel] [PATCH 2/2] tests-ppc64: test for -device spapr-pci-host-bridge

Am 10.02.2014 04:52, schrieb Alexey Kardashevskiy:

Quoted 35 lines

This adds a test if SPAPR PHB can be added via the command line.

---
 tests/Makefile         |  2 ++
 tests/spapr-phb-test.c | 28 ++++++++++++++++++++++++++++
 2 files changed, 30 insertions(+)
 create mode 100644 tests/spapr-phb-test.c
tests/Makefile +2 -0
index 3a00ea7..303225e 100644
@@ -117,6 +117,7 @@ check-qtest-s390x-y += tests/qom-test$(EXESUF)
 check-qtest-unicore32-y += tests/qom-test$(EXESUF)
 check-qtest-xtensa-y += tests/qom-test$(EXESUF)
 check-qtest-xtensaeb-y = $(check-qtest-xtensa-y)
+check-qtest-ppc64-y += tests/spapr-phb-test$(EXESUF)
 
 check-qapi-schema-y := $(addprefix tests/qapi-schema/, \
         comments.json empty.json funny-char.json indented-expr.json \
@@ -203,6 +204,7 @@ libqos-omap-obj-y = $(libqos-obj-y) tests/libqos/i2c-omap.o
 tests/rtc-test$(EXESUF): tests/rtc-test.o
 tests/m48t59-test$(EXESUF): tests/m48t59-test.o
 tests/endianness-test$(EXESUF): tests/endianness-test.o
+tests/spapr-phb-test$(EXESUF): tests/spapr-phb-test.o $(libqos-obj-y)
 tests/fdc-test$(EXESUF): tests/fdc-test.o
 tests/ide-test$(EXESUF): tests/ide-test.o $(libqos-pc-obj-y)
 tests/hd-geo-test$(EXESUF): tests/hd-geo-test.o
tests/spapr-phb-test.c new file +0 -0
new file mode 100644
index 0000000..8cad354

tests/spapr-phb-test.c line 3

Quoted 3 lines
tests/spapr-phb-test.c new file +3 -0
@@ -0,0 +1,28 @@
+/*
+ * QTest testcase for SPAPR PHB
+ *

Missing some IBM or aik copyright?

Quoted 15 lines
tests/spapr-phb-test.c new file +15 -0
+ * This work is licensed under the terms of the GNU GPL, version 2 or later.
+ * See the COPYING file in the top-level directory.
+ */
+#include <glib.h>
+
+#include "libqtest.h"
+
+#define TYPE_SPAPR_PCI_HOST_BRIDGE "spapr-pci-host-bridge"
+
+static void test_phb_device(void)
+{
+    qtest_start("-device " TYPE_SPAPR_PCI_HOST_BRIDGE ",index=100");
+
+    qtest_end();
+}

tests/spapr-phb-test.c line 28

Quoted 10 lines
tests/spapr-phb-test.c new file +10 -0
+
+int main(int argc, char **argv)
+{
+    g_test_init(&argc, &argv, NULL);
+
+    qtest_add_func("/qmp/phb_device", test_phb_device);
+
+    return g_test_run();
+}
+

Trailing white line FWIW.

This is looking good, thanks for your work. Apart from the device there's nothing ppc-specific in here, so I might take it through qom-next. One nit here is the test name, which I think should rather be /spapr-phb/device (nothing QMP-specific in there) - I could tweak that for you.

Another question is, do you plan to test variations of the device? Otherwise I would suggest to place the qtest_start() and qtest_end() into main(), so that individual future tests can test certain functionalities on the instantiated device rather than repeatedly launching QEMU processes.

Regards,
Andreas

Signature · 2 lines
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
#24 lore raw

Re: [Qemu-devel] [PATCH 2/2] tests-ppc64: test for -device spapr-pci-host-bridge

Quoted 76 lines · Andreas Färber

Am 10.02.2014 04:52, schrieb Alexey Kardashevskiy:

Quoted 35 lines

This adds a test if SPAPR PHB can be added via the command line.

---
 tests/Makefile         |  2 ++
 tests/spapr-phb-test.c | 28 ++++++++++++++++++++++++++++
 2 files changed, 30 insertions(+)
 create mode 100644 tests/spapr-phb-test.c
tests/Makefile +2 -0
index 3a00ea7..303225e 100644
@@ -117,6 +117,7 @@ check-qtest-s390x-y += tests/qom-test$(EXESUF)
 check-qtest-unicore32-y += tests/qom-test$(EXESUF)
 check-qtest-xtensa-y += tests/qom-test$(EXESUF)
 check-qtest-xtensaeb-y = $(check-qtest-xtensa-y)
+check-qtest-ppc64-y += tests/spapr-phb-test$(EXESUF)
 
 check-qapi-schema-y := $(addprefix tests/qapi-schema/, \
         comments.json empty.json funny-char.json indented-expr.json \
@@ -203,6 +204,7 @@ libqos-omap-obj-y = $(libqos-obj-y) tests/libqos/i2c-omap.o
 tests/rtc-test$(EXESUF): tests/rtc-test.o
 tests/m48t59-test$(EXESUF): tests/m48t59-test.o
 tests/endianness-test$(EXESUF): tests/endianness-test.o
+tests/spapr-phb-test$(EXESUF): tests/spapr-phb-test.o $(libqos-obj-y)
 tests/fdc-test$(EXESUF): tests/fdc-test.o
 tests/ide-test$(EXESUF): tests/ide-test.o $(libqos-pc-obj-y)
 tests/hd-geo-test$(EXESUF): tests/hd-geo-test.o
tests/spapr-phb-test.c new file +0 -0
new file mode 100644
index 0000000..8cad354

tests/spapr-phb-test.c line 3

Quoted 3 lines
tests/spapr-phb-test.c new file +3 -0
@@ -0,0 +1,28 @@
+/*
+ * QTest testcase for SPAPR PHB
+ *

Missing some IBM or aik copyright?

Quoted 15 lines
tests/spapr-phb-test.c new file +15 -0
+ * This work is licensed under the terms of the GNU GPL, version 2 or later.
+ * See the COPYING file in the top-level directory.
+ */
+#include <glib.h>
+
+#include "libqtest.h"
+
+#define TYPE_SPAPR_PCI_HOST_BRIDGE "spapr-pci-host-bridge"
+
+static void test_phb_device(void)
+{
+    qtest_start("-device " TYPE_SPAPR_PCI_HOST_BRIDGE ",index=100");
+
+    qtest_end();
+}

tests/spapr-phb-test.c line 28

Quoted 10 lines
tests/spapr-phb-test.c new file +10 -0
+
+int main(int argc, char **argv)
+{
+    g_test_init(&argc, &argv, NULL);
+
+    qtest_add_func("/qmp/phb_device", test_phb_device);
+
+    return g_test_run();
+}
+

Trailing white line FWIW.

This is looking good, thanks for your work. Apart from the device there's nothing ppc-specific in here, so I might take it through qom-next. One nit here is the test name, which I think should rather be /spapr-phb/device (nothing QMP-specific in there) - I could tweak that for you.

Quoted 5 lines

Another question is, do you plan to test variations of the device? Otherwise I would suggest to place the qtest_start() and qtest_end() into main(), so that individual future tests can test certain functionalities on the instantiated device rather than repeatedly launching QEMU processes.

Is this better? It does the job.

I am not quite sure what qtest_add_func() is for. Is there any good example of calling such a function via json or whatever it is? Thanks.

tests/spapr-phb-test.c new file +24 -0
new file mode 100644
index 0000000..11f186c
@@ -0,0 +1,24 @@
+/*
+ * QTest testcase for SPAPR PHB
+ *
+ * Authors:
+ *  Alexey Kardashevskiy <[email protected]>
+ *
+ * This work is licensed under the terms of the GNU GPL, version 2 or later.
+ * See the COPYING file in the top-level directory.
+ */
+#include <glib.h>
+
+#include "libqtest.h"
+
+#define TYPE_SPAPR_PCI_HOST_BRIDGE "spapr-pci-host-bridge"
+
+int main(int argc, char **argv)
+{
+    g_test_init(&argc, &argv, NULL);
+
+    qtest_start("-device " TYPE_SPAPR_PCI_HOST_BRIDGE ",index=100");
+    qtest_end();
+
+    return g_test_run();
+}
Signature · 1 line
Alexey
#25 lore raw

Re: [Qemu-devel] [PATCH 2/2] tests-ppc64: test for -device spapr-pci-host-bridge

Am 14.02.2014 05:05, schrieb Alexey Kardashevskiy:

Quoted 77 lines · Andreas Färber
Quoted 76 lines

Am 10.02.2014 04:52, schrieb Alexey Kardashevskiy:

Quoted 35 lines

This adds a test if SPAPR PHB can be added via the command line.

---
 tests/Makefile         |  2 ++
 tests/spapr-phb-test.c | 28 ++++++++++++++++++++++++++++
 2 files changed, 30 insertions(+)
 create mode 100644 tests/spapr-phb-test.c
tests/Makefile +2 -0
index 3a00ea7..303225e 100644
@@ -117,6 +117,7 @@ check-qtest-s390x-y += tests/qom-test$(EXESUF)
 check-qtest-unicore32-y += tests/qom-test$(EXESUF)
 check-qtest-xtensa-y += tests/qom-test$(EXESUF)
 check-qtest-xtensaeb-y = $(check-qtest-xtensa-y)
+check-qtest-ppc64-y += tests/spapr-phb-test$(EXESUF)
 
 check-qapi-schema-y := $(addprefix tests/qapi-schema/, \
         comments.json empty.json funny-char.json indented-expr.json \
@@ -203,6 +204,7 @@ libqos-omap-obj-y = $(libqos-obj-y) tests/libqos/i2c-omap.o
 tests/rtc-test$(EXESUF): tests/rtc-test.o
 tests/m48t59-test$(EXESUF): tests/m48t59-test.o
 tests/endianness-test$(EXESUF): tests/endianness-test.o
+tests/spapr-phb-test$(EXESUF): tests/spapr-phb-test.o $(libqos-obj-y)
 tests/fdc-test$(EXESUF): tests/fdc-test.o
 tests/ide-test$(EXESUF): tests/ide-test.o $(libqos-pc-obj-y)
 tests/hd-geo-test$(EXESUF): tests/hd-geo-test.o
tests/spapr-phb-test.c new file +0 -0
new file mode 100644
index 0000000..8cad354

tests/spapr-phb-test.c line 3

Quoted 3 lines
tests/spapr-phb-test.c new file +3 -0
@@ -0,0 +1,28 @@
+/*
+ * QTest testcase for SPAPR PHB
+ *

Missing some IBM or aik copyright?

Quoted 15 lines
tests/spapr-phb-test.c new file +15 -0
+ * This work is licensed under the terms of the GNU GPL, version 2 or later.
+ * See the COPYING file in the top-level directory.
+ */
+#include <glib.h>
+
+#include "libqtest.h"
+
+#define TYPE_SPAPR_PCI_HOST_BRIDGE "spapr-pci-host-bridge"
+
+static void test_phb_device(void)
+{
+    qtest_start("-device " TYPE_SPAPR_PCI_HOST_BRIDGE ",index=100");
+
+    qtest_end();
+}

tests/spapr-phb-test.c

Quoted 10 lines
tests/spapr-phb-test.c new file +10 -0
+
+int main(int argc, char **argv)
+{
+    g_test_init(&argc, &argv, NULL);
+
+    qtest_add_func("/qmp/phb_device", test_phb_device);
+
+    return g_test_run();
+}
+

Trailing white line FWIW.

This is looking good, thanks for your work. Apart from the device there's nothing ppc-specific in here, so I might take it through qom-next. One nit here is the test name, which I think should rather be /spapr-phb/device (nothing QMP-specific in there) - I could tweak that for you.

Quoted 7 lines
Quoted 5 lines

Another question is, do you plan to test variations of the device? Otherwise I would suggest to place the qtest_start() and qtest_end() into main(), so that individual future tests can test certain functionalities on the instantiated device rather than repeatedly launching QEMU processes.

Is this better? It does the job.

Hmm... ;)

Quoted 2 lines

I am not quite sure what qtest_add_func() is for. Is there any good example of calling such a function via json or whatever it is? Thanks.

There are lots of other tests/*-test.c files, including the series you replied to. I've tweaked your original patch so that it outputs:

$ make check-qtest-ppc64 V=1
[...]
TEST: tests/spapr-phb-test... (pid=3080)
  /ppc64/spapr-phb/device:                                            OK
PASS: tests/spapr-phb-test

"/spapr-phb/device" is the name of the unit test supplied to qtest_add_func(), which then prepends the architecture for uniqueness. Without calling it, there is no indication that the test was successful.

Individual tests reading/writing registers etc. will need the qemu-system-ppc64 process running, so g_test_run() needs to go before qtest_end(). Or if you want to launch it multiple times (e.g. with different parameters) place it into the test function like originally.

Your test did not pass on qemu.git or qom-next - I picked up the corresponding fix from ppc-next to reallow -device spapr-pci-host-bridge.

Further the patch was missing a line for gcov to pick up the .o file:

Gcov report for ppc64-softmmu/hw/ppc/spapr_pci.c:
File '/home/andreas/QEMU/qemu/hw/ppc/spapr_pci.c'
Lines executed:42.98% of 342

File '../trace/generated-tracers.h'
Lines executed:0.00% of 12

File '/usr/include/libfdt.h'
Lines executed:100.00% of 5

File '/usr/include/libfdt_env.h'
Lines executed:100.00% of 2

File '/home/andreas/QEMU/qemu/include/hw/pci-host/spapr.h' Lines executed:0.00% of 2

File '/home/andreas/QEMU/qemu/include/hw/ppc/spapr.h' Lines executed:22.22% of 9

File '/home/andreas/QEMU/qemu/include/hw/pci/pci.h' Lines executed:0.00% of 4

File '/home/andreas/QEMU/qemu/include/hw/irq.h'
Lines executed:0.00% of 4

File '/home/andreas/QEMU/qemu/include/qemu/bitops.h' Lines executed:100.00% of 5

File '/home/andreas/QEMU/qemu/include/qemu/bswap.h' Lines executed:100.00% of 6

File '/usr/include/bits/byteswap.h'
Lines executed:100.00% of 4

Regards,
Andreas

Quoted 30 lines
tests/spapr-phb-test.c new file +24 -0
new file mode 100644
index 0000000..11f186c
@@ -0,0 +1,24 @@
+/*
+ * QTest testcase for SPAPR PHB
+ *
+ * Authors:
+ *  Alexey Kardashevskiy <[email protected]>
+ *
+ * This work is licensed under the terms of the GNU GPL, version 2 or later.
+ * See the COPYING file in the top-level directory.
+ */
+#include <glib.h>
+
+#include "libqtest.h"
+
+#define TYPE_SPAPR_PCI_HOST_BRIDGE "spapr-pci-host-bridge"
+
+int main(int argc, char **argv)
+{
+    g_test_init(&argc, &argv, NULL);
+
+    qtest_start("-device " TYPE_SPAPR_PCI_HOST_BRIDGE ",index=100");
+    qtest_end();
+
+    return g_test_run();
+}
Signature · 2 lines
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
#26 lore raw

Re: [Qemu-devel] [PATCH 2/2] tests-ppc64: test for -device spapr-pci-host-bridge

Quoted 104 lines · Andreas Färber

Am 14.02.2014 05:05, schrieb Alexey Kardashevskiy:

Quoted 77 lines · Andreas Färber
Quoted 76 lines

Am 10.02.2014 04:52, schrieb Alexey Kardashevskiy:

Quoted 35 lines

This adds a test if SPAPR PHB can be added via the command line.

---
 tests/Makefile         |  2 ++
 tests/spapr-phb-test.c | 28 ++++++++++++++++++++++++++++
 2 files changed, 30 insertions(+)
 create mode 100644 tests/spapr-phb-test.c
tests/Makefile +2 -0
index 3a00ea7..303225e 100644
@@ -117,6 +117,7 @@ check-qtest-s390x-y += tests/qom-test$(EXESUF)
 check-qtest-unicore32-y += tests/qom-test$(EXESUF)
 check-qtest-xtensa-y += tests/qom-test$(EXESUF)
 check-qtest-xtensaeb-y = $(check-qtest-xtensa-y)
+check-qtest-ppc64-y += tests/spapr-phb-test$(EXESUF)
 
 check-qapi-schema-y := $(addprefix tests/qapi-schema/, \
         comments.json empty.json funny-char.json indented-expr.json \
@@ -203,6 +204,7 @@ libqos-omap-obj-y = $(libqos-obj-y) tests/libqos/i2c-omap.o
 tests/rtc-test$(EXESUF): tests/rtc-test.o
 tests/m48t59-test$(EXESUF): tests/m48t59-test.o
 tests/endianness-test$(EXESUF): tests/endianness-test.o
+tests/spapr-phb-test$(EXESUF): tests/spapr-phb-test.o $(libqos-obj-y)
 tests/fdc-test$(EXESUF): tests/fdc-test.o
 tests/ide-test$(EXESUF): tests/ide-test.o $(libqos-pc-obj-y)
 tests/hd-geo-test$(EXESUF): tests/hd-geo-test.o
tests/spapr-phb-test.c new file +0 -0
new file mode 100644
index 0000000..8cad354

tests/spapr-phb-test.c line 3

Quoted 3 lines
tests/spapr-phb-test.c new file +3 -0
@@ -0,0 +1,28 @@
+/*
+ * QTest testcase for SPAPR PHB
+ *

Missing some IBM or aik copyright?

Quoted 15 lines
tests/spapr-phb-test.c new file +15 -0
+ * This work is licensed under the terms of the GNU GPL, version 2 or later.
+ * See the COPYING file in the top-level directory.
+ */
+#include <glib.h>
+
+#include "libqtest.h"
+
+#define TYPE_SPAPR_PCI_HOST_BRIDGE "spapr-pci-host-bridge"
+
+static void test_phb_device(void)
+{
+    qtest_start("-device " TYPE_SPAPR_PCI_HOST_BRIDGE ",index=100");
+
+    qtest_end();
+}

tests/spapr-phb-test.c

Quoted 10 lines
tests/spapr-phb-test.c new file +10 -0
+
+int main(int argc, char **argv)
+{
+    g_test_init(&argc, &argv, NULL);
+
+    qtest_add_func("/qmp/phb_device", test_phb_device);
+
+    return g_test_run();
+}
+

Trailing white line FWIW.

This is looking good, thanks for your work. Apart from the device there's nothing ppc-specific in here, so I might take it through qom-next. One nit here is the test name, which I think should rather be /spapr-phb/device (nothing QMP-specific in there) - I could tweak that for you.

Quoted 7 lines
Quoted 5 lines

Another question is, do you plan to test variations of the device? Otherwise I would suggest to place the qtest_start() and qtest_end() into main(), so that individual future tests can test certain functionalities on the instantiated device rather than repeatedly launching QEMU processes.

Is this better? It does the job.

Hmm... ;)

Quoted 2 lines

I am not quite sure what qtest_add_func() is for. Is there any good example of calling such a function via json or whatever it is? Thanks.

There are lots of other tests/*-test.c files, including the series you replied to. I've tweaked your original patch so that it outputs:

$ make check-qtest-ppc64 V=1
[...]
TEST: tests/spapr-phb-test... (pid=3080)
  /ppc64/spapr-phb/device:                                            OK
PASS: tests/spapr-phb-test

"/spapr-phb/device" is the name of the unit test supplied to qtest_add_func(), which then prepends the architecture for uniqueness. Without calling it, there is no indication that the test was successful.

Quoted 7 lines

Individual tests reading/writing registers etc. will need the qemu-system-ppc64 process running, so g_test_run() needs to go before qtest_end(). Or if you want to launch it multiple times (e.g. with different parameters) place it into the test function like originally.

Your test did not pass on qemu.git or qom-next - I picked up the corresponding fix from ppc-next to reallow -device spapr-pci-host-bridge.

Sure it did not pass, this is why I made the test ;)

But I wonder why this fix not gone to upstream immediately - it was breakage.

Quoted 7 lines

Further the patch was missing a line for gcov to pick up the .o file:

Gcov report for ppc64-softmmu/hw/ppc/spapr_pci.c:
File '/home/andreas/QEMU/qemu/hw/ppc/spapr_pci.c'
Lines executed:42.98% of 342

What did you do to get this output? None from "make check-help" seems to do this.

btw it would nice if people updated "make check-help" when they add new tests as without documentation this is all we have to know what tests are there. For example, it was not very obvious how check-tests/qemu-iotests-quick.sh is called and how it works.

Or there is some howto and I am just disturbingly blind? Thanks.

Also thanks for comments and tweaks but I still do not understand if I still have to do anything regarding these 2 patches.

Quoted 66 lines

File '../trace/generated-tracers.h'
Lines executed:0.00% of 12

File '/usr/include/libfdt.h'
Lines executed:100.00% of 5

File '/usr/include/libfdt_env.h'
Lines executed:100.00% of 2

File '/home/andreas/QEMU/qemu/include/hw/pci-host/spapr.h' Lines executed:0.00% of 2

File '/home/andreas/QEMU/qemu/include/hw/ppc/spapr.h' Lines executed:22.22% of 9

File '/home/andreas/QEMU/qemu/include/hw/pci/pci.h' Lines executed:0.00% of 4

File '/home/andreas/QEMU/qemu/include/hw/irq.h'
Lines executed:0.00% of 4

File '/home/andreas/QEMU/qemu/include/qemu/bitops.h' Lines executed:100.00% of 5

File '/home/andreas/QEMU/qemu/include/qemu/bswap.h' Lines executed:100.00% of 6

File '/usr/include/bits/byteswap.h'
Lines executed:100.00% of 4

Regards,
Andreas

Quoted 30 lines
tests/spapr-phb-test.c new file +24 -0
new file mode 100644
index 0000000..11f186c
@@ -0,0 +1,24 @@
+/*
+ * QTest testcase for SPAPR PHB
+ *
+ * Authors:
+ *  Alexey Kardashevskiy <[email protected]>
+ *
+ * This work is licensed under the terms of the GNU GPL, version 2 or later.
+ * See the COPYING file in the top-level directory.
+ */
+#include <glib.h>
+
+#include "libqtest.h"
+
+#define TYPE_SPAPR_PCI_HOST_BRIDGE "spapr-pci-host-bridge"
+
+int main(int argc, char **argv)
+{
+    g_test_init(&argc, &argv, NULL);
+
+    qtest_start("-device " TYPE_SPAPR_PCI_HOST_BRIDGE ",index=100");
+    qtest_end();
+
+    return g_test_run();
+}
Signature · 1 line
Alexey
#27 lore raw

Re: [Qemu-devel] [PATCH 2/2] tests-ppc64: test for -device spapr-pci-host-bridge

Quoted 136 lines · Alexey Kardashevskiy
Quoted 104 lines · Andreas Färber

Am 14.02.2014 05:05, schrieb Alexey Kardashevskiy:

Quoted 77 lines · Andreas Färber
Quoted 76 lines

Am 10.02.2014 04:52, schrieb Alexey Kardashevskiy:

Quoted 35 lines

This adds a test if SPAPR PHB can be added via the command line.

---
 tests/Makefile         |  2 ++
 tests/spapr-phb-test.c | 28 ++++++++++++++++++++++++++++
 2 files changed, 30 insertions(+)
 create mode 100644 tests/spapr-phb-test.c
tests/Makefile +2 -0
index 3a00ea7..303225e 100644
@@ -117,6 +117,7 @@ check-qtest-s390x-y += tests/qom-test$(EXESUF)
 check-qtest-unicore32-y += tests/qom-test$(EXESUF)
 check-qtest-xtensa-y += tests/qom-test$(EXESUF)
 check-qtest-xtensaeb-y = $(check-qtest-xtensa-y)
+check-qtest-ppc64-y += tests/spapr-phb-test$(EXESUF)
 
 check-qapi-schema-y := $(addprefix tests/qapi-schema/, \
         comments.json empty.json funny-char.json indented-expr.json \
@@ -203,6 +204,7 @@ libqos-omap-obj-y = $(libqos-obj-y) tests/libqos/i2c-omap.o
 tests/rtc-test$(EXESUF): tests/rtc-test.o
 tests/m48t59-test$(EXESUF): tests/m48t59-test.o
 tests/endianness-test$(EXESUF): tests/endianness-test.o
+tests/spapr-phb-test$(EXESUF): tests/spapr-phb-test.o $(libqos-obj-y)
 tests/fdc-test$(EXESUF): tests/fdc-test.o
 tests/ide-test$(EXESUF): tests/ide-test.o $(libqos-pc-obj-y)
 tests/hd-geo-test$(EXESUF): tests/hd-geo-test.o
tests/spapr-phb-test.c new file +0 -0
new file mode 100644
index 0000000..8cad354

tests/spapr-phb-test.c line 3

Quoted 3 lines
tests/spapr-phb-test.c new file +3 -0
@@ -0,0 +1,28 @@
+/*
+ * QTest testcase for SPAPR PHB
+ *

Missing some IBM or aik copyright?

Quoted 15 lines
tests/spapr-phb-test.c new file +15 -0
+ * This work is licensed under the terms of the GNU GPL, version 2 or later.
+ * See the COPYING file in the top-level directory.
+ */
+#include <glib.h>
+
+#include "libqtest.h"
+
+#define TYPE_SPAPR_PCI_HOST_BRIDGE "spapr-pci-host-bridge"
+
+static void test_phb_device(void)
+{
+    qtest_start("-device " TYPE_SPAPR_PCI_HOST_BRIDGE ",index=100");
+
+    qtest_end();
+}

tests/spapr-phb-test.c

Quoted 10 lines
tests/spapr-phb-test.c new file +10 -0
+
+int main(int argc, char **argv)
+{
+    g_test_init(&argc, &argv, NULL);
+
+    qtest_add_func("/qmp/phb_device", test_phb_device);
+
+    return g_test_run();
+}
+

Trailing white line FWIW.

This is looking good, thanks for your work. Apart from the device there's nothing ppc-specific in here, so I might take it through qom-next. One nit here is the test name, which I think should rather be /spapr-phb/device (nothing QMP-specific in there) - I could tweak that for you.

Quoted 7 lines
Quoted 5 lines

Another question is, do you plan to test variations of the device? Otherwise I would suggest to place the qtest_start() and qtest_end() into main(), so that individual future tests can test certain functionalities on the instantiated device rather than repeatedly launching QEMU processes.

Is this better? It does the job.

Hmm... ;)

Quoted 2 lines

I am not quite sure what qtest_add_func() is for. Is there any good example of calling such a function via json or whatever it is? Thanks.

There are lots of other tests/*-test.c files, including the series you replied to. I've tweaked your original patch so that it outputs:

$ make check-qtest-ppc64 V=1
[...]
TEST: tests/spapr-phb-test... (pid=3080)
  /ppc64/spapr-phb/device:                                            OK
PASS: tests/spapr-phb-test

"/spapr-phb/device" is the name of the unit test supplied to qtest_add_func(), which then prepends the architecture for uniqueness. Without calling it, there is no indication that the test was successful.

Quoted 7 lines

Individual tests reading/writing registers etc. will need the qemu-system-ppc64 process running, so g_test_run() needs to go before qtest_end(). Or if you want to launch it multiple times (e.g. with different parameters) place it into the test function like originally.

Your test did not pass on qemu.git or qom-next - I picked up the corresponding fix from ppc-next to reallow -device spapr-pci-host-bridge.

Sure it did not pass, this is why I made the test ;)

But I wonder why this fix not gone to upstream immediately - it was breakage.

Quoted 7 lines

Further the patch was missing a line for gcov to pick up the .o file:

Gcov report for ppc64-softmmu/hw/ppc/spapr_pci.c:
File '/home/andreas/QEMU/qemu/hw/ppc/spapr_pci.c'
Lines executed:42.98% of 342

What did you do to get this output? None from "make check-help" seems to do this.

btw it would nice if people updated "make check-help" when they add new tests as without documentation this is all we have to know what tests are there. For example, it was not very obvious how check-tests/qemu-iotests-quick.sh is called and how it works.

Quoted 5 lines

Or there is some howto and I am just disturbingly blind? Thanks.

Also thanks for comments and tweaks but I still do not understand if I still have to do anything regarding these 2 patches.

Andreas?

Quoted 67 lines
Quoted 65 lines

File '../trace/generated-tracers.h'
Lines executed:0.00% of 12

File '/usr/include/libfdt.h'
Lines executed:100.00% of 5

File '/usr/include/libfdt_env.h'
Lines executed:100.00% of 2

File '/home/andreas/QEMU/qemu/include/hw/pci-host/spapr.h' Lines executed:0.00% of 2

File '/home/andreas/QEMU/qemu/include/hw/ppc/spapr.h' Lines executed:22.22% of 9

File '/home/andreas/QEMU/qemu/include/hw/pci/pci.h' Lines executed:0.00% of 4

File '/home/andreas/QEMU/qemu/include/hw/irq.h'
Lines executed:0.00% of 4

File '/home/andreas/QEMU/qemu/include/qemu/bitops.h' Lines executed:100.00% of 5

File '/home/andreas/QEMU/qemu/include/qemu/bswap.h' Lines executed:100.00% of 6

File '/usr/include/bits/byteswap.h'
Lines executed:100.00% of 4

Regards,
Andreas

Quoted 30 lines
tests/spapr-phb-test.c new file +24 -0
new file mode 100644
index 0000000..11f186c
@@ -0,0 +1,24 @@
+/*
+ * QTest testcase for SPAPR PHB
+ *
+ * Authors:
+ *  Alexey Kardashevskiy <[email protected]>
+ *
+ * This work is licensed under the terms of the GNU GPL, version 2 or later.
+ * See the COPYING file in the top-level directory.
+ */
+#include <glib.h>
+
+#include "libqtest.h"
+
+#define TYPE_SPAPR_PCI_HOST_BRIDGE "spapr-pci-host-bridge"
+
+int main(int argc, char **argv)
+{
+    g_test_init(&argc, &argv, NULL);
+
+    qtest_start("-device " TYPE_SPAPR_PCI_HOST_BRIDGE ",index=100");
+    qtest_end();
+
+    return g_test_run();
+}
Signature · 1 line
Alexey
#28 lore raw

Re: [Qemu-devel] [PATCH 2/2] tests-ppc64: test for -device spapr-pci-host-bridge

In reply to Alexey Kardashevskiy

Am 06.03.2014 02:59, schrieb Alexey Kardashevskiy:

Quoted 122 lines · Andreas Färber
Quoted 104 lines

Am 14.02.2014 05:05, schrieb Alexey Kardashevskiy:

Quoted 77 lines · Andreas Färber
Quoted 76 lines

Am 10.02.2014 04:52, schrieb Alexey Kardashevskiy:

Quoted 35 lines

This adds a test if SPAPR PHB can be added via the command line.

---
 tests/Makefile         |  2 ++
 tests/spapr-phb-test.c | 28 ++++++++++++++++++++++++++++
 2 files changed, 30 insertions(+)
 create mode 100644 tests/spapr-phb-test.c
tests/Makefile +2 -0
index 3a00ea7..303225e 100644
@@ -117,6 +117,7 @@ check-qtest-s390x-y += tests/qom-test$(EXESUF)
 check-qtest-unicore32-y += tests/qom-test$(EXESUF)
 check-qtest-xtensa-y += tests/qom-test$(EXESUF)
 check-qtest-xtensaeb-y = $(check-qtest-xtensa-y)
+check-qtest-ppc64-y += tests/spapr-phb-test$(EXESUF)
 
 check-qapi-schema-y := $(addprefix tests/qapi-schema/, \
         comments.json empty.json funny-char.json indented-expr.json \
@@ -203,6 +204,7 @@ libqos-omap-obj-y = $(libqos-obj-y) tests/libqos/i2c-omap.o
 tests/rtc-test$(EXESUF): tests/rtc-test.o
 tests/m48t59-test$(EXESUF): tests/m48t59-test.o
 tests/endianness-test$(EXESUF): tests/endianness-test.o
+tests/spapr-phb-test$(EXESUF): tests/spapr-phb-test.o $(libqos-obj-y)
 tests/fdc-test$(EXESUF): tests/fdc-test.o
 tests/ide-test$(EXESUF): tests/ide-test.o $(libqos-pc-obj-y)
 tests/hd-geo-test$(EXESUF): tests/hd-geo-test.o
tests/spapr-phb-test.c new file +0 -0
new file mode 100644
index 0000000..8cad354

tests/spapr-phb-test.c line 3

Quoted 3 lines
tests/spapr-phb-test.c new file +3 -0
@@ -0,0 +1,28 @@
+/*
+ * QTest testcase for SPAPR PHB
+ *

Missing some IBM or aik copyright?

Quoted 15 lines
tests/spapr-phb-test.c new file +15 -0
+ * This work is licensed under the terms of the GNU GPL, version 2 or later.
+ * See the COPYING file in the top-level directory.
+ */
+#include <glib.h>
+
+#include "libqtest.h"
+
+#define TYPE_SPAPR_PCI_HOST_BRIDGE "spapr-pci-host-bridge"
+
+static void test_phb_device(void)
+{
+    qtest_start("-device " TYPE_SPAPR_PCI_HOST_BRIDGE ",index=100");
+
+    qtest_end();
+}

tests/spapr-phb-test.c

Quoted 10 lines
tests/spapr-phb-test.c new file +10 -0
+
+int main(int argc, char **argv)
+{
+    g_test_init(&argc, &argv, NULL);
+
+    qtest_add_func("/qmp/phb_device", test_phb_device);
+
+    return g_test_run();
+}
+

Trailing white line FWIW.

This is looking good, thanks for your work. Apart from the device there's nothing ppc-specific in here, so I might take it through qom-next. One nit here is the test name, which I think should rather be /spapr-phb/device (nothing QMP-specific in there) - I could tweak that for you.

Quoted 7 lines
Quoted 5 lines

Another question is, do you plan to test variations of the device? Otherwise I would suggest to place the qtest_start() and qtest_end() into main(), so that individual future tests can test certain functionalities on the instantiated device rather than repeatedly launching QEMU processes.

Is this better? It does the job.

Hmm... ;)

Quoted 2 lines

I am not quite sure what qtest_add_func() is for. Is there any good example of calling such a function via json or whatever it is? Thanks.

There are lots of other tests/*-test.c files, including the series you replied to. I've tweaked your original patch so that it outputs:

$ make check-qtest-ppc64 V=1
[...]
TEST: tests/spapr-phb-test... (pid=3080)
  /ppc64/spapr-phb/device:                                            OK
PASS: tests/spapr-phb-test

"/spapr-phb/device" is the name of the unit test supplied to qtest_add_func(), which then prepends the architecture for uniqueness. Without calling it, there is no indication that the test was successful.

Quoted 7 lines

Individual tests reading/writing registers etc. will need the qemu-system-ppc64 process running, so g_test_run() needs to go before qtest_end(). Or if you want to launch it multiple times (e.g. with different parameters) place it into the test function like originally.

Your test did not pass on qemu.git or qom-next - I picked up the corresponding fix from ppc-next to reallow -device spapr-pci-host-bridge.

Sure it did not pass, this is why I made the test ;)

But I wonder why this fix not gone to upstream immediately - it was breakage.

Quoted 1 line

Further the patch was missing a line for gcov to pick up the .o file:

Quoted 8 lines
Quoted 3 lines

Gcov report for ppc64-softmmu/hw/ppc/spapr_pci.c:
File '/home/andreas/QEMU/qemu/hw/ppc/spapr_pci.c'
Lines executed:42.98% of 342

What did you do to get this output? None from "make check-help" seems to do this.

Configure a separate build directory with --enable-gcov, then run make check* as usual.

Quoted 4 lines

btw it would nice if people updated "make check-help" when they add new tests as without documentation this is all we have to know what tests are there. For example, it was not very obvious how check-tests/qemu-iotests-quick.sh is called and how it works.

Neither Alex nor me will feel responsible for this complaint and those maintaining it are unlikely to read it here...

Quoted 5 lines

Or there is some howto and I am just disturbingly blind? Thanks.

Also thanks for comments and tweaks but I still do not understand if I still have to do anything regarding these 2 patches.

1/2 maybe - had ping'ed it for review. Bugfix, so still time.

2/2 is in my pull; obviously it's still just a stub, the libqos portion still needs to be implemented to do any functional tests. I.e. tests/libqos/pci-spapr.c, see pci-pc.c as template.

Cheers,
Andreas

Signature · 2 lines
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
author Applied
#30 lore raw

Am 10.02.2014 17:07, schrieb Stefan Hajnoczi:

Quoted 1 line

Thanks, applied all NIC and IndustryPack patches to qom-next, reordered so that NICs are together and IndustryPack tests come before IndustryPack refactorings:

https://github.com/afaerber/qemu-cpu/commits/qom-next

Remaining virtio patches are left out for now for further review.

Andreas

Signature · 2 lines
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg