qtest: enable vhost-user-test
PATCH v2 1/1 qtest: enable vhost-user-test
Use qtest-obj-y to get the right library order. CONFIG_POSIX ensures mingw compilation won't break.
---
0 files changed
tests/Makefile +6 -3
@@ -156,7 +156,7 @@ gcov-files-i386-y += hw/usb/hcd-ehci.c gcov-files-i386-y += hw/usb/hcd-uhci.c gcov-files-i386-y += hw/usb/dev-hid.c gcov-files-i386-y += hw/usb/dev-storage.c -#check-qtest-i386-y += tests/vhost-user-test$(EXESUF) +check-qtest-i386-$(CONFIG_POSIX) += tests/vhost-user-test$(EXESUF) check-qtest-x86_64-y = $(check-qtest-i386-y) gcov-files-i386-y += i386-softmmu/hw/timer/mc146818rtc.c gcov-files-x86_64-y = $(subst i386-softmmu/,x86_64-softmmu/,$(gcov-files-i386-y))
@@ -323,11 +323,14 @@ tests/es1370-test$(EXESUF): tests/es1370-test.o tests/intel-hda-test$(EXESUF): tests/intel-hda-test.o tests/ioh3420-test$(EXESUF): tests/ioh3420-test.o tests/usb-hcd-ehci-test$(EXESUF): tests/usb-hcd-ehci-test.o $(libqos-pc-obj-y) -tests/vhost-user-test$(EXESUF): tests/vhost-user-test.o qemu-char.o qemu-timer.o libqemuutil.a libqemustub.a +tests/vhost-user-test$(EXESUF): tests/vhost-user-test.o qemu-char.o qemu-timer.o $(qtest-obj-y) tests/qemu-iotests/socket_scm_helper$(EXESUF): tests/qemu-iotests/socket_scm_helper.o tests/test-qemu-opts$(EXESUF): tests/test-qemu-opts.o libqemuutil.a libqemustub.a -#LIBS+= -lutil + +ifeq ($(CONFIG_POSIX),y) +LIBS+= -lutil +endif # QTest rules
Quoted 4 lines · Nikolay Nikolaev
Use qtest-obj-y to get the right library order.
CONFIG_POSIXensures mingw compilation won't break.Signed-off-by Nikolay Nikolaev <[email protected]>
okay but why does non posix work without -lutil and posix doesn't?
Quoted 33 lines
---
0 files changedtests/Makefile +6
-3@@ -156,7 +156,7 @@ gcov-files-i386-y += hw/usb/hcd-ehci.c gcov-files-i386-y += hw/usb/hcd-uhci.c gcov-files-i386-y += hw/usb/dev-hid.c gcov-files-i386-y += hw/usb/dev-storage.c -#check-qtest-i386-y += tests/vhost-user-test$(EXESUF) +check-qtest-i386-$(CONFIG_POSIX) += tests/vhost-user-test$(EXESUF) check-qtest-x86_64-y = $(check-qtest-i386-y) gcov-files-i386-y += i386-softmmu/hw/timer/mc146818rtc.c gcov-files-x86_64-y = $(subst i386-softmmu/,x86_64-softmmu/,$(gcov-files-i386-y))@@ -323,11 +323,14 @@ tests/es1370-test$(EXESUF): tests/es1370-test.o tests/intel-hda-test$(EXESUF): tests/intel-hda-test.o tests/ioh3420-test$(EXESUF): tests/ioh3420-test.o tests/usb-hcd-ehci-test$(EXESUF): tests/usb-hcd-ehci-test.o $(libqos-pc-obj-y) -tests/vhost-user-test$(EXESUF): tests/vhost-user-test.o qemu-char.o qemu-timer.o libqemuutil.a libqemustub.a +tests/vhost-user-test$(EXESUF): tests/vhost-user-test.o qemu-char.o qemu-timer.o $(qtest-obj-y) tests/qemu-iotests/socket_scm_helper$(EXESUF): tests/qemu-iotests/socket_scm_helper.o tests/test-qemu-opts$(EXESUF): tests/test-qemu-opts.o libqemuutil.a libqemustub.a -#LIBS+= -lutil + +ifeq ($(CONFIG_POSIX),y) +LIBS+= -lutil +endif # QTest rules
Quoted 8 lines · Michael S. Tsirkin
Quoted 4 lines · Nikolay Nikolaev
Use qtest-obj-y to get the right library order.
CONFIG_POSIXensures mingw compilation won't break.Signed-off-by Nikolay Nikolaev <[email protected]>okay but why does non posix work without -lutil and posix doesn't?
There are 2 things here:
1. vhost-user-test links to qemu-char.o, which uses qemu_openpty_raw from libqemuutil.a.qemu_openpty_raw requires openpty from libutil. We added LIBS=-lutil in tests/Makefile to satisfy this dependency.
2. tests/Makefile is included in the main Makefile, so LIBS is applied to all make targets. Making LIBS depend on CONFIG_POSIX actually switches on/off -lutil globally.
Probably the best solution would be to just stub qemu_openpty_raw an drop -lutil.
regards,
Nikolay Nikolaev
Quoted 49 lines
Quoted 9 lines
---
0 files changedtests/Makefile +0
-0tests/Makefile gcov-files-i386-y += hw/usb/hcd-ehci.c · line 162
Quoted 8 lines
tests/Makefile +1
-1@@ -156,7 +156,7 @@ gcov-files-i386-y += hw/usb/hcd-ehci.c gcov-files-i386-y += hw/usb/hcd-uhci.c gcov-files-i386-y += hw/usb/dev-hid.c gcov-files-i386-y += hw/usb/dev-storage.c -#check-qtest-i386-y += tests/vhost-user-test$(EXESUF) +check-qtest-i386-$(CONFIG_POSIX) += tests/vhost-user-test$(EXESUF) check-qtest-x86_64-y = $(check-qtest-i386-y) gcov-files-i386-y += i386-softmmu/hw/timer/mc146818rtc.c gcov-files-x86_64-y = $(substi386-softmmu/,x86_64-softmmu/,$(gcov-files-i386-y))
tests/Makefile tests/es1370-test$(EXESUF): tests/es1370-test.o · line 325
Quoted 4 lines
tests/Makefile +0
-0@@ -323,11 +323,14 @@ tests/es1370-test$(EXESUF): tests/es1370-test.o tests/intel-hda-test$(EXESUF): tests/intel-hda-test.o tests/ioh3420-test$(EXESUF): tests/ioh3420-test.o tests/usb-hcd-ehci-test$(EXESUF): tests/usb-hcd-ehci-test.o$(libqos-pc-obj-y)
tests/Makefile tests/es1370-test$(EXESUF): tests/es1370-test.o · line 326
Quoted 1 line
tests/Makefile +0
-1-tests/vhost-user-test$(EXESUF): tests/vhost-user-test.o qemu-char.oqemu-timer.o libqemuutil.a libqemustub.a
tests/Makefile tests/es1370-test$(EXESUF): tests/es1370-test.o · line 326
Quoted 1 line
tests/Makefile +1
-0+tests/vhost-user-test$(EXESUF): tests/vhost-user-test.o qemu-char.oqemu-timer.o $(qtest-obj-y)
tests/Makefile tests/es1370-test$(EXESUF): tests/es1370-test.o · line 327
Quoted 1 line
tests/Makefile +0
-0tests/qemu-iotests/socket_scm_helper$(EXESUF):
tests/qemu-iotests/socket_scm_helper.otests/Makefile tests/es1370-test$(EXESUF): tests/es1370-test.o · line 328
Quoted 1 line
tests/Makefile +0
-0tests/test-qemu-opts$(EXESUF): tests/test-qemu-opts.o libqemuutil.alibqemustub.a
tests/Makefile tests/es1370-test$(EXESUF): tests/es1370-test.o · line 336
Quoted 9 lines
tests/Makefile +4
-1-#LIBS+= -lutil + +ifeq ($(CONFIG_POSIX),y) +LIBS+= -lutil +endif # QTest rules--
You received this message because you are subscribed to the Google Groups "Snabb Switch development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To post to this group, send an email to [email protected]. Visit this group at http://groups.google.com/group/snabb-devel.
Quoted 7 lines · Michael S. Tsirkin
Quoted 4 lines · Nikolay Nikolaev
Use qtest-obj-y to get the right library order.
CONFIG_POSIXensures mingw compilation won't break.Signed-off-by Nikolay Nikolaev <[email protected]>okay but why does non posix work without -lutil and posix doesn't?
Ping.
Quoted 33 lines
Quoted 33 lines
---
0 files changedtests/Makefile +6
-3@@ -156,7 +156,7 @@ gcov-files-i386-y += hw/usb/hcd-ehci.c gcov-files-i386-y += hw/usb/hcd-uhci.c gcov-files-i386-y += hw/usb/dev-hid.c gcov-files-i386-y += hw/usb/dev-storage.c -#check-qtest-i386-y += tests/vhost-user-test$(EXESUF) +check-qtest-i386-$(CONFIG_POSIX) += tests/vhost-user-test$(EXESUF) check-qtest-x86_64-y = $(check-qtest-i386-y) gcov-files-i386-y += i386-softmmu/hw/timer/mc146818rtc.c gcov-files-x86_64-y = $(subst i386-softmmu/,x86_64-softmmu/,$(gcov-files-i386-y))@@ -323,11 +323,14 @@ tests/es1370-test$(EXESUF): tests/es1370-test.o tests/intel-hda-test$(EXESUF): tests/intel-hda-test.o tests/ioh3420-test$(EXESUF): tests/ioh3420-test.o tests/usb-hcd-ehci-test$(EXESUF): tests/usb-hcd-ehci-test.o $(libqos-pc-obj-y) -tests/vhost-user-test$(EXESUF): tests/vhost-user-test.o qemu-char.o qemu-timer.o libqemuutil.a libqemustub.a +tests/vhost-user-test$(EXESUF): tests/vhost-user-test.o qemu-char.o qemu-timer.o $(qtest-obj-y) tests/qemu-iotests/socket_scm_helper$(EXESUF): tests/qemu-iotests/socket_scm_helper.o tests/test-qemu-opts$(EXESUF): tests/test-qemu-opts.o libqemuutil.a libqemustub.a -#LIBS+= -lutil + +ifeq ($(CONFIG_POSIX),y) +LIBS+= -lutil +endif # QTest rules