qemu with hax to log dma reads & writes jcs.org/2018/11/12/vfio

tests/Makefile: Restrict some softmmu-only tests

In the next commit we are going to remove some objects from the
util-obj-y variable (objects which are not used by user-mode,
when configured with --disable-system).
Then some system-mode tests are going to fail, due to the missing
objects:

$ make check-unit -k
LINK tests/test-iov
/usr/bin/ld: tests/test-iov.o: in function `iov_from_buf':
include/qemu/iov.h:49: undefined reference to `iov_from_buf_full'
make: *** [rules.mak:124: tests/test-iov] Error 1
LINK tests/test-timed-average
/usr/bin/ld: tests/test-timed-average.o: in function `account':
tests/test-timed-average.c:27: undefined reference to `timed_average_account'
make: *** [rules.mak:124: tests/test-timed-average] Error 1
LINK tests/test-util-filemonitor
/usr/bin/ld: tests/test-util-filemonitor.o: in function `qemu_file_monitor_test_event_loop':
tests/test-util-filemonitor.c:83: undefined reference to `main_loop_wait'
make: *** [rules.mak:124: tests/test-util-filemonitor] Error 1
LINK tests/test-util-sockets
/usr/bin/ld: tests/test-util-sockets.o: in function `test_socket_fd_pass_name_good':
tests/test-util-sockets.c:91: undefined reference to `socket_connect'
make: *** [rules.mak:124: tests/test-util-sockets] Error 1
LINK tests/test-base64
/usr/bin/ld: tests/test-base64.o: in function `test_base64_good':
tests/test-base64.c:35: undefined reference to `qbase64_decode'
collect2: error: ld returned 1 exit status
make: *** [rules.mak:124: tests/test-base64] Error 1
LINK tests/test-bufferiszero
/usr/bin/ld: tests/test-bufferiszero.o: in function `test_1':
tests/test-bufferiszero.c:31: undefined reference to `buffer_is_zero'
make: *** [rules.mak:124: tests/test-bufferiszero] Error 1
make: Target 'check-unit' not remade because of errors.

Instead, restrict these tests to system-mode, by using the
$(CONFIG_SOFTMMU) variable.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Tested-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Tested-by: Laurent Vivier <laurent@vivier.eu>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20200522172510.25784-5-philmd@redhat.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>

authored by

Philippe Mathieu-Daudé and committed by
Laurent Vivier
37914f60 ca6db469

+8 -8
+8 -8
tests/Makefile.include
··· 66 66 check-unit-y += tests/test-qobject-output-visitor$(EXESUF) 67 67 check-unit-y += tests/test-clone-visitor$(EXESUF) 68 68 check-unit-y += tests/test-qobject-input-visitor$(EXESUF) 69 - check-unit-y += tests/test-qmp-cmds$(EXESUF) 69 + check-unit-$(CONFIG_SOFTMMU) += tests/test-qmp-cmds$(EXESUF) 70 70 check-unit-y += tests/test-string-input-visitor$(EXESUF) 71 71 check-unit-y += tests/test-string-output-visitor$(EXESUF) 72 72 check-unit-y += tests/test-qmp-event$(EXESUF) 73 73 check-unit-y += tests/test-opts-visitor$(EXESUF) 74 74 check-unit-$(CONFIG_BLOCK) += tests/test-coroutine$(EXESUF) 75 75 check-unit-y += tests/test-visitor-serialization$(EXESUF) 76 - check-unit-y += tests/test-iov$(EXESUF) 76 + check-unit-$(CONFIG_SOFTMMU) += tests/test-iov$(EXESUF) 77 77 check-unit-y += tests/test-bitmap$(EXESUF) 78 78 check-unit-$(CONFIG_BLOCK) += tests/test-aio$(EXESUF) 79 79 check-unit-$(CONFIG_BLOCK) += tests/test-aio-multithread$(EXESUF) ··· 108 108 check-unit-y += tests/test-qht-par$(EXESUF) 109 109 check-unit-y += tests/test-bitops$(EXESUF) 110 110 check-unit-y += tests/test-bitcnt$(EXESUF) 111 - check-unit-y += tests/test-qdev-global-props$(EXESUF) 111 + check-unit-$(CONFIG_SOFTMMU) += tests/test-qdev-global-props$(EXESUF) 112 112 check-unit-y += tests/check-qom-interface$(EXESUF) 113 113 check-unit-y += tests/check-qom-proplist$(EXESUF) 114 114 check-unit-y += tests/test-qemu-opts$(EXESUF) ··· 126 126 ifneq (,$(findstring qemu-ga,$(TOOLS))) 127 127 check-unit-$(call land,$(CONFIG_LINUX),$(CONFIG_VIRTIO_SERIAL)) += tests/test-qga$(EXESUF) 128 128 endif 129 - check-unit-y += tests/test-timed-average$(EXESUF) 130 - check-unit-$(CONFIG_INOTIFY1) += tests/test-util-filemonitor$(EXESUF) 131 - check-unit-y += tests/test-util-sockets$(EXESUF) 129 + check-unit-$(CONFIG_SOFTMMU) += tests/test-timed-average$(EXESUF) 130 + check-unit-$(call land,$(CONFIG_SOFTMMU),$(CONFIG_INOTIFY1)) += tests/test-util-filemonitor$(EXESUF) 131 + check-unit-$(CONFIG_SOFTMMU) += tests/test-util-sockets$(EXESUF) 132 132 check-unit-$(CONFIG_BLOCK) += tests/test-authz-simple$(EXESUF) 133 133 check-unit-$(CONFIG_BLOCK) += tests/test-authz-list$(EXESUF) 134 134 check-unit-$(CONFIG_BLOCK) += tests/test-authz-listfile$(EXESUF) ··· 139 139 check-unit-$(call land,$(CONFIG_BLOCK),$(CONFIG_GNUTLS)) += tests/test-io-channel-tls$(EXESUF) 140 140 check-unit-$(CONFIG_BLOCK) += tests/test-io-channel-command$(EXESUF) 141 141 check-unit-$(CONFIG_BLOCK) += tests/test-io-channel-buffer$(EXESUF) 142 - check-unit-y += tests/test-base64$(EXESUF) 142 + check-unit-$(CONFIG_SOFTMMU) += tests/test-base64$(EXESUF) 143 143 check-unit-$(call land,$(CONFIG_BLOCK),$(if $(CONFIG_NETTLE),y,$(CONFIG_GCRYPT))) += tests/test-crypto-pbkdf$(EXESUF) 144 144 check-unit-$(CONFIG_BLOCK) += tests/test-crypto-ivgen$(EXESUF) 145 145 check-unit-$(CONFIG_BLOCK) += tests/test-crypto-afsplit$(EXESUF) ··· 147 147 check-unit-$(CONFIG_BLOCK) += tests/test-crypto-block$(EXESUF) 148 148 check-unit-y += tests/test-logging$(EXESUF) 149 149 check-unit-$(call land,$(CONFIG_BLOCK),$(CONFIG_REPLICATION)) += tests/test-replication$(EXESUF) 150 - check-unit-y += tests/test-bufferiszero$(EXESUF) 150 + check-unit-$(CONFIG_SOFTMMU) += tests/test-bufferiszero$(EXESUF) 151 151 check-unit-y += tests/test-uuid$(EXESUF) 152 152 check-unit-y += tests/ptimer-test$(EXESUF) 153 153 check-unit-y += tests/test-qapi-util$(EXESUF)