From patchwork Fri Aug 19 17:00:22 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pranith Kumar X-Patchwork-Id: 9290657 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 3CBBA6077B for ; Fri, 19 Aug 2016 17:08:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 27F08294AA for ; Fri, 19 Aug 2016 17:08:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1C890294E7; Fri, 19 Aug 2016 17:08:11 +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 46E67294AA for ; Fri, 19 Aug 2016 17:08:10 +0000 (UTC) Received: from localhost ([::1]:58248 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1banH7-0000IE-0Q for patchwork-qemu-devel@patchwork.kernel.org; Fri, 19 Aug 2016 13:08:09 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48118) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ban9n-0002qU-Q0 for qemu-devel@nongnu.org; Fri, 19 Aug 2016 13:00:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ban9h-0000B4-0R for qemu-devel@nongnu.org; Fri, 19 Aug 2016 13:00:35 -0400 Received: from mail-yw0-x241.google.com ([2607:f8b0:4002:c05::241]:33365) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ban9g-0000Az-R4 for qemu-devel@nongnu.org; Fri, 19 Aug 2016 13:00:28 -0400 Received: by mail-yw0-x241.google.com with SMTP id z8so1047382ywa.0 for ; Fri, 19 Aug 2016 10:00:28 -0700 (PDT) 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=iIKsAHv/gIlCKW4kVynbz9rRnZvTJFZ7HgpCRXmf2RI=; b=iRPzFAT5hrMAsrRHEtjW79MooN4tE1BIK7mw6FtA2gwhrJ7p2RzHKbiyqz98UPqr8H uLzT3VQCwdMcj5b8o4BTESWsYKIi8a2Er2RCPYu7H8b8WBxbOpNcFIPSjTXZ19pLA9KJ 4Ux8mskDTrrRcnRkD2GSqbB2KNS0gzheh3z1qBb1ya6k2doSnz0nGlmBhDDnUqXOCPSJ 9bo9OgfI06R9uLL5S6G5gKzqXnZFsrVPb4E4tYuf9FQDvzU0WWaH+GirTd2H+4lWGp3H 5g3iaSxbzyfJwOVMhkFuL9oJX66qS+2kmIHim8YOMM8JkYA+zVMhgfBo6TQvNPQ6FsBS 8U0A== 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=iIKsAHv/gIlCKW4kVynbz9rRnZvTJFZ7HgpCRXmf2RI=; b=Xt1PVmv5SUddQ1WFrCPJaCMdvpq7bKC/+AncVaTC+KKfgdxDx+bYXqfFvWUeTu3n+h WRV98S6Y9qmdSgBJN92rM5zZ1GgahiIaVyZMrm+QF5Yh47Ojs/jIshBN1HtvAanT0qXU maGWhJlpNOZPnOLiWCTJe83nQgGdf+4XAo1gt0CwXBrfQWlV1qKTZf9v1ftawUwsOpGH DOyv3/TFeuQsBdCUmxVWbLUIpD7nTfdVreZjyMJSFav9crgl5PIVqR5B3nzJygQCGLV5 8DOW6SIOsP7iLpFbEcC30UA4cIlPWrMWkKIdpmO441KV3O5b7xI2TACmiknvp/ZFyu5t x/Sw== X-Gm-Message-State: AEkoousDGL0dH2sULbF4Hm4wGB+NA11ePKEXT9wWhRDD3HRF8Xqiq8/mNg6N0e7P9avH0g== X-Received: by 10.129.122.7 with SMTP id v7mr6843733ywc.219.1471626028231; Fri, 19 Aug 2016 10:00:28 -0700 (PDT) Received: from evgadesktop.attlocal.net (108-232-152-155.lightspeed.tukrga.sbcglobal.net. [108.232.152.155]) by smtp.gmail.com with ESMTPSA id o78sm1951766ywo.40.2016.08.19.10.00.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 19 Aug 2016 10:00:27 -0700 (PDT) From: Pranith Kumar To: qemu-devel@nongnu.org Date: Fri, 19 Aug 2016 13:00:22 -0400 Message-Id: <20160819170025.22345-2-bobby.prani@gmail.com> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20160819170025.22345-1-bobby.prani@gmail.com> References: <20160819170025.22345-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::241 Subject: [Qemu-devel] [RFC PATCH 1/4] 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: peter.maydell@linaro.org, pbonzini@redhat.com, alex.bennee@linaro.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 89e3342..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 $@ \ + $(