qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 0/6] First part of autoconfy series: cleanup tests/
@ 2010-10-21  8:18 Paolo Bonzini
  2010-10-21  8:18 ` [Qemu-devel] [PATCH 1/6] unbreak "make" from tests directory Paolo Bonzini
                   ` (7 more replies)
  0 siblings, 8 replies; 13+ messages in thread
From: Paolo Bonzini @ 2010-10-21  8:18 UTC (permalink / raw)
  To: qemu-devel

This is a small start from the autoconfy configure series.  Actually,
this part is almost completely new.  It cleans up the tests Makefile
so that the i386-linux-user testsuite's Makefile targets are more
easily extensible and can work wherever a compiler for i386 is
installed.  In the future this could be extended to ARM and
MIPS targets.

Paolo Bonzini (6):
  unbreak "make" from tests directory
  unbreak "make" from vpath-built tests directory
  disable test_enter on i386, it is broken
  make runcom compile on recent distributions
  fix test_path
  rewrite i386 tests Makefile

 configure         |    5 ++
 rules.mak         |    9 ++++
 tests/Makefile    |  123 ++++++++++++++++++++++++++++++++++------------------
 tests/runcom.c    |   11 ++---
 tests/test-i386.c |    5 ++
 tests/test_path.c |   13 +++++-
 6 files changed, 114 insertions(+), 52 deletions(-)

-- 
1.7.2.3

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Qemu-devel] [PATCH 1/6] unbreak "make" from tests directory
  2010-10-21  8:18 [Qemu-devel] [PATCH 0/6] First part of autoconfy series: cleanup tests/ Paolo Bonzini
@ 2010-10-21  8:18 ` Paolo Bonzini
  2010-10-21  8:18 ` [Qemu-devel] [PATCH 2/6] unbreak "make" from vpath-built " Paolo Bonzini
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 13+ messages in thread
From: Paolo Bonzini @ 2010-10-21  8:18 UTC (permalink / raw)
  To: qemu-devel

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 configure |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/configure b/configure
index d303061..d076447 100755
--- a/configure
+++ b/configure
@@ -2333,6 +2333,7 @@ printf "# Configured with:" >> $config_host_mak
 printf " '%s'" "$0" "$@" >> $config_host_mak
 echo >> $config_host_mak
 
+echo all: >> $config_host_mak
 echo "prefix=$prefix" >> $config_host_mak
 echo "bindir=$bindir" >> $config_host_mak
 echo "mandir=$mandir" >> $config_host_mak
-- 
1.7.2.3

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [Qemu-devel] [PATCH 2/6] unbreak "make" from vpath-built tests directory
  2010-10-21  8:18 [Qemu-devel] [PATCH 0/6] First part of autoconfy series: cleanup tests/ Paolo Bonzini
  2010-10-21  8:18 ` [Qemu-devel] [PATCH 1/6] unbreak "make" from tests directory Paolo Bonzini
@ 2010-10-21  8:18 ` Paolo Bonzini
  2010-10-21  8:18 ` [Qemu-devel] [PATCH 3/6] disable test_enter on i386, it is broken Paolo Bonzini
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 13+ messages in thread
From: Paolo Bonzini @ 2010-10-21  8:18 UTC (permalink / raw)
  To: qemu-devel

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 tests/Makefile |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/tests/Makefile b/tests/Makefile
index ff7f787..e26b2d7 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -1,4 +1,5 @@
 -include ../config-host.mak
+-include $(SRC_PATH)/rules.mak
 
 $(call set-vpath, $(SRC_PATH)/tests)
 
-- 
1.7.2.3

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [Qemu-devel] [PATCH 3/6] disable test_enter on i386, it is broken
  2010-10-21  8:18 [Qemu-devel] [PATCH 0/6] First part of autoconfy series: cleanup tests/ Paolo Bonzini
  2010-10-21  8:18 ` [Qemu-devel] [PATCH 1/6] unbreak "make" from tests directory Paolo Bonzini
  2010-10-21  8:18 ` [Qemu-devel] [PATCH 2/6] unbreak "make" from vpath-built " Paolo Bonzini
@ 2010-10-21  8:18 ` Paolo Bonzini
  2010-10-21  8:18 ` [Qemu-devel] [PATCH 4/6] make runcom compile on recent distributions Paolo Bonzini
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 13+ messages in thread
From: Paolo Bonzini @ 2010-10-21  8:18 UTC (permalink / raw)
  To: qemu-devel

Many other tests fail, but this has an infinite loop with both
qemu-i386 and native execution (albeit on x86_64), so there is
something more going on.  I'm not going to debug it now, so just
disable the test.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 tests/test-i386.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/tests/test-i386.c b/tests/test-i386.c
index b28b257..fea4062 100644
--- a/tests/test-i386.c
+++ b/tests/test-i386.c
@@ -2047,6 +2047,10 @@ long enter_stack[4096];
 #define RBP "%%ebp"
 #endif
 
+#if !defined(__x86_64__)
+/* causes an infinite loop, disable it for now.  */
+#define TEST_ENTER(size, stack_type, level) 
+#else
 #define TEST_ENTER(size, stack_type, level)\
 {\
     long esp_save, esp_val, ebp_val, ebp_save, i;\
@@ -2078,6 +2082,7 @@ long enter_stack[4096];
     for(ptr = (stack_type *)esp_val; ptr < stack_end; ptr++)\
         printf(FMTLX "\n", (long)ptr[0]);\
 }
+#endif
 
 static void test_enter(void)
 {
-- 
1.7.2.3

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [Qemu-devel] [PATCH 4/6] make runcom compile on recent distributions
  2010-10-21  8:18 [Qemu-devel] [PATCH 0/6] First part of autoconfy series: cleanup tests/ Paolo Bonzini
                   ` (2 preceding siblings ...)
  2010-10-21  8:18 ` [Qemu-devel] [PATCH 3/6] disable test_enter on i386, it is broken Paolo Bonzini
@ 2010-10-21  8:18 ` Paolo Bonzini
  2010-10-21  8:18 ` [Qemu-devel] [PATCH 5/6] fix test_path Paolo Bonzini
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 13+ messages in thread
From: Paolo Bonzini @ 2010-10-21  8:18 UTC (permalink / raw)
  To: qemu-devel

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 tests/runcom.c |   11 ++++-------
 1 files changed, 4 insertions(+), 7 deletions(-)

diff --git a/tests/runcom.c b/tests/runcom.c
index 6380566..d60342b 100644
--- a/tests/runcom.c
+++ b/tests/runcom.c
@@ -13,15 +13,12 @@
 #include <linux/unistd.h>
 #include <asm/vm86.h>
 
-//#define SIGTEST
+extern int vm86 (unsigned long int subfunction,
+		 struct vm86plus_struct *info);
 
-#undef __syscall_return
-#define __syscall_return(type, res) \
-do { \
-	return (type) (res); \
-} while (0)
+#define VIF_MASK                0x00080000
 
-_syscall2(int, vm86, int, func, struct vm86plus_struct *, v86)
+//#define SIGTEST
 
 #define COM_BASE_ADDR    0x10100
 
-- 
1.7.2.3

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [Qemu-devel] [PATCH 5/6] fix test_path
  2010-10-21  8:18 [Qemu-devel] [PATCH 0/6] First part of autoconfy series: cleanup tests/ Paolo Bonzini
                   ` (3 preceding siblings ...)
  2010-10-21  8:18 ` [Qemu-devel] [PATCH 4/6] make runcom compile on recent distributions Paolo Bonzini
@ 2010-10-21  8:18 ` Paolo Bonzini
  2010-10-21  8:18 ` [Qemu-devel] [PATCH 6/6] rewrite i386 tests Makefile Paolo Bonzini
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 13+ messages in thread
From: Paolo Bonzini @ 2010-10-21  8:18 UTC (permalink / raw)
  To: qemu-devel

path.c grew quite a few new dependencies (mostly via cutils.c),
include them.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 tests/Makefile    |    2 +-
 tests/test_path.c |   13 +++++++++++--
 2 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/tests/Makefile b/tests/Makefile
index e26b2d7..ef575a4 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -3,7 +3,7 @@
 
 $(call set-vpath, $(SRC_PATH)/tests)
 
-CFLAGS=-Wall -O2 -g -fno-strict-aliasing
+CFLAGS=-Wall -O2 -g -fno-strict-aliasing -I..
 #CFLAGS+=-msse2
 LDFLAGS=
 
diff --git a/tests/test_path.c b/tests/test_path.c
index def7441..234ed97 100644
--- a/tests/test_path.c
+++ b/tests/test_path.c
@@ -1,12 +1,21 @@
 /* Test path override code */
-#define _GNU_SOURCE
+#include "../config-host.h"
+#include "../qemu-malloc.c"
+#include "../cutils.c"
 #include "../path.c"
+#include "../trace.c"
+#ifdef CONFIG_SIMPLE_TRACE
+#include "../simpletrace.c"
+#endif
+
 #include <stdarg.h>
 #include <sys/stat.h>
 #include <fcntl.h>
 
+void qemu_log(const char *fmt, ...);
+
 /* Any log message kills the test. */
-void gemu_log(const char *fmt, ...)
+void qemu_log(const char *fmt, ...)
 {
     va_list ap;
 
-- 
1.7.2.3

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [Qemu-devel] [PATCH 6/6] rewrite i386 tests Makefile
  2010-10-21  8:18 [Qemu-devel] [PATCH 0/6] First part of autoconfy series: cleanup tests/ Paolo Bonzini
                   ` (4 preceding siblings ...)
  2010-10-21  8:18 ` [Qemu-devel] [PATCH 5/6] fix test_path Paolo Bonzini
@ 2010-10-21  8:18 ` Paolo Bonzini
  2010-10-22 13:26 ` [Qemu-devel] [PATCH 0/6] First part of autoconfy series: cleanup tests/ Luiz Capitulino
  2010-10-23 14:54 ` Blue Swirl
  7 siblings, 0 replies; 13+ messages in thread
From: Paolo Bonzini @ 2010-10-21  8:18 UTC (permalink / raw)
  To: qemu-devel

1) compute path to i386 compiler from configure.  If it is found, run
the i386 tests.  I use macros so that this approach could be applied
for other arches as well.

2) provide an easily extensible way to add tests

Most tests fail, but at least "make test" does something meaningful.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
        Note: I have no interesting in analyzing/fixing the failures.

 configure      |    4 ++
 rules.mak      |    9 ++++
 tests/Makefile |  120 ++++++++++++++++++++++++++++++++++++-------------------
 3 files changed, 91 insertions(+), 42 deletions(-)

diff --git a/configure b/configure
index d076447..8c8d4d3 100755
--- a/configure
+++ b/configure
@@ -92,6 +92,7 @@ libs_softmmu=""
 libs_tools=""
 audio_pt_int=""
 audio_win_int=""
+cc_i386=i386-pc-linux-gnu-gcc
 
 # parse CC options first
 for opt do
@@ -789,12 +790,14 @@ case "$cpu" in
     i386)
            QEMU_CFLAGS="-m32 $QEMU_CFLAGS"
            LDFLAGS="-m32 $LDFLAGS"
+           cc_i386='$(CC) -m32'
            helper_cflags="-fomit-frame-pointer"
            host_guest_base="yes"
            ;;
     x86_64)
            QEMU_CFLAGS="-m64 $QEMU_CFLAGS"
            LDFLAGS="-m64 $LDFLAGS"
+           cc_i386='$(CC) -m32'
            host_guest_base="yes"
            ;;
     arm*)
@@ -2622,6 +2625,7 @@ echo "INSTALL_DIR=$install -d -m0755 -p" >> $config_host_mak
 echo "INSTALL_DATA=$install -m0644 -p" >> $config_host_mak
 echo "INSTALL_PROG=$install -m0755 -p" >> $config_host_mak
 echo "CC=$cc" >> $config_host_mak
+echo "CC_I386=$cc_i386" >> $config_host_mak
 echo "HOST_CC=$host_cc" >> $config_host_mak
 if test "$sparse" = "yes" ; then
   echo "CC      := REAL_CC=\"\$(CC)\" cgcc"       >> $config_host_mak
diff --git a/rules.mak b/rules.mak
index c843a13..6dac777 100644
--- a/rules.mak
+++ b/rules.mak
@@ -42,6 +42,15 @@ cc-option = $(if $(shell $(CC) $1 $2 -S -o /dev/null -xc /dev/null \
 VPATH_SUFFIXES = %.c %.h %.S %.m %.mak %.texi
 set-vpath = $(if $1,$(foreach PATTERN,$(VPATH_SUFFIXES),$(eval vpath $(PATTERN) $1)))
 
+# find-in-path
+# Usage: $(call find-in-path, prog)
+# Looks in the PATH if the argument contains no slash, else only considers one
+# specific directory.  Returns an # empty string if the program doesn't exist
+# there.
+find-in-path = $(if $(find-string /, $1), \
+        $(wildcard $1), \
+        $(wildcard $(patsubst %, %/$1, $(subst :, ,$(PATH)))))
+
 # Generate timestamp files for .h include files
 
 %.h: %.h-timestamp
diff --git a/tests/Makefile b/tests/Makefile
index ef575a4..ba43fd3 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -3,82 +3,118 @@
 
 $(call set-vpath, $(SRC_PATH)/tests)
 
+QEMU=../i386-linux-user/qemu-i386
+QEMU_X86_64=../x86_64-linux-user/qemu-x86_64
+CC_X86_64=$(CC_I386) -m64
+
 CFLAGS=-Wall -O2 -g -fno-strict-aliasing -I..
 #CFLAGS+=-msse2
 LDFLAGS=
 
-ifeq ($(ARCH),i386)
-TESTS=linux-test testthread sha1-i386 test-i386
+# 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-mmap \
+	   # runcom
+
+# native i386 compilers sometimes are not biarch.  assume cross-compilers are
+ifneq ($(ARCH),i386)
+I386_TESTS+=run-test-x86_64
 endif
-ifeq ($(ARCH),x86_64)
-TESTS=test-x86_64
+
+TESTS = test_path
+ifneq ($(call find-in-path, $(CC_I386)),)
+TESTS += $(I386_TESTS)
 endif
-TESTS+=sha1# test_path
-#TESTS+=test_path
-#TESTS+=runcom
 
-QEMU=../i386-linux-user/qemu-i386
+all: $(patsubst %,run-%,$(TESTS))
+
+# 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-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
 
-all: $(TESTS)
+test_path: test_path.o
+test_path.o: test_path.c
 
 hello-i386: hello-i386.c
-	$(CC) -nostdlib $(CFLAGS) -static $(LDFLAGS) -o $@ $<
+	$(CC_I386) -nostdlib $(CFLAGS) -static $(LDFLAGS) -o $@ $<
 	strip $@
 
 testthread: testthread.c
-	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< -lpthread
-
-test_path: test_path.c
-	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $<
-	./$@ || { rm $@; exit 1; }
+	$(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) -m32 $(CFLAGS) $(LDFLAGS) -static -o $@ \
+	$(CC_I386) $(CFLAGS) $(LDFLAGS) -o $@ \
               $(<D)/test-i386.c $(<D)/test-i386-code16.S $(<D)/test-i386-vm86.S -lm
 
 test-x86_64: test-i386.c \
            test-i386.h test-i386-shift.h test-i386-muldiv.h
-	$(CC) -m64 $(CFLAGS) $(LDFLAGS) -static -o $@ $(<D)/test-i386.c -lm
-
-ifeq ($(ARCH),i386)
-test: test-i386
-	./test-i386 > test-i386.ref
-else
-test:
-endif
-	$(QEMU) test-i386 > test-i386.out
-	@if diff -u test-i386.ref test-i386.out ; then echo "Auto Test OK"; fi
-
-.PHONY: test-mmap
-test-mmap: test-mmap.c
-	$(CC) $(CFLAGS) -Wall -static -O2 $(LDFLAGS) -o $@ $<
-	-./test-mmap
-	-$(QEMU) ./test-mmap
-	-$(QEMU) -p 8192 ./test-mmap 8192
-	-$(QEMU) -p 16384 ./test-mmap 16384
-	-$(QEMU) -p 32768 ./test-mmap 32768
+	$(CC_X86_64) $(CFLAGS) $(LDFLAGS) -o $@ $(<D)/test-i386.c -lm
 
 # generic Linux and CPU test
 linux-test: linux-test.c
-	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< -lm
+	$(CC_I386) $(CFLAGS) $(LDFLAGS) -o $@ $< -lm
+
+# vm86 test
+runcom: runcom.c
+	$(CC_I386) $(CFLAGS) $(LDFLAGS) -o $@ $<
+
+test-mmap: test-mmap.c
+	$(CC_I386) -m32 $(CFLAGS) -Wall -O2 $(LDFLAGS) -o $@ $<
 
 # speed test
 sha1-i386: sha1.c
-	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $<
+	$(CC_I386) $(CFLAGS) $(LDFLAGS) -o $@ $<
 
 sha1: sha1.c
-	$(HOST_CC) $(CFLAGS) $(LDFLAGS) -o $@ $<
+	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $<
 
 speed: sha1 sha1-i386
 	time ./sha1
 	time $(QEMU) ./sha1-i386
 
-# vm86 test
-runcom: runcom.c
-	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $<
-
+# broken test
 # NOTE: -fomit-frame-pointer is currently needed : this is a bug in libqemu
 qruncom: qruncom.c ../ioport-user.c ../i386-user/libqemu.a
 	$(CC) $(CFLAGS) -fomit-frame-pointer $(LDFLAGS) -I../target-i386 -I.. -I../i386-user -I../fpu \
-- 
1.7.2.3

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* Re: [Qemu-devel] [PATCH 0/6] First part of autoconfy series: cleanup tests/
  2010-10-21  8:18 [Qemu-devel] [PATCH 0/6] First part of autoconfy series: cleanup tests/ Paolo Bonzini
                   ` (5 preceding siblings ...)
  2010-10-21  8:18 ` [Qemu-devel] [PATCH 6/6] rewrite i386 tests Makefile Paolo Bonzini
@ 2010-10-22 13:26 ` Luiz Capitulino
  2010-10-22 13:38   ` Paolo Bonzini
  2010-10-23 14:54 ` Blue Swirl
  7 siblings, 1 reply; 13+ messages in thread
From: Luiz Capitulino @ 2010-10-22 13:26 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: qemu-devel

On Thu, 21 Oct 2010 10:18:34 +0200
Paolo Bonzini <pbonzini@redhat.com> wrote:

> This is a small start from the autoconfy configure series.  Actually,
> this part is almost completely new.  It cleans up the tests Makefile
> so that the i386-linux-user testsuite's Makefile targets are more
> easily extensible and can work wherever a compiler for i386 is
> installed.  In the future this could be extended to ARM and
> MIPS targets.

This is unrelated to this series, but something that would be very good to
have would be to move all check- programs to tests/ (or check/) and make them
part of 'make test' or introduce a new 'make check'.


> 
> Paolo Bonzini (6):
>   unbreak "make" from tests directory
>   unbreak "make" from vpath-built tests directory
>   disable test_enter on i386, it is broken
>   make runcom compile on recent distributions
>   fix test_path
>   rewrite i386 tests Makefile
> 
>  configure         |    5 ++
>  rules.mak         |    9 ++++
>  tests/Makefile    |  123 ++++++++++++++++++++++++++++++++++------------------
>  tests/runcom.c    |   11 ++---
>  tests/test-i386.c |    5 ++
>  tests/test_path.c |   13 +++++-
>  6 files changed, 114 insertions(+), 52 deletions(-)
> 

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [Qemu-devel] [PATCH 0/6] First part of autoconfy series: cleanup tests/
  2010-10-22 13:26 ` [Qemu-devel] [PATCH 0/6] First part of autoconfy series: cleanup tests/ Luiz Capitulino
@ 2010-10-22 13:38   ` Paolo Bonzini
  2010-10-22 13:44     ` Luiz Capitulino
  0 siblings, 1 reply; 13+ messages in thread
From: Paolo Bonzini @ 2010-10-22 13:38 UTC (permalink / raw)
  To: Luiz Capitulino; +Cc: qemu-devel

On 10/22/2010 03:26 PM, Luiz Capitulino wrote:
> On Thu, 21 Oct 2010 10:18:34 +0200
> Paolo Bonzini<pbonzini@redhat.com>  wrote:
>
>> This is a small start from the autoconfy configure series.  Actually,
>> this part is almost completely new.  It cleans up the tests Makefile
>> so that the i386-linux-user testsuite's Makefile targets are more
>> easily extensible and can work wherever a compiler for i386 is
>> installed.  In the future this could be extended to ARM and
>> MIPS targets.
>
> This is unrelated to this series, but something that would be very good to
> have would be to move all check- programs to tests/ (or check/) and make them
> part of 'make test' or introduce a new 'make check'.

Right, I thought about that too.  The main hurdle is that: 1) right now 
almost every test in "make test" is failing; 2) the testsuite run by 
"make test" is very noisy, does not create logs, etc.  If we could use 
autotest... :)

We could also have check-i386, check-qmp, etc. and check would simply 
call all of them.

Paolo

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [Qemu-devel] [PATCH 0/6] First part of autoconfy series: cleanup tests/
  2010-10-22 13:38   ` Paolo Bonzini
@ 2010-10-22 13:44     ` Luiz Capitulino
  2010-10-22 13:53       ` Paolo Bonzini
  0 siblings, 1 reply; 13+ messages in thread
From: Luiz Capitulino @ 2010-10-22 13:44 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: qemu-devel

On Fri, 22 Oct 2010 15:38:34 +0200
Paolo Bonzini <pbonzini@redhat.com> wrote:

> On 10/22/2010 03:26 PM, Luiz Capitulino wrote:
> > On Thu, 21 Oct 2010 10:18:34 +0200
> > Paolo Bonzini<pbonzini@redhat.com>  wrote:
> >
> >> This is a small start from the autoconfy configure series.  Actually,
> >> this part is almost completely new.  It cleans up the tests Makefile
> >> so that the i386-linux-user testsuite's Makefile targets are more
> >> easily extensible and can work wherever a compiler for i386 is
> >> installed.  In the future this could be extended to ARM and
> >> MIPS targets.
> >
> > This is unrelated to this series, but something that would be very good to
> > have would be to move all check- programs to tests/ (or check/) and make them
> > part of 'make test' or introduce a new 'make check'.
> 
> Right, I thought about that too.  The main hurdle is that: 1) right now 
> almost every test in "make test" is failing;

Yeah, just saw that.

> 2) the testsuite run by 
> "make test" is very noisy, does not create logs, etc.  If we could use 
> autotest... :)
> 
> We could also have check-i386, check-qmp, etc. and check would simply 
> call all of them.

That would be perfect, I think. I mean, if we could stick only to check
to do all our unit-testing, then it would be easier to setup autotest
around it.

But we'll have to port current tests to it, of course.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [Qemu-devel] [PATCH 0/6] First part of autoconfy series: cleanup tests/
  2010-10-22 13:44     ` Luiz Capitulino
@ 2010-10-22 13:53       ` Paolo Bonzini
  2010-10-22 13:55         ` Luiz Capitulino
  0 siblings, 1 reply; 13+ messages in thread
From: Paolo Bonzini @ 2010-10-22 13:53 UTC (permalink / raw)
  To: Luiz Capitulino; +Cc: qemu-devel

On 10/22/2010 03:44 PM, Luiz Capitulino wrote:
> >  We could also have check-i386, check-qmp, etc. and check would simply
> >  call all of them.
>
> That would be perfect, I think. I mean, if we could stick only to check
> to do all our unit-testing

Well, the current "make test" is more integration testing than unit 
testing, so I'm not sure check can work for that.  But autotest can, 
which is why I mentioned it.

Paolo

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [Qemu-devel] [PATCH 0/6] First part of autoconfy series: cleanup tests/
  2010-10-22 13:53       ` Paolo Bonzini
@ 2010-10-22 13:55         ` Luiz Capitulino
  0 siblings, 0 replies; 13+ messages in thread
From: Luiz Capitulino @ 2010-10-22 13:55 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: qemu-devel

On Fri, 22 Oct 2010 15:53:39 +0200
Paolo Bonzini <pbonzini@redhat.com> wrote:

> On 10/22/2010 03:44 PM, Luiz Capitulino wrote:
> > >  We could also have check-i386, check-qmp, etc. and check would simply
> > >  call all of them.
> >
> > That would be perfect, I think. I mean, if we could stick only to check
> > to do all our unit-testing
> 
> Well, the current "make test" is more integration testing than unit 
> testing, so I'm not sure check can work for that.  But autotest can, 
> which is why I mentioned it.

Ah, got it.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [Qemu-devel] [PATCH 0/6] First part of autoconfy series: cleanup tests/
  2010-10-21  8:18 [Qemu-devel] [PATCH 0/6] First part of autoconfy series: cleanup tests/ Paolo Bonzini
                   ` (6 preceding siblings ...)
  2010-10-22 13:26 ` [Qemu-devel] [PATCH 0/6] First part of autoconfy series: cleanup tests/ Luiz Capitulino
@ 2010-10-23 14:54 ` Blue Swirl
  7 siblings, 0 replies; 13+ messages in thread
From: Blue Swirl @ 2010-10-23 14:54 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: qemu-devel

Thanks, applied all.

On Thu, Oct 21, 2010 at 8:18 AM, Paolo Bonzini <pbonzini@redhat.com> wrote:
> This is a small start from the autoconfy configure series.  Actually,
> this part is almost completely new.  It cleans up the tests Makefile
> so that the i386-linux-user testsuite's Makefile targets are more
> easily extensible and can work wherever a compiler for i386 is
> installed.  In the future this could be extended to ARM and
> MIPS targets.
>
> Paolo Bonzini (6):
>  unbreak "make" from tests directory
>  unbreak "make" from vpath-built tests directory
>  disable test_enter on i386, it is broken
>  make runcom compile on recent distributions
>  fix test_path
>  rewrite i386 tests Makefile
>
>  configure         |    5 ++
>  rules.mak         |    9 ++++
>  tests/Makefile    |  123 ++++++++++++++++++++++++++++++++++------------------
>  tests/runcom.c    |   11 ++---
>  tests/test-i386.c |    5 ++
>  tests/test_path.c |   13 +++++-
>  6 files changed, 114 insertions(+), 52 deletions(-)
>
> --
> 1.7.2.3
>
>
>

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2010-10-23 15:01 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-21  8:18 [Qemu-devel] [PATCH 0/6] First part of autoconfy series: cleanup tests/ Paolo Bonzini
2010-10-21  8:18 ` [Qemu-devel] [PATCH 1/6] unbreak "make" from tests directory Paolo Bonzini
2010-10-21  8:18 ` [Qemu-devel] [PATCH 2/6] unbreak "make" from vpath-built " Paolo Bonzini
2010-10-21  8:18 ` [Qemu-devel] [PATCH 3/6] disable test_enter on i386, it is broken Paolo Bonzini
2010-10-21  8:18 ` [Qemu-devel] [PATCH 4/6] make runcom compile on recent distributions Paolo Bonzini
2010-10-21  8:18 ` [Qemu-devel] [PATCH 5/6] fix test_path Paolo Bonzini
2010-10-21  8:18 ` [Qemu-devel] [PATCH 6/6] rewrite i386 tests Makefile Paolo Bonzini
2010-10-22 13:26 ` [Qemu-devel] [PATCH 0/6] First part of autoconfy series: cleanup tests/ Luiz Capitulino
2010-10-22 13:38   ` Paolo Bonzini
2010-10-22 13:44     ` Luiz Capitulino
2010-10-22 13:53       ` Paolo Bonzini
2010-10-22 13:55         ` Luiz Capitulino
2010-10-23 14:54 ` Blue Swirl

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).