From nobody Thu May 2 13:05:37 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.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 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1504862367181880.7349038482153; Fri, 8 Sep 2017 02:19:27 -0700 (PDT) Received: from localhost ([::1]:44042 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dqFRd-0007I6-14 for importer@patchew.org; Fri, 08 Sep 2017 05:19:25 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52471) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dqFPc-0005yW-1H for qemu-devel@nongnu.org; Fri, 08 Sep 2017 05:17:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dqFPX-0000NQ-4z for qemu-devel@nongnu.org; Fri, 08 Sep 2017 05:17:20 -0400 Received: from mx1.redhat.com ([209.132.183.28]:57032) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dqFPW-0000Mm-Sy for qemu-devel@nongnu.org; Fri, 08 Sep 2017 05:17:15 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 01CEA81DE7; Fri, 8 Sep 2017 09:17:14 +0000 (UTC) Received: from lemon.redhat.com (ovpn-12-98.pek2.redhat.com [10.72.12.98]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1798460241; Fri, 8 Sep 2017 09:17:09 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 01CEA81DE7 Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=famz@redhat.com From: Fam Zheng To: qemu-devel@nongnu.org Date: Fri, 8 Sep 2017 17:16:54 +0800 Message-Id: <20170908091700.14867-2-famz@redhat.com> In-Reply-To: <20170908091700.14867-1-famz@redhat.com> References: <20170908091700.14867-1-famz@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Fri, 08 Sep 2017 09:17:14 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH RFC 1/7] Makefile: Rename TARGET_DIRS to TARGET_LIST 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: peter.maydell@linaro.org, thuth@redhat.com, Fam Zheng , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , programmingkidx@gmail.com, crosa@redhat.com, pbonzini@redhat.com, =?UTF-8?q?Alex=20Benn=C3=A9e?= , rth@twiddle.net Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" To be more accurate on its purpose and make code that looks for a certain target out of this variable more readable. Signed-off-by: Fam Zheng --- Makefile | 20 ++++++++++---------- configure | 2 +- scripts/create_config | 2 +- tests/Makefile.include | 2 +- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/Makefile b/Makefile index 337a1f6f9b..c1e35b1fd0 100644 --- a/Makefile +++ b/Makefile @@ -24,8 +24,8 @@ seems to have been used for an in-tree build. You can fix= this by running \ endif endif =20 -CONFIG_SOFTMMU :=3D $(if $(filter %-softmmu,$(TARGET_DIRS)),y) -CONFIG_USER_ONLY :=3D $(if $(filter %-user,$(TARGET_DIRS)),y) +CONFIG_SOFTMMU :=3D $(if $(filter %-softmmu,$(TARGET_LIST)),y) +CONFIG_USER_ONLY :=3D $(if $(filter %-user,$(TARGET_LIST)),y) CONFIG_XEN :=3D $(CONFIG_XEN_BACKEND) CONFIG_ALL=3Dy -include config-all-devices.mak @@ -217,8 +217,8 @@ DOCS=3D endif =20 SUBDIR_MAKEFLAGS=3D$(if $(V),,--no-print-directory) BUILD_DIR=3D$(BUILD_DI= R) -SUBDIR_DEVICES_MAK=3D$(patsubst %, %/config-devices.mak, $(TARGET_DIRS)) -SUBDIR_DEVICES_MAK_DEP=3D$(patsubst %, %-config-devices.mak.d, $(TARGET_DI= RS)) +SUBDIR_DEVICES_MAK=3D$(patsubst %, %/config-devices.mak, $(TARGET_LIST)) +SUBDIR_DEVICES_MAK_DEP=3D$(patsubst %, %-config-devices.mak.d, $(TARGET_LI= ST)) =20 ifeq ($(SUBDIR_DEVICES_MAK),) config-all-devices.mak: @@ -314,7 +314,7 @@ config-host.h-timestamp: config-host.mak qemu-options.def: $(SRC_PATH)/qemu-options.hx $(SRC_PATH)/scripts/hxtool $(call quiet-command,sh $(SRC_PATH)/scripts/hxtool -h < $< > $@,"GEN","$@= ") =20 -SUBDIR_RULES=3D$(patsubst %,subdir-%, $(TARGET_DIRS)) +SUBDIR_RULES=3D$(patsubst %,subdir-%, $(TARGET_LIST)) SOFTMMU_SUBDIR_RULES=3D$(filter %-softmmu,$(SUBDIR_RULES)) =20 $(SOFTMMU_SUBDIR_RULES): $(block-obj-y) @@ -352,7 +352,7 @@ ROMSUBDIR_RULES=3D$(patsubst %,romsubdir-%, $(ROMS)) romsubdir-%: $(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C pc-bios/$* V=3D"$(V)"= TARGET_DIR=3D"$*/" CFLAGS=3D"$(filter -O% -g%,$(CFLAGS))",) =20 -ALL_SUBDIRS=3D$(TARGET_DIRS) $(patsubst %,pc-bios/%, $(ROMS)) +ALL_SUBDIRS=3D$(TARGET_LIST) $(patsubst %,pc-bios/%, $(ROMS)) =20 recurse-all: $(SUBDIR_RULES) $(ROMSUBDIR_RULES) =20 @@ -537,7 +537,7 @@ distclean: clean rm -f docs/interop/qemu-qmp-ref.txt docs/interop/qemu-ga-ref.txt rm -f docs/interop/qemu-qmp-ref.pdf docs/interop/qemu-ga-ref.pdf rm -f docs/interop/qemu-qmp-ref.html docs/interop/qemu-ga-ref.html - for d in $(TARGET_DIRS); do \ + for d in $(TARGET_LIST); do \ rm -rf $$d || exit 1 ; \ done rm -Rf .sdk @@ -638,7 +638,7 @@ endif $(INSTALL_DATA) $(SRC_PATH)/pc-bios/keymaps/$$x "$(DESTDIR)$(qemu_datadi= r)/keymaps"; \ done $(INSTALL_DATA) $(BUILD_DIR)/trace-events-all "$(DESTDIR)$(qemu_datadir)/= trace-events-all" - for d in $(TARGET_DIRS); do \ + for d in $(TARGET_LIST); do \ $(MAKE) $(SUBDIR_MAKEFLAGS) TARGET_DIR=3D$$d/ -C $$d $@ || exit 1 ; \ done =20 @@ -832,9 +832,9 @@ help: @echo ' ctags/TAGS - Generate tags file for editors' @echo ' cscope - Generate cscope index' @echo '' - @$(if $(TARGET_DIRS), \ + @$(if $(TARGET_LIST), \ echo 'Architecture specific targets:'; \ - $(foreach t, $(TARGET_DIRS), \ + $(foreach t, $(TARGET_LIST), \ printf " %-30s - Build for %s\\n" $(patsubst %,subdir-%,$(t)) $(t);) \ echo '') @echo 'Cleaning targets:' diff --git a/configure b/configure index a541aadebc..36a2fa1f23 100755 --- a/configure +++ b/configure @@ -5587,7 +5587,7 @@ qemu_version=3D$(head $source_path/VERSION) echo "VERSION=3D$qemu_version" >>$config_host_mak echo "PKGVERSION=3D$pkgversion" >>$config_host_mak echo "SRC_PATH=3D$source_path" >> $config_host_mak -echo "TARGET_DIRS=3D$target_list" >> $config_host_mak +echo "TARGET_LIST=3D$target_list" >> $config_host_mak if [ "$docs" =3D "yes" ] ; then echo "BUILD_DOCS=3Dyes" >> $config_host_mak fi diff --git a/scripts/create_config b/scripts/create_config index e6929dd61e..3612f8154f 100755 --- a/scripts/create_config +++ b/scripts/create_config @@ -107,7 +107,7 @@ case $line in target_name=3D${line#*=3D} echo "#define TARGET_NAME \"$target_name\"" ;; - TARGET_DIRS=3D*) + TARGET_LIST=3D*) # do nothing ;; TARGET_*=3Dy) # configuration diff --git a/tests/Makefile.include b/tests/Makefile.include index fae5715e9c..debaf845db 100644 --- a/tests/Makefile.include +++ b/tests/Makefile.include @@ -820,7 +820,7 @@ endif =20 # QTest rules =20 -TARGETS=3D$(patsubst %-softmmu,%, $(filter %-softmmu,$(TARGET_DIRS))) +TARGETS=3D$(patsubst %-softmmu,%, $(filter %-softmmu,$(TARGET_LIST))) ifeq ($(CONFIG_POSIX),y) QTEST_TARGETS =3D $(TARGETS) check-qtest-y=3D$(foreach TARGET,$(TARGETS), $(check-qtest-$(TARGET)-y)) --=20 2.13.5 From nobody Thu May 2 13:05:37 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.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 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1504862536856870.8770547910807; Fri, 8 Sep 2017 02:22:16 -0700 (PDT) Received: from localhost ([::1]:44056 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dqFUN-0001En-Qo for importer@patchew.org; Fri, 08 Sep 2017 05:22:15 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52493) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dqFPg-00062S-5S for qemu-devel@nongnu.org; Fri, 08 Sep 2017 05:17:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dqFPb-0000Ro-DB for qemu-devel@nongnu.org; Fri, 08 Sep 2017 05:17:24 -0400 Received: from mx1.redhat.com ([209.132.183.28]:57746) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dqFPb-0000Qm-7i for qemu-devel@nongnu.org; Fri, 08 Sep 2017 05:17:19 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 4C5EF356D9; Fri, 8 Sep 2017 09:17:18 +0000 (UTC) Received: from lemon.redhat.com (ovpn-12-98.pek2.redhat.com [10.72.12.98]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8FF5560241; Fri, 8 Sep 2017 09:17:14 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 4C5EF356D9 Authentication-Results: ext-mx06.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx06.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=famz@redhat.com From: Fam Zheng To: qemu-devel@nongnu.org Date: Fri, 8 Sep 2017 17:16:55 +0800 Message-Id: <20170908091700.14867-3-famz@redhat.com> In-Reply-To: <20170908091700.14867-1-famz@redhat.com> References: <20170908091700.14867-1-famz@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Fri, 08 Sep 2017 09:17:18 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH RFC 2/7] docker: Add "cc" subcommand 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: peter.maydell@linaro.org, thuth@redhat.com, Fam Zheng , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , programmingkidx@gmail.com, crosa@redhat.com, pbonzini@redhat.com, =?UTF-8?q?Alex=20Benn=C3=A9e?= , rth@twiddle.net Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Fam Zheng --- tests/docker/docker.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/tests/docker/docker.py b/tests/docker/docker.py index 81c87ee329..419ebe665f 100755 --- a/tests/docker/docker.py +++ b/tests/docker/docker.py @@ -367,6 +367,29 @@ class ImagesCommand(SubCommand): def run(self, args, argv): return Docker().command("images", argv, args.quiet) =20 +class CcCommand(SubCommand): + """Compile sources with cc in images""" + name =3D "cc" + + def args(self, parser): + parser.add_argument("--image", "-i", required=3DTrue, + help=3D"The docker image in which to run cc") + parser.add_argument("--source-path", "-s", nargs=3D"*", dest=3D"pa= ths", + help=3D"""Extra paths to (ro) mount into conta= iner for + reading sources""") + + def run(self, args, argv): + if argv and argv[0] =3D=3D "--": + argv =3D argv[1:] + cwd =3D os.getcwd() + cmd =3D ["--rm", "-w", cwd, + "-v", "%s:%s:rw" % (cwd, cwd)] + for p in args.paths: + cmd +=3D ["-v", "%s:%s:ro,z" % (p, p)] + cmd +=3D [args.image, "cc"] + cmd +=3D argv + return Docker().command("run", cmd, True) + def main(): parser =3D argparse.ArgumentParser(description=3D"A Docker helper", usage=3D"%s ..." % os.path.basename(sys.argv[0])) --=20 2.13.5 From nobody Thu May 2 13:05:37 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.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 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1504862527355994.3331916468652; Fri, 8 Sep 2017 02:22:07 -0700 (PDT) Received: from localhost ([::1]:44055 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dqFUE-00017e-51 for importer@patchew.org; Fri, 08 Sep 2017 05:22:06 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52537) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dqFPl-00065g-FK for qemu-devel@nongnu.org; Fri, 08 Sep 2017 05:17:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dqFPg-0000Ww-Qd for qemu-devel@nongnu.org; Fri, 08 Sep 2017 05:17:29 -0400 Received: from mx1.redhat.com ([209.132.183.28]:34072) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dqFPg-0000WD-K7 for qemu-devel@nongnu.org; Fri, 08 Sep 2017 05:17:24 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B23BCC04B944; Fri, 8 Sep 2017 09:17:23 +0000 (UTC) Received: from lemon.redhat.com (ovpn-12-98.pek2.redhat.com [10.72.12.98]) by smtp.corp.redhat.com (Postfix) with ESMTP id DEA5860241; Fri, 8 Sep 2017 09:17:18 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com B23BCC04B944 Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=famz@redhat.com From: Fam Zheng To: qemu-devel@nongnu.org Date: Fri, 8 Sep 2017 17:16:56 +0800 Message-Id: <20170908091700.14867-4-famz@redhat.com> In-Reply-To: <20170908091700.14867-1-famz@redhat.com> References: <20170908091700.14867-1-famz@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Fri, 08 Sep 2017 09:17:23 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH RFC 3/7] docker: Add fedora-i386-cross image 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: peter.maydell@linaro.org, thuth@redhat.com, Fam Zheng , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , programmingkidx@gmail.com, crosa@redhat.com, pbonzini@redhat.com, =?UTF-8?q?Alex=20Benn=C3=A9e?= , rth@twiddle.net Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" It has some basic *-devel.i686 packages to be used with "gcc -m32" as a 32 bit cross build environment. Signed-off-by: Fam Zheng --- tests/docker/dockerfiles/fedora-i386-cross.docker | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 tests/docker/dockerfiles/fedora-i386-cross.docker diff --git a/tests/docker/dockerfiles/fedora-i386-cross.docker b/tests/dock= er/dockerfiles/fedora-i386-cross.docker new file mode 100644 index 0000000000..239fba5fa6 --- /dev/null +++ b/tests/docker/dockerfiles/fedora-i386-cross.docker @@ -0,0 +1,13 @@ +FROM fedora:latest +ENV PACKAGES \ + gcc \ + glibc-devel.i686 \ + glib2-devel.i686 \ + zlib-devel.i686 \ + glib2-devel.i686 \ + nettle-devel.i686 \ + pixman-devel.i686 \ + gnutls-devel.i686 + +RUN dnf install -y $PACKAGES +RUN rpm -q $PACKAGES | sort > /packages.txt --=20 2.13.5 From nobody Thu May 2 13:05:37 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.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 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1504862411128214.57354467381504; Fri, 8 Sep 2017 02:20:11 -0700 (PDT) Received: from localhost ([::1]:44044 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dqFSL-0007tE-Sx for importer@patchew.org; Fri, 08 Sep 2017 05:20:09 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52601) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dqFPt-0006BA-1X for qemu-devel@nongnu.org; Fri, 08 Sep 2017 05:17:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dqFPn-0000e9-3J for qemu-devel@nongnu.org; Fri, 08 Sep 2017 05:17:37 -0400 Received: from mx1.redhat.com ([209.132.183.28]:55242) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dqFPm-0000dL-TZ for qemu-devel@nongnu.org; Fri, 08 Sep 2017 05:17:31 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id EB6565AFC8; Fri, 8 Sep 2017 09:17:29 +0000 (UTC) Received: from lemon.redhat.com (ovpn-12-98.pek2.redhat.com [10.72.12.98]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5198260E3A; Fri, 8 Sep 2017 09:17:24 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com EB6565AFC8 Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=famz@redhat.com From: Fam Zheng To: qemu-devel@nongnu.org Date: Fri, 8 Sep 2017 17:16:57 +0800 Message-Id: <20170908091700.14867-5-famz@redhat.com> In-Reply-To: <20170908091700.14867-1-famz@redhat.com> References: <20170908091700.14867-1-famz@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Fri, 08 Sep 2017 09:17:30 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH RFC 4/7] tests: Build fix for hello-i386 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: peter.maydell@linaro.org, thuth@redhat.com, Fam Zheng , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , programmingkidx@gmail.com, crosa@redhat.com, pbonzini@redhat.com, =?UTF-8?q?Alex=20Benn=C3=A9e?= , rth@twiddle.net Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" We have -Werror=3Dmissing-prototype, add a dummy prototype to avoid that warning. Signed-off-by: Fam Zheng --- tests/tcg/hello-i386.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/tcg/hello-i386.c b/tests/tcg/hello-i386.c index fa00380de2..cfeb24b2f5 100644 --- a/tests/tcg/hello-i386.c +++ b/tests/tcg/hello-i386.c @@ -20,6 +20,7 @@ static inline int write(int fd, const char * buf, int len) return status; } =20 +void _start(void); void _start(void) { write(1, "Hello World\n", 12); --=20 2.13.5 From nobody Thu May 2 13:05:37 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.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 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1504862581048755.0998443015189; Fri, 8 Sep 2017 02:23:01 -0700 (PDT) Received: from localhost ([::1]:44058 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dqFV5-000204-RR for importer@patchew.org; Fri, 08 Sep 2017 05:22:59 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52632) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dqFPw-0006Co-JR for qemu-devel@nongnu.org; Fri, 08 Sep 2017 05:17:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dqFPr-0000ix-76 for qemu-devel@nongnu.org; Fri, 08 Sep 2017 05:17:40 -0400 Received: from mx1.redhat.com ([209.132.183.28]:57990) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dqFPq-0000hp-UW for qemu-devel@nongnu.org; Fri, 08 Sep 2017 05:17:35 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 0395D356E8; Fri, 8 Sep 2017 09:17:34 +0000 (UTC) Received: from lemon.redhat.com (ovpn-12-98.pek2.redhat.com [10.72.12.98]) by smtp.corp.redhat.com (Postfix) with ESMTP id 74AC960241; Fri, 8 Sep 2017 09:17:30 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 0395D356E8 Authentication-Results: ext-mx06.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx06.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=famz@redhat.com From: Fam Zheng To: qemu-devel@nongnu.org Date: Fri, 8 Sep 2017 17:16:58 +0800 Message-Id: <20170908091700.14867-6-famz@redhat.com> In-Reply-To: <20170908091700.14867-1-famz@redhat.com> References: <20170908091700.14867-1-famz@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Fri, 08 Sep 2017 09:17:34 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH RFC 5/7] tests: Build fix for linux-test 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: peter.maydell@linaro.org, thuth@redhat.com, Fam Zheng , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , programmingkidx@gmail.com, crosa@redhat.com, pbonzini@redhat.com, =?UTF-8?q?Alex=20Benn=C3=A9e?= , rth@twiddle.net Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" To keep the compiler happy, and to fit in our buildsys flags: - Include "qemu/osdep.h" first - Make local functions "static" - #ifdef out unused functions Signed-off-by: Fam Zheng --- tests/tcg/linux-test.c | 67 +++++++++++++++++-----------------------------= ---- 1 file changed, 22 insertions(+), 45 deletions(-) diff --git a/tests/tcg/linux-test.c b/tests/tcg/linux-test.c index 5070d31446..2a7b8c2d05 100644 --- a/tests/tcg/linux-test.c +++ b/tests/tcg/linux-test.c @@ -17,6 +17,7 @@ * along with this program; if not, see . */ #define _GNU_SOURCE +#include "qemu/osdep.h" #include #include #include @@ -31,6 +32,7 @@ #include #include #include +#include #include #include #include @@ -45,7 +47,7 @@ #define TESTPORT 7654 #define STACK_SIZE 16384 =20 -void error1(const char *filename, int line, const char *fmt, ...) +static void error1(const char *filename, int line, const char *fmt, ...) { va_list ap; va_start(ap, fmt); @@ -56,7 +58,7 @@ void error1(const char *filename, int line, const char *f= mt, ...) exit(1); } =20 -int __chk_error(const char *filename, int line, int ret) +static int __chk_error(const char *filename, int line, int ret) { if (ret < 0) { error1(filename, line, "%m (ret=3D%d, errno=3D%d)", @@ -73,7 +75,7 @@ int __chk_error(const char *filename, int line, int ret) =20 #define FILE_BUF_SIZE 300 =20 -void test_file(void) +static void test_file(void) { int fd, i, len, ret; uint8_t buf[FILE_BUF_SIZE]; @@ -210,7 +212,7 @@ void test_file(void) chk_error(rmdir(TESTPATH)); } =20 -void test_fork(void) +static void test_fork(void) { int pid, status; =20 @@ -224,7 +226,7 @@ void test_fork(void) error("waitpid status=3D0x%x", status); } =20 -void test_time(void) +static void test_time(void) { struct timeval tv, tv2; struct timespec ts, rem; @@ -251,34 +253,7 @@ void test_time(void) error("getrusage"); } =20 -void pstrcpy(char *buf, int buf_size, const char *str) -{ - int c; - char *q =3D buf; - - if (buf_size <=3D 0) - return; - - for(;;) { - c =3D *str++; - if (c =3D=3D 0 || q >=3D buf + buf_size - 1) - break; - *q++ =3D c; - } - *q =3D '\0'; -} - -/* strcat and truncate. */ -char *pstrcat(char *buf, int buf_size, const char *s) -{ - int len; - len =3D strlen(buf); - if (len < buf_size) - pstrcpy(buf + len, buf_size - len, s); - return buf; -} - -int server_socket(void) +static int server_socket(void) { int val, fd; struct sockaddr_in sockaddr; @@ -298,7 +273,7 @@ int server_socket(void) =20 } =20 -int client_socket(void) +static int client_socket(void) { int fd; struct sockaddr_in sockaddr; @@ -312,9 +287,9 @@ int client_socket(void) return fd; } =20 -const char socket_msg[] =3D "hello socket\n"; +static const char socket_msg[] =3D "hello socket\n"; =20 -void test_socket(void) +static void test_socket(void) { int server_fd, client_fd, fd, pid, ret, val; struct sockaddr_in sockaddr; @@ -348,9 +323,10 @@ void test_socket(void) chk_error(close(server_fd)); } =20 +#if 0 #define WCOUNT_MAX 512 =20 -void test_pipe(void) +static void test_pipe(void) { fd_set rfds, wfds; int fds[2], fd_max, ret; @@ -391,10 +367,10 @@ void test_pipe(void) chk_error(close(fds[1])); } =20 -int thread1_res; -int thread2_res; +static int thread1_res; +static int thread2_res; =20 -int thread1_func(void *arg) +static int thread1_func(void *arg) { int i; for(i=3D0;i<5;i++) { @@ -404,7 +380,7 @@ int thread1_func(void *arg) return 0; } =20 -int thread2_func(void *arg) +static int thread2_func(void *arg) { int i; for(i=3D0;i<6;i++) { @@ -435,27 +411,28 @@ void test_clone(void) thread2_res !=3D 6) error("clone"); } +#endif =20 /***********************************/ =20 volatile int alarm_count; jmp_buf jmp_env; =20 -void sig_alarm(int sig) +static void sig_alarm(int sig) { if (sig !=3D SIGALRM) error("signal"); alarm_count++; } =20 -void sig_segv(int sig, siginfo_t *info, void *puc) +static void sig_segv(int sig, siginfo_t *info, void *puc) { if (sig !=3D SIGSEGV) error("signal"); longjmp(jmp_env, 1); } =20 -void test_signal(void) +static void test_signal(void) { struct sigaction act; struct itimerval it, oit; @@ -510,7 +487,7 @@ void test_signal(void) =20 #define SHM_SIZE 32768 =20 -void test_shm(void) +static void test_shm(void) { void *ptr; int shmid; --=20 2.13.5 From nobody Thu May 2 13:05:37 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.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 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1504862693984400.2464388951719; Fri, 8 Sep 2017 02:24:53 -0700 (PDT) Received: from localhost ([::1]:44070 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dqFWu-0003dn-Qn for importer@patchew.org; Fri, 08 Sep 2017 05:24:52 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52665) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dqFPz-0006FX-Oq for qemu-devel@nongnu.org; Fri, 08 Sep 2017 05:17:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dqFPu-0000pX-Ve for qemu-devel@nongnu.org; Fri, 08 Sep 2017 05:17:43 -0400 Received: from mx1.redhat.com ([209.132.183.28]:45964) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dqFPu-0000ni-QH for qemu-devel@nongnu.org; Fri, 08 Sep 2017 05:17:38 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id DC56A80461; Fri, 8 Sep 2017 09:17:37 +0000 (UTC) Received: from lemon.redhat.com (ovpn-12-98.pek2.redhat.com [10.72.12.98]) by smtp.corp.redhat.com (Postfix) with ESMTP id 81273610B0; Fri, 8 Sep 2017 09:17:34 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com DC56A80461 Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=famz@redhat.com From: Fam Zheng To: qemu-devel@nongnu.org Date: Fri, 8 Sep 2017 17:16:59 +0800 Message-Id: <20170908091700.14867-7-famz@redhat.com> In-Reply-To: <20170908091700.14867-1-famz@redhat.com> References: <20170908091700.14867-1-famz@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Fri, 08 Sep 2017 09:17:38 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH RFC 6/7] buildsys: Add "check-tcg" target 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: peter.maydell@linaro.org, thuth@redhat.com, Fam Zheng , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , programmingkidx@gmail.com, crosa@redhat.com, pbonzini@redhat.com, =?UTF-8?q?Alex=20Benn=C3=A9e?= , rth@twiddle.net Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" This is merely a thin wrapper of the old "test" target, but in a consistent form of Makefile structure. Next patches will actually convert the rules from the old "make test". Signed-off-by: Fam Zheng --- Makefile | 1 + tests/Makefile.include | 1 + tests/tcg/Makefile.include | 3 +++ 3 files changed, 5 insertions(+) create mode 100644 tests/tcg/Makefile.include diff --git a/Makefile b/Makefile index c1e35b1fd0..c44be86cef 100644 --- a/Makefile +++ b/Makefile @@ -282,6 +282,7 @@ dummy :=3D $(call unnest-vars,, \ trace-obj-y) =20 include $(SRC_PATH)/tests/Makefile.include +include $(SRC_PATH)/tests/tcg/Makefile.include =20 all: $(DOCS) $(TOOLS) $(HELPERS-y) recurse-all modules =20 diff --git a/tests/Makefile.include b/tests/Makefile.include index debaf845db..0e22d90640 100644 --- a/tests/Makefile.include +++ b/tests/Makefile.include @@ -10,6 +10,7 @@ check-help: @echo " make check-speed Run qobject speed tests" @echo " make check-qapi-schema Run QAPI schema tests" @echo " make check-block Run block tests" + @echo " make check-tcg Clean TCG tests" @echo " make check-report.html Generates an HTML test report" @echo " make check-clean Clean the tests" @echo diff --git a/tests/tcg/Makefile.include b/tests/tcg/Makefile.include new file mode 100644 index 0000000000..e5fea1c8c5 --- /dev/null +++ b/tests/tcg/Makefile.include @@ -0,0 +1,3 @@ + +check-tcg: + $(MAKE) -C tests/tcg test --=20 2.13.5 From nobody Thu May 2 13:05:37 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.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 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 15048625583651017.8632494035306; Fri, 8 Sep 2017 02:22:38 -0700 (PDT) Received: from localhost ([::1]:44057 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dqFUj-0001Zl-82 for importer@patchew.org; Fri, 08 Sep 2017 05:22:37 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52711) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dqFQ6-0006Rj-SA for qemu-devel@nongnu.org; Fri, 08 Sep 2017 05:17:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dqFQ0-000138-8E for qemu-devel@nongnu.org; Fri, 08 Sep 2017 05:17:50 -0400 Received: from mx1.redhat.com ([209.132.183.28]:57646) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dqFPz-00011a-W4 for qemu-devel@nongnu.org; Fri, 08 Sep 2017 05:17:44 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 19DBF81DE4; Fri, 8 Sep 2017 09:17:43 +0000 (UTC) Received: from lemon.redhat.com (ovpn-12-98.pek2.redhat.com [10.72.12.98]) by smtp.corp.redhat.com (Postfix) with ESMTP id 67F1E60241; Fri, 8 Sep 2017 09:17:38 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 19DBF81DE4 Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=famz@redhat.com From: Fam Zheng To: qemu-devel@nongnu.org Date: Fri, 8 Sep 2017 17:17:00 +0800 Message-Id: <20170908091700.14867-8-famz@redhat.com> In-Reply-To: <20170908091700.14867-1-famz@redhat.com> References: <20170908091700.14867-1-famz@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Fri, 08 Sep 2017 09:17:43 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH RFC 7/7] tests: Move i386 tcg tests to check-tcg 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: peter.maydell@linaro.org, thuth@redhat.com, Fam Zheng , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , programmingkidx@gmail.com, crosa@redhat.com, pbonzini@redhat.com, =?UTF-8?q?Alex=20Benn=C3=A9e?= , rth@twiddle.net Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Only enable the tests if i386-linux-user is a specified target in configure, and build the test programs with "docker.py cc" command. Also change the "diff -u" to "cmp -s" because we have really huge output to compare. Signed-off-by: Fam Zheng --- tests/tcg/Makefile | 60 ------------------------------------- tests/tcg/Makefile.include | 74 ++++++++++++++++++++++++++++++++++++++++++= +++- 2 files changed, 73 insertions(+), 61 deletions(-) diff --git a/tests/tcg/Makefile b/tests/tcg/Makefile index 89e3342f3d..4a2b069304 100644 --- a/tests/tcg/Makefile +++ b/tests/tcg/Makefile @@ -17,15 +17,6 @@ LDFLAGS=3D # runcom maps page 0, so it requires root privileges # also, pi_10.com runs indefinitely =20 -I386_TESTS=3Dhello-i386 \ - linux-test \ - testthread \ - sha1-i386 \ - test-i386 \ - test-i386-fprem \ - test-mmap \ - # runcom - # native i386 compilers sometimes are not biarch. assume cross-compilers = are ifneq ($(ARCH),i386) I386_TESTS+=3Drun-test-x86_64 @@ -46,35 +37,11 @@ test: all run-%: % -$(QEMU) ./$* =20 -run-hello-i386: hello-i386 -run-linux-test: linux-test -run-testthread: testthread -run-sha1-i386: sha1-i386 - -run-test-i386: test-i386 - ./test-i386 > test-i386.ref - -$(QEMU) test-i386 > test-i386.out - @if diff -u test-i386.ref test-i386.out ; then echo "Auto Test OK"; fi - -run-test-i386-fprem: test-i386-fprem - ./test-i386-fprem > test-i386-fprem.ref - -$(QEMU) test-i386-fprem > test-i386-fprem.out - @if diff -u test-i386-fprem.ref test-i386-fprem.out ; then echo "Auto Tes= t OK"; fi - run-test-x86_64: test-x86_64 ./test-x86_64 > test-x86_64.ref -$(QEMU_X86_64) test-x86_64 > test-x86_64.out @if diff -u test-x86_64.ref test-x86_64.out ; then echo "Auto Test OK"; fi =20 -run-test-mmap: test-mmap - -$(QEMU) ./test-mmap - -$(QEMU) -p 8192 ./test-mmap 8192 - -$(QEMU) -p 16384 ./test-mmap 16384 - -$(QEMU) -p 32768 ./test-mmap 32768 - -run-runcom: runcom - -$(QEMU) ./runcom $(SRC_PATH)/tests/pi_10.com - run-test_path: test_path ./test_path =20 @@ -84,37 +51,10 @@ test_path: test_path.o =20 test_path.o: test_path.c =20 -hello-i386: hello-i386.c - $(CC_I386) -nostdlib $(CFLAGS) -static $(LDFLAGS) -o $@ $< - strip $@ - -testthread: testthread.c - $(CC_I386) $(CFLAGS) $(LDFLAGS) -o $@ $< -lpthread - -# i386/x86_64 emulation test (test various opcodes) */ -test-i386: test-i386.c test-i386-code16.S test-i386-vm86.S \ - test-i386.h test-i386-shift.h test-i386-muldiv.h - $(CC_I386) $(QEMU_INCLUDES) $(CFLAGS) $(LDFLAGS) -o $@ \ - $( $<.ref + -$(QEMU) $< > $<.out + @if cmp -s $<.ref $<.out ; then echo "Auto Test OK"; fi + +tcg-run-test-mmap: tests/tcg/test-mmap + -$(QEMU) $< + -$(QEMU) -p 8192 $< 8192 + -$(QEMU) -p 16384 $< 16384 + -$(QEMU) -p 32768 $< 32768 + +tcg-run-runcom: tests/tcg/runcom + -$(QEMU) $< $(SRC_PATH)/tests/tcg/pi_10.com + +TCG_TESTS =3D $(if $(filter i386-linux-user, $(TARGET_LIST)), $(TCG_I386_T= ESTS)) + +$(addprefix tests/tcg/, $(TCG_TESTS)): CXX :=3D +$(addprefix tests/tcg/, $(TCG_TESTS)): CC :=3D \ + $(SRC_PATH)/tests/docker/docker.py cc -i qemu:$(DOCKER_IMAGE) -s $(SRC_PA= TH) -- + +tests/tcg/hello-i386: LDFLAGS :=3D -nostdlib + +tests/tcg/sha1-i386: tests/tcg/sha1.o + $(call LINK, $^) + +tests/tcg/test-i386: $(addprefix $(SRC_PATH)/tests/tcg/, \ + test-i386.c test-i386-code16.S test-i386-vm86.S \ + test-i386.h test-i386-shift.h test-i386-muldiv.h) + $(CC) $(CFLAGS) $(LDFLAGS) -o $@ \ + $(