From patchwork Thu Dec 1 05:14:28 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pranith Kumar X-Patchwork-Id: 9455443 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 6200460235 for ; Thu, 1 Dec 2016 05:37:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5502928476 for ; Thu, 1 Dec 2016 05:37:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4614F2847A; Thu, 1 Dec 2016 05:37:44 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 5010C28480 for ; Thu, 1 Dec 2016 05:37:42 +0000 (UTC) Received: from localhost ([::1]:48259 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cCK3x-0005UU-Fu for patchwork-qemu-devel@patchwork.kernel.org; Thu, 01 Dec 2016 00:37:41 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43791) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cCJho-0002xf-LY for qemu-devel@nongnu.org; Thu, 01 Dec 2016 00:14:50 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cCJhm-0007Tv-EH for qemu-devel@nongnu.org; Thu, 01 Dec 2016 00:14:48 -0500 Received: from mail-yw0-x244.google.com ([2607:f8b0:4002:c05::244]:33208) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cCJhm-0007S4-3x for qemu-devel@nongnu.org; Thu, 01 Dec 2016 00:14:46 -0500 Received: by mail-yw0-x244.google.com with SMTP id s68so16780327ywg.0 for ; Wed, 30 Nov 2016 21:14:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Pv9C3Nvl6xmGN//L1COTJM0jmH46oRUljJ98G1i+6sc=; b=vS3Xf+386yvYGmR5pKnTam9kewJLsUH/cjRC7xb72Z1zyy+dg0/PZ5e/yYWwoGiqci zbg702HJ9A1n4a2/otH7TpSelGdn7XVay+SNR6uQwhzZJQl6HSlbQnOz68QTUVWUBMTM a6DN4Sf/F+Mglel4vwwmuiRQdNWPZoJzUPiHJxWhQaLKL6FfAoMM1BuPQ/q66K59Npgu qdWc9txkyG6miCxsj63gevtZDi1H/ZMMZWVm1U02poOHK0wG2b0iYqaqlH7typ/wEvsd uFi7GCd3SKedvJIE0sOUb0uvWlkxERIUhA3k+PdiYuhI4E06qMn+/Vhck40wa+vfuX1n M5tA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Pv9C3Nvl6xmGN//L1COTJM0jmH46oRUljJ98G1i+6sc=; b=heBuO+m7C0v5e4fQP3UCuJce3PAYYxsKcacftG1H3MyUada10C7le23NnPyUw3VX2T Z/ewG+U7pYyTEOeUE7gpngEsw6ujbbK9G4bafGN4V9ahZ7a0+eW4cZS48cYEKOUkTyqc 7wPo2n9aECA8HK7fqtOw9Lh26xDNclMGoOq+34E9K1TmAD+tlgeYj2HgYA2BiFiNE2A2 vDEbD+KrAyYghYn6jcwU0YY04ft6zSrxe8bIO1GE0MmdcMHc/nhSNZcnWJyMdEdaOp8k cNHaEbnpgIMDkzAcNyiAQU0Al29dqXfIQXre2xVGChN0K1xAA/1NPcaowlqTOpxTxX26 9juQ== X-Gm-Message-State: AKaTC01uP/pSAZsbe11v26SiEdQx9105QG9j1WnvPrKOqoouH/ifosCPhJ8ZHMJlehil5Q== X-Received: by 10.129.9.214 with SMTP id 205mr42704440ywj.343.1480569285117; Wed, 30 Nov 2016 21:14:45 -0800 (PST) Received: from localhost.localdomain (c-73-207-178-95.hsd1.ga.comcast.net. [73.207.178.95]) by smtp.gmail.com with ESMTPSA id l73sm24681068ywc.54.2016.11.30.21.14.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 30 Nov 2016 21:14:44 -0800 (PST) From: Pranith Kumar To: alex.bennee@linaro.org Date: Thu, 1 Dec 2016 00:14:28 -0500 Message-Id: <20161201051433.17168-15-bobby.prani@gmail.com> X-Mailer: git-send-email 2.10.2 In-Reply-To: <20161201051433.17168-1-bobby.prani@gmail.com> References: <20161201051433.17168-1-bobby.prani@gmail.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:4002:c05::244 Subject: [Qemu-devel] [PATCH 14/19] tests/tcg: Move i386 tests to arch specific folder 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: qemu-devel@nongnu.org, rth@twiddle.net Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Pranith Kumar --- tests/tcg/Makefile | 156 -------------------------------- tests/tcg/i386/Makefile | 88 ++++++++++++++++++ tests/tcg/{ => i386}/hello-i386.c | 0 tests/tcg/{ => i386}/pi_10.com | Bin tests/tcg/{ => i386}/runcom.c | 0 tests/tcg/{ => i386}/test-i386-code16.S | 0 tests/tcg/{ => i386}/test-i386-fprem.c | 0 tests/tcg/{ => i386}/test-i386-muldiv.h | 0 tests/tcg/{ => i386}/test-i386-shift.h | 0 tests/tcg/{ => i386}/test-i386-ssse3.c | 0 tests/tcg/{ => i386}/test-i386-vm86.S | 0 tests/tcg/{ => i386}/test-i386.c | 0 tests/tcg/{ => i386}/test-i386.h | 0 13 files changed, 88 insertions(+), 156 deletions(-) delete mode 100644 tests/tcg/Makefile create mode 100644 tests/tcg/i386/Makefile rename tests/tcg/{ => i386}/hello-i386.c (100%) rename tests/tcg/{ => i386}/pi_10.com (100%) rename tests/tcg/{ => i386}/runcom.c (100%) rename tests/tcg/{ => i386}/test-i386-code16.S (100%) rename tests/tcg/{ => i386}/test-i386-fprem.c (100%) rename tests/tcg/{ => i386}/test-i386-muldiv.h (100%) rename tests/tcg/{ => i386}/test-i386-shift.h (100%) rename tests/tcg/{ => i386}/test-i386-ssse3.c (100%) rename tests/tcg/{ => i386}/test-i386-vm86.S (100%) rename tests/tcg/{ => i386}/test-i386.c (100%) rename tests/tcg/{ => i386}/test-i386.h (100%) diff --git a/tests/tcg/Makefile b/tests/tcg/Makefile deleted file mode 100644 index d1557c2..0000000 --- a/tests/tcg/Makefile +++ /dev/null @@ -1,156 +0,0 @@ --include ../../config-host.mak --include $(SRC_PATH)/rules.mak - -$(call set-vpath, $(SRC_PATH)/tests/tcg) - -QEMU=../../i386-linux-user/qemu-i386 -QEMU_X86_64=../../x86_64-linux-user/qemu-x86_64 -CC_X86_64=$(CC_I386) -m64 - -QEMU_INCLUDES += -I../.. -CFLAGS=-Wall -O2 -g -fno-strict-aliasing -#CFLAGS+=-msse2 -LDFLAGS= - -# TODO: automatically detect ARM and MIPS compilers, and run those too - -# runcom maps page 0, so it requires root privileges -# also, pi_10.com runs indefinitely - -I386_TESTS=hello-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+=run-test-x86_64 -endif - -TESTS = test_path -ifneq ($(call find-in-path, $(CC_I386)),) -TESTS += $(I386_TESTS) -endif - -all: $(patsubst %,run-%,$(TESTS)) -test: all - -# rules to run tests - -.PHONY: $(patsubst %,run-%,$(TESTS)) - -run-%: % - -$(QEMU) ./$* - -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 Test 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 - -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 - -# rules to compile tests - -test_path: test_path.o - -test_path.o: test_path.c - -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 $@ \ - $( test-i386.ref + -$(QEMU) test-i386 > test-i386.out + @if cmp -s 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_X86_64) test-i386-fprem > test-i386-fprem.out + @if cmp -s test-i386-fprem.ref test-i386-fprem.out ; then echo "Auto Test 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 + +run-runcom: runcom + -$(QEMU) ./runcom $(SRC_PATH)/tests/pi_10.com + +# rules to compile tests + +hello-i386: hello-i386.c + $(CC_I386) -nostdlib $(CFLAGS) -static $(LDFLAGS) -o $@ $< + strip $@ + +# 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 $@ \ + $(