From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:56864) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SpZma-0003w8-PE for qemu-devel@nongnu.org; Fri, 13 Jul 2012 02:55:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SpZmZ-0005iH-C9 for qemu-devel@nongnu.org; Fri, 13 Jul 2012 02:55:20 -0400 Received: from mail-gh0-f173.google.com ([209.85.160.173]:54050) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SpZmZ-0005iD-6r for qemu-devel@nongnu.org; Fri, 13 Jul 2012 02:55:19 -0400 Received: by ghrr14 with SMTP id r14so3554257ghr.4 for ; Thu, 12 Jul 2012 23:55:17 -0700 (PDT) From: Catalin Patulea Date: Fri, 13 Jul 2012 02:55:13 -0400 Message-Id: <1342162513-2626-1-git-send-email-catalinp@google.com> Subject: [Qemu-devel] [PATCH] Get tests/tcg building, fix unused variable warning due to wrong extended asm operand, fix the 'test' make target. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Catalin Patulea Not all tests pass, but at least they can be run using 'make test'. To build individual tests: $ cd $BUILD_PATH/tests/tcg $ SRC_PATH=path/to/qemu make Signed-off-by: Catalin Patulea --- tests/tcg/Makefile | 16 ++++++++++------ tests/tcg/test-i386.c | 3 ++- tests/tcg/test_path.c | 13 +++++++------ 3 files changed, 19 insertions(+), 13 deletions(-) diff --git a/tests/tcg/Makefile b/tests/tcg/Makefile index 15e36a2..3256a98 100644 --- a/tests/tcg/Makefile +++ b/tests/tcg/Makefile @@ -1,13 +1,13 @@ --include ../config-host.mak +-include ../../config-host.mak -include $(SRC_PATH)/rules.mak -$(call set-vpath, $(SRC_PATH)/tests) +$(call set-vpath, $(SRC_PATH)/tests/tcg) -QEMU=../i386-linux-user/qemu-i386 -QEMU_X86_64=../x86_64-linux-user/qemu-x86_64 +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.. +QEMU_INCLUDES += -I../.. CFLAGS=-Wall -O2 -g -fno-strict-aliasing #CFLAGS+=-msse2 LDFLAGS= @@ -36,6 +36,7 @@ TESTS += $(I386_TESTS) endif all: $(patsubst %,run-%,$(TESTS)) +test: all # rules to run tests @@ -74,7 +75,10 @@ run-test_path: test_path # rules to compile tests test_path: test_path.o + $(CC_I386) $(LDFLAGS) $(LIBS) -o $@ $^ + test_path.o: test_path.c + $(CC_I386) $(QEMU_INCLUDES) $(GLIB_CFLAGS) $(CFLAGS) $(LDFLAGS) -c -o $@ $^ hello-i386: hello-i386.c $(CC_I386) -nostdlib $(CFLAGS) -static $(LDFLAGS) -o $@ $< @@ -86,7 +90,7 @@ testthread: testthread.c # 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) $(CFLAGS) $(LDFLAGS) -o $@ \ + $(CC_I386) $(QEMU_INCLUDES) $(CFLAGS) $(LDFLAGS) -o $@ \ $(. */ #define _GNU_SOURCE +#include "compiler.h" // QEMU_PACKED #include #include #include @@ -784,7 +785,7 @@ void fpu_clear_exceptions(void) long double fpregs[8]; } float_env32; - asm volatile ("fnstenv %0\n" : : "m" (float_env32)); + asm volatile ("fnstenv %0\n" : "=m" (float_env32)); float_env32.fpus &= ~0x7f; asm volatile ("fldenv %0\n" : : "m" (float_env32)); } diff --git a/tests/tcg/test_path.c b/tests/tcg/test_path.c index 7265a94..a064eea 100644 --- a/tests/tcg/test_path.c +++ b/tests/tcg/test_path.c @@ -1,11 +1,12 @@ /* Test path override code */ -#include "../config-host.h" -#include "../qemu-malloc.c" -#include "../cutils.c" -#include "../path.c" -#include "../trace.c" +#define _GNU_SOURCE +#include "config-host.h" +#include "iov.c" +#include "cutils.c" +#include "path.c" +#include "trace.c" #ifdef CONFIG_TRACE_SIMPLE -#include "../simpletrace.c" +#include "../trace/simple.c" #endif #include -- 1.7.7.3