tests/pxe-test: add testcase using vhost-user-bridge
v3 cover tests/pxe-test: add testcase using vhost-user-bridge
This implements a testcase for pxe-test using the vhost-user interface. Spawn a vhost-user-bridge process and connect it to the qemu process.
changes v2->v3:
- fixed build on aarch64 by removing a flag for g_spawn_async() that is not even needed. Patch builds on my system for target aarch64 now
changes v1->v2:
- new patch 4/5. Necessary to make qtest_add_abrt_handler work.
- get rid of hugepagefs specific code (mst)
- use htonl and INADDR_LOOPBACK to set remote address (Stefan Hajnoczi)
- add qtest abort handler (Stefan Hajnoczi)
- spawn vhost-user-bridge process with flag DO_NOT_REAP_CHILD and add a child watch function (Stefan Hajnoczi)
Killing the vubr process manually at the end of the test and watching its termination with the child watch function.
- clean up pxe-test-disk images
- add Jason Wang to Cc
regards,
Jens
Jens Freimann (2):
tests/vhost-user-bridge: disable debug output by default tests/pxe-test: add testcase using vhost-user-bridge
tests/Makefile.include | 4 +- tests/pxe-test.c | 114 +++++++++++++++++++++++++++++++++++++++++++++- tests/vhost-user-bridge.c | 2 +- 3 files changed, 117 insertions(+), 3 deletions(-)
Signature · 1 line
2.13.3
PATCH v3 1/2 tests/vhost-user-bridge: disable debug output by default
From: Jens Freimann <[email protected]>
vhost-user-bridge prints out a lot of information, including dumps of all transmitted data. When called from a testcase this output clutters the actual test results, so let's make the default no debug output.
--- tests/vhost-user-bridge.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tests/vhost-user-bridge.c +1 -1
@@ -34,7 +34,7 @@#include "standard-headers/linux/virtio_net.h" #include "contrib/libvhost-user/libvhost-user.h" -#define VHOST_USER_BRIDGE_DEBUG 1 +#define VHOST_USER_BRIDGE_DEBUG 0#define DPRINT (...) \ do { \
Signature · 1 line
2.13.3
PATCH v3 2/2 tests/pxe-test: add testcase using vhost-user-bridge
In reply to Jens FreimannFrom: Jens Freimann <[email protected]>
Add a PXE testcase tunneling traffic through vhost-user-bridge process. Create a vhost-user-bridge process and connect it to qemu via a socket.
--- tests/Makefile.include | 4 +- tests/pxe-test.c | 114 ++++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 116 insertions(+), 2 deletions(-)
tests/Makefile.include +3 -1
@@ -705,7 +705,8 @@ tests/boot-order-test$(EXESUF): tests/boot-order-test.o $(libqos-obj-y) tests/boot-serial-test$(EXESUF): tests/boot-serial-test.o $(libqos-obj-y) tests/bios-tables-test$(EXESUF): tests/bios-tables-test.o \ tests/boot-sector.o tests/acpi-utils.o $(libqos-obj-y) -tests/pxe-test$(EXESUF): tests/pxe-test.o tests/boot-sector.o $(libqos-obj-y) +tests/pxe-test$(EXESUF): tests/pxe-test.o tests/boot-sector.o \ + tests/vhost-user-bridge$(EXESUF) $(libqos-obj-y) tests/tmp105-test$(EXESUF): tests/tmp105-test.o $(libqos-omap-obj-y) tests/ds1338-test$(EXESUF): tests/ds1338-test.o $(libqos-imx-obj-y) tests/m25p80-test$(EXESUF): tests/m25p80-test.o
@@ -834,6 +835,7 @@ $(patsubst %, check-qtest-%, $(QTEST_TARGETS)): check-qtest-%: subdir-%-softmmu $(if $(CONFIG_GCOV),@rm -f *.gcda */*.gcda */*/*.gcda */*/*/*.gcda,) $(call quiet-command,QTEST_QEMU_BINARY=$*-softmmu/qemu-system-$* \ QTEST_QEMU_IMG=qemu-img$(EXESUF) \ + QTEST_VUBR_BINARY=./tests/vhost-user-bridge$(EXESUF) \ MALLOC_PERTURB_=$${MALLOC_PERTURB_:-$$(( $${RANDOM:-0} % 255 + 1))} \ gtester $(GTESTER_OPTIONS) -m=$(SPEED) $(check-qtest-$*-y) $(check-qtest-generic-y),"GTESTER","$@") $(if $(CONFIG_GCOV),@for f in $(gcov-files-$*-y) $(gcov-files-generic-y); do \
tests/pxe-test.c +113 -1
140 lines not on this page · raw message
Signature · 1 line
2.13.3