From nobody Mon Feb 9 20:10:52 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 155378968776868.98638303414634; Thu, 28 Mar 2019 09:14:47 -0700 (PDT) Received: from localhost ([127.0.0.1]:38832 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h9Xfq-0002EJ-EK for importer@patchew.org; Thu, 28 Mar 2019 12:14:38 -0400 Received: from eggs.gnu.org ([209.51.188.92]:45838) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h9XaA-0005gK-9e for qemu-devel@nongnu.org; Thu, 28 Mar 2019 12:08:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h9Xa7-0005BG-OX for qemu-devel@nongnu.org; Thu, 28 Mar 2019 12:08:46 -0400 Received: from mx1.redhat.com ([209.132.183.28]:36762) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1h9Xa7-00058B-Bp; Thu, 28 Mar 2019 12:08:43 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A3B203001C89; Thu, 28 Mar 2019 16:01:57 +0000 (UTC) Received: from thinkpad.redhat.com (ovpn-116-220.ams2.redhat.com [10.36.116.220]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9EBE58389D; Thu, 28 Mar 2019 16:01:43 +0000 (UTC) From: Laurent Vivier To: qemu-devel@nongnu.org Date: Thu, 28 Mar 2019 17:01:01 +0100 Message-Id: <20190328160101.3854-6-lvivier@redhat.com> In-Reply-To: <20190328160101.3854-1-lvivier@redhat.com> References: <20190328160101.3854-1-lvivier@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.43]); Thu, 28 Mar 2019 16:02:00 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH v2 5/5] build: don't build hardware objects with linux-user X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Laurent Vivier , Thomas Huth , David Hildenbrand , Cornelia Huck , Laurent Vivier , qemu-s390x@nongnu.org, Gerd Hoffmann , Stefan Hajnoczi , Paolo Bonzini , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Richard Henderson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Some objects are only needed for system emulation and tools. We can ignore them for the user mode case Update tests to run accordingly: conditionally build some tests on CONFIG_BLOCK. Some tests use components that are only built when softmmu or block tools are enabled, not for linux-user. So, if these components are not available, disable the tests. Signed-off-by: Laurent Vivier --- Makefile | 4 ++ Makefile.objs | 16 +++++--- tests/Makefile.include | 90 +++++++++++++++++++++--------------------- 3 files changed, 59 insertions(+), 51 deletions(-) diff --git a/Makefile b/Makefile index 2b169d1d2ca5..ec1a11094989 100644 --- a/Makefile +++ b/Makefile @@ -87,6 +87,10 @@ endif =20 include $(SRC_PATH)/rules.mak =20 +# notempy and lor are defined in rules.mak +CONFIG_TOOLS :=3D $(call notempty,$(TOOLS)) +CONFIG_BLOCK :=3D $(call lor,$(CONFIG_SOFTMMU),$(CONFIG_TOOLS)) + # Create QEMU_PKGVERSION and FULL_VERSION strings # If PKGVERSION is set, use that; otherwise get version and -dirty status = from git QEMU_PKGVERSION :=3D $(if $(PKGVERSION),$(PKGVERSION),$(shell \ diff --git a/Makefile.objs b/Makefile.objs index 43c9e4503297..0624aadb6164 100644 --- a/Makefile.objs +++ b/Makefile.objs @@ -127,9 +127,18 @@ rdmacm-mux-obj-y =3D contrib/rdmacm-mux/ trace-events-subdirs =3D trace-events-subdirs +=3D accel/kvm trace-events-subdirs +=3D accel/tcg +trace-events-subdirs +=3D crypto +ifeq ($(CONFIG_USER_ONLY),y) +trace-events-subdirs +=3D linux-user +endif +ifeq ($(CONFIG_BLOCK),y) trace-events-subdirs +=3D authz trace-events-subdirs +=3D block -trace-events-subdirs +=3D crypto +trace-events-subdirs +=3D io +trace-events-subdirs +=3D nbd +trace-events-subdirs +=3D scsi +trace-events-subdirs +=3D hw/display # needed by qemu-edid +endif ifeq ($(CONFIG_SOFTMMU),y) trace-events-subdirs +=3D chardev trace-events-subdirs +=3D audio @@ -177,13 +186,8 @@ trace-events-subdirs +=3D migration trace-events-subdirs +=3D net trace-events-subdirs +=3D ui endif -trace-events-subdirs +=3D hw/display -trace-events-subdirs +=3D io -trace-events-subdirs +=3D linux-user -trace-events-subdirs +=3D nbd trace-events-subdirs +=3D qapi trace-events-subdirs +=3D qom -trace-events-subdirs +=3D scsi trace-events-subdirs +=3D target/arm trace-events-subdirs +=3D target/hppa trace-events-subdirs +=3D target/i386 diff --git a/tests/Makefile.include b/tests/Makefile.include index dd83435d14be..0168655404fe 100644 --- a/tests/Makefile.include +++ b/tests/Makefile.include @@ -45,7 +45,7 @@ SYSEMU_TARGET_LIST :=3D $(subst -softmmu.mak,,$(notdir \ =20 check-unit-y +=3D tests/check-qdict$(EXESUF) check-unit-y +=3D tests/check-block-qdict$(EXESUF) -check-unit-y +=3D tests/test-char$(EXESUF) +check-unit-$(CONFIG_SOFTMMU) +=3D tests/test-char$(EXESUF) check-unit-y +=3D tests/check-qnum$(EXESUF) check-unit-y +=3D tests/check-qstring$(EXESUF) check-unit-y +=3D tests/check-qlist$(EXESUF) @@ -61,21 +61,21 @@ check-unit-y +=3D tests/test-string-input-visitor$(EXES= UF) check-unit-y +=3D tests/test-string-output-visitor$(EXESUF) check-unit-y +=3D tests/test-qmp-event$(EXESUF) check-unit-y +=3D tests/test-opts-visitor$(EXESUF) -check-unit-y +=3D tests/test-coroutine$(EXESUF) +check-unit-$(CONFIG_BLOCK) +=3D tests/test-coroutine$(EXESUF) check-unit-y +=3D tests/test-visitor-serialization$(EXESUF) check-unit-y +=3D tests/test-iov$(EXESUF) -check-unit-y +=3D tests/test-aio$(EXESUF) -check-unit-y +=3D tests/test-aio-multithread$(EXESUF) -check-unit-y +=3D tests/test-throttle$(EXESUF) -check-unit-y +=3D tests/test-thread-pool$(EXESUF) -check-unit-y +=3D tests/test-hbitmap$(EXESUF) -check-unit-y +=3D tests/test-bdrv-drain$(EXESUF) -check-unit-y +=3D tests/test-bdrv-graph-mod$(EXESUF) -check-unit-y +=3D tests/test-blockjob$(EXESUF) -check-unit-y +=3D tests/test-blockjob-txn$(EXESUF) -check-unit-y +=3D tests/test-block-backend$(EXESUF) -check-unit-y +=3D tests/test-block-iothread$(EXESUF) -check-unit-y +=3D tests/test-image-locking$(EXESUF) +check-unit-$(CONFIG_BLOCK) +=3D tests/test-aio$(EXESUF) +check-unit-$(CONFIG_BLOCK) +=3D tests/test-aio-multithread$(EXESUF) +check-unit-$(CONFIG_BLOCK) +=3D tests/test-throttle$(EXESUF) +check-unit-$(CONFIG_BLOCK) +=3D tests/test-thread-pool$(EXESUF) +check-unit-$(CONFIG_BLOCK) +=3D tests/test-hbitmap$(EXESUF) +check-unit-$(CONFIG_BLOCK) +=3D tests/test-bdrv-drain$(EXESUF) +check-unit-$(CONFIG_BLOCK) +=3D tests/test-bdrv-graph-mod$(EXESUF) +check-unit-$(CONFIG_BLOCK) +=3D tests/test-blockjob$(EXESUF) +check-unit-$(CONFIG_BLOCK) +=3D tests/test-blockjob-txn$(EXESUF) +check-unit-$(CONFIG_BLOCK) +=3D tests/test-block-backend$(EXESUF) +check-unit-$(CONFIG_BLOCK) +=3D tests/test-block-iothread$(EXESUF) +check-unit-$(CONFIG_BLOCK) +=3D tests/test-image-locking$(EXESUF) check-unit-y +=3D tests/test-x86-cpuid$(EXESUF) # all code tested by test-x86-cpuid is inside topology.h ifeq ($(CONFIG_SOFTMMU),y) @@ -101,40 +101,40 @@ check-unit-y +=3D tests/check-qom-interface$(EXESUF) check-unit-y +=3D tests/check-qom-proplist$(EXESUF) check-unit-y +=3D tests/test-qemu-opts$(EXESUF) check-unit-y +=3D tests/test-keyval$(EXESUF) -check-unit-y +=3D tests/test-write-threshold$(EXESUF) -check-unit-y +=3D tests/test-crypto-hash$(EXESUF) -check-speed-y +=3D tests/benchmark-crypto-hash$(EXESUF) -check-unit-y +=3D tests/test-crypto-hmac$(EXESUF) -check-speed-y +=3D tests/benchmark-crypto-hmac$(EXESUF) -check-unit-y +=3D tests/test-crypto-cipher$(EXESUF) -check-speed-y +=3D tests/benchmark-crypto-cipher$(EXESUF) -check-unit-y +=3D tests/test-crypto-secret$(EXESUF) -check-unit-$(CONFIG_GNUTLS) +=3D tests/test-crypto-tlscredsx509$(EXESUF) -check-unit-$(CONFIG_GNUTLS) +=3D tests/test-crypto-tlssession$(EXESUF) +check-unit-$(CONFIG_BLOCK) +=3D tests/test-write-threshold$(EXESUF) +check-unit-$(CONFIG_BLOCK) +=3D tests/test-crypto-hash$(EXESUF) +check-speed-$(CONFIG_BLOCK) +=3D tests/benchmark-crypto-hash$(EXESUF) +check-unit-$(CONFIG_BLOCK) +=3D tests/test-crypto-hmac$(EXESUF) +check-speed-$(CONFIG_BLOCK) +=3D tests/benchmark-crypto-hmac$(EXESUF) +check-unit-$(CONFIG_BLOCK) +=3D tests/test-crypto-cipher$(EXESUF) +check-speed-$(CONFIG_BLOCK) +=3D tests/benchmark-crypto-cipher$(EXESUF) +check-unit-$(CONFIG_BLOCK) +=3D tests/test-crypto-secret$(EXESUF) +check-unit-$(call land,$(CONFIG_BLOCK),$(CONFIG_GNUTLS)) +=3D tests/test-c= rypto-tlscredsx509$(EXESUF) +check-unit-$(call land,$(CONFIG_BLOCK),$(CONFIG_GNUTLS)) +=3D tests/test-c= rypto-tlssession$(EXESUF) ifneq (,$(findstring qemu-ga,$(TOOLS))) check-unit-$(call land,$(CONFIG_LINUX),$(CONFIG_VIRTIO_SERIAL)) +=3D tests= /test-qga$(EXESUF) endif check-unit-y +=3D tests/test-timed-average$(EXESUF) check-unit-$(CONFIG_INOTIFY1) +=3D tests/test-util-filemonitor$(EXESUF) check-unit-y +=3D tests/test-util-sockets$(EXESUF) -check-unit-y +=3D tests/test-authz-simple$(EXESUF) -check-unit-y +=3D tests/test-authz-list$(EXESUF) -check-unit-y +=3D tests/test-authz-listfile$(EXESUF) -check-unit-$(CONFIG_AUTH_PAM) +=3D tests/test-authz-pam$(EXESUF) -check-unit-y +=3D tests/test-io-task$(EXESUF) -check-unit-y +=3D tests/test-io-channel-socket$(EXESUF) -check-unit-y +=3D tests/test-io-channel-file$(EXESUF) -check-unit-$(CONFIG_GNUTLS) +=3D tests/test-io-channel-tls$(EXESUF) -check-unit-y +=3D tests/test-io-channel-command$(EXESUF) -check-unit-y +=3D tests/test-io-channel-buffer$(EXESUF) +check-unit-$(CONFIG_BLOCK) +=3D tests/test-authz-simple$(EXESUF) +check-unit-$(CONFIG_BLOCK) +=3D tests/test-authz-list$(EXESUF) +check-unit-$(CONFIG_BLOCK) +=3D tests/test-authz-listfile$(EXESUF) +check-unit-$(call land,$(CONFIG_BLOCK),$(CONFIG_AUTH_PAM)) +=3D tests/test= -authz-pam$(EXESUF) +check-unit-$(CONFIG_BLOCK) +=3D tests/test-io-task$(EXESUF) +check-unit-$(CONFIG_BLOCK) +=3D tests/test-io-channel-socket$(EXESUF) +check-unit-$(CONFIG_BLOCK) +=3D tests/test-io-channel-file$(EXESUF) +check-unit-$(call land,$(CONFIG_BLOCK),$(CONFIG_GNUTLS)) +=3D tests/test-i= o-channel-tls$(EXESUF) +check-unit-$(CONFIG_BLOCK) +=3D tests/test-io-channel-command$(EXESUF) +check-unit-$(CONFIG_BLOCK) +=3D tests/test-io-channel-buffer$(EXESUF) check-unit-y +=3D tests/test-base64$(EXESUF) -check-unit-$(if $(CONFIG_NETTLE),y,$(CONFIG_GCRYPT)) +=3D tests/test-crypt= o-pbkdf$(EXESUF) -check-unit-y +=3D tests/test-crypto-ivgen$(EXESUF) -check-unit-y +=3D tests/test-crypto-afsplit$(EXESUF) -check-unit-y +=3D tests/test-crypto-xts$(EXESUF) -check-unit-y +=3D tests/test-crypto-block$(EXESUF) +check-unit-$(call land,$(CONFIG_BLOCK),$(if $(CONFIG_NETTLE),y,$(CONFIG_GC= RYPT))) +=3D tests/test-crypto-pbkdf$(EXESUF) +check-unit-$(CONFIG_BLOCK) +=3D tests/test-crypto-ivgen$(EXESUF) +check-unit-$(CONFIG_BLOCK) +=3D tests/test-crypto-afsplit$(EXESUF) +check-unit-$(CONFIG_BLOCK) +=3D tests/test-crypto-xts$(EXESUF) +check-unit-$(CONFIG_BLOCK) +=3D tests/test-crypto-block$(EXESUF) check-unit-y +=3D tests/test-logging$(EXESUF) -check-unit-$(CONFIG_REPLICATION) +=3D tests/test-replication$(EXESUF) +check-unit-$(call land,$(CONFIG_BLOCK),$(CONFIG_REPLICATION)) +=3D tests/t= est-replication$(EXESUF) check-unit-y +=3D tests/test-bufferiszero$(EXESUF) check-unit-y +=3D tests/test-uuid$(EXESUF) check-unit-y +=3D tests/ptimer-test$(EXESUF) @@ -517,11 +517,11 @@ test-qapi-obj-y =3D tests/test-qapi-types.o \ tests/test-qapi-visit-sub-sub-module.o \ tests/test-qapi-introspect.o \ $(test-qom-obj-y) -benchmark-crypto-obj-y =3D $(authz-obj-y) $(crypto-obj-y) $(test-qom-obj-y) -test-crypto-obj-y =3D $(authz-obj-y) $(crypto-obj-y) $(test-qom-obj-y) -test-io-obj-y =3D $(io-obj-y) $(test-crypto-obj-y) -test-authz-obj-y =3D $(test-qom-obj-y) $(authz-obj-y) -test-block-obj-y =3D $(block-obj-y) $(test-io-obj-y) tests/iothread.o +benchmark-crypto-obj-$(CONFIG_BLOCK) =3D $(authz-obj-y) $(crypto-obj-y) $(= test-qom-obj-y) +test-crypto-obj-$(CONFIG_BLOCK) =3D $(authz-obj-y) $(crypto-obj-y) $(test-= qom-obj-y) +test-io-obj-$(CONFIG_BLOCK) =3D $(io-obj-y) $(test-crypto-obj-y) +test-authz-obj-$(CONFIG_BLOCK) =3D $(test-qom-obj-y) $(authz-obj-y) +test-block-obj-$(CONFIG_BLOCK) =3D $(block-obj-y) $(test-io-obj-y) tests/i= othread.o =20 tests/check-qnum$(EXESUF): tests/check-qnum.o $(test-util-obj-y) tests/check-qstring$(EXESUF): tests/check-qstring.o $(test-util-obj-y) --=20 2.20.1