All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH for-2.3? 0/7] tests: Fix TCG make test
@ 2015-04-11 18:34 Andreas Färber
  2015-04-11 18:34 ` [Qemu-devel] [PATCH for-2.3? 1/7] tests/tcg: Fix test_path build Andreas Färber
                   ` (8 more replies)
  0 siblings, 9 replies; 24+ messages in thread
From: Andreas Färber @ 2015-04-11 18:34 UTC (permalink / raw)
  To: qemu-devel; +Cc: peter.maydell, Andreas Färber, rth

Hello,

In my quest to improve our test coverage, in light of the recent cpu_copy() breakage,
I've taken a stab at make test and actually managed to get most of it to work on x86_64.

Regards,
Andreas

Andreas Färber (7):
  tests/tcg: Fix test_path build
  tests/tcg: Fix linux-test build
  tests/tcg: Disable hanging test-mmap runs
  tests/tcg: Fix running x86_64 tests
  tests/tcg: Fix run-runcom target
  tests/tcg: Prettify run-runcom output
  tests/tcg: Enable runcom test by default

 tests/tcg/Makefile     | 17 ++++++++---------
 tests/tcg/linux-test.c |  1 +
 2 files changed, 9 insertions(+), 9 deletions(-)

-- 
2.1.4

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

* [Qemu-devel] [PATCH for-2.3? 1/7] tests/tcg: Fix test_path build
  2015-04-11 18:34 [Qemu-devel] [PATCH for-2.3? 0/7] tests: Fix TCG make test Andreas Färber
@ 2015-04-11 18:34 ` Andreas Färber
  2015-04-13 11:57   ` Alex Bennée
  2015-04-11 18:34 ` [Qemu-devel] [PATCH for-2.3? 2/7] tests/tcg: Fix linux-test build Andreas Färber
                   ` (7 subsequent siblings)
  8 siblings, 1 reply; 24+ messages in thread
From: Andreas Färber @ 2015-04-11 18:34 UTC (permalink / raw)
  To: qemu-devel; +Cc: peter.maydell, Andreas Färber, rth

tests/tcg/test_path.c incorporates source files that rely on GLib.
Add GLIB_CFLAGS to QEMU_CFLAGS to fix the build.

Signed-off-by: Andreas Färber <afaerber@suse.de>
---
 tests/tcg/Makefile | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tests/tcg/Makefile b/tests/tcg/Makefile
index 89e3342..64f661a 100644
--- a/tests/tcg/Makefile
+++ b/tests/tcg/Makefile
@@ -10,6 +10,7 @@ CC_X86_64=$(CC_I386) -m64
 QEMU_INCLUDES += -I../..
 CFLAGS=-Wall -O2 -g -fno-strict-aliasing
 #CFLAGS+=-msse2
+QEMU_CFLAGS += $(GLIB_CFLAGS)
 LDFLAGS=
 
 # TODO: automatically detect ARM and MIPS compilers, and run those too
-- 
2.1.4

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

* [Qemu-devel] [PATCH for-2.3? 2/7] tests/tcg: Fix linux-test build
  2015-04-11 18:34 [Qemu-devel] [PATCH for-2.3? 0/7] tests: Fix TCG make test Andreas Färber
  2015-04-11 18:34 ` [Qemu-devel] [PATCH for-2.3? 1/7] tests/tcg: Fix test_path build Andreas Färber
@ 2015-04-11 18:34 ` Andreas Färber
  2015-04-13 15:34   ` Alex Bennée
  2015-04-11 18:34 ` [Qemu-devel] [PATCH for-2.3? 3/7] tests/tcg: Disable hanging test-mmap runs Andreas Färber
                   ` (6 subsequent siblings)
  8 siblings, 1 reply; 24+ messages in thread
From: Andreas Färber @ 2015-04-11 18:34 UTC (permalink / raw)
  To: qemu-devel; +Cc: peter.maydell, Andreas Färber, rth

Include a missing system header for struct rusage / getrusage().

Signed-off-by: Andreas Färber <afaerber@suse.de>
---
 tests/tcg/linux-test.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tests/tcg/linux-test.c b/tests/tcg/linux-test.c
index 1c6c013..15c9d7f 100644
--- a/tests/tcg/linux-test.c
+++ b/tests/tcg/linux-test.c
@@ -39,6 +39,7 @@
 #include <dirent.h>
 #include <setjmp.h>
 #include <sys/shm.h>
+#include <sys/resource.h>
 
 #define TESTPATH "/tmp/linux-test.tmp"
 #define TESTPORT 7654
-- 
2.1.4

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

* [Qemu-devel] [PATCH for-2.3? 3/7] tests/tcg: Disable hanging test-mmap runs
  2015-04-11 18:34 [Qemu-devel] [PATCH for-2.3? 0/7] tests: Fix TCG make test Andreas Färber
  2015-04-11 18:34 ` [Qemu-devel] [PATCH for-2.3? 1/7] tests/tcg: Fix test_path build Andreas Färber
  2015-04-11 18:34 ` [Qemu-devel] [PATCH for-2.3? 2/7] tests/tcg: Fix linux-test build Andreas Färber
@ 2015-04-11 18:34 ` Andreas Färber
  2015-04-11 18:34 ` [Qemu-devel] [PATCH for-2.3? 4/7] tests/tcg: Fix running x86_64 tests Andreas Färber
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 24+ messages in thread
From: Andreas Färber @ 2015-04-11 18:34 UTC (permalink / raw)
  To: qemu-devel; +Cc: peter.maydell, Andreas Färber, rth

All three invocations of test-mmap with -p parameters hang without
producing any output.

Don't call them for now, to let `make test` proceed.

Signed-off-by: Andreas Färber <afaerber@suse.de>
---
 tests/tcg/Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tests/tcg/Makefile b/tests/tcg/Makefile
index 64f661a..d79e0bb 100644
--- a/tests/tcg/Makefile
+++ b/tests/tcg/Makefile
@@ -69,9 +69,9 @@ run-test-x86_64: test-x86_64
 
 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
+#	-$(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
-- 
2.1.4

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

* [Qemu-devel] [PATCH for-2.3? 4/7] tests/tcg: Fix running x86_64 tests
  2015-04-11 18:34 [Qemu-devel] [PATCH for-2.3? 0/7] tests: Fix TCG make test Andreas Färber
                   ` (2 preceding siblings ...)
  2015-04-11 18:34 ` [Qemu-devel] [PATCH for-2.3? 3/7] tests/tcg: Disable hanging test-mmap runs Andreas Färber
@ 2015-04-11 18:34 ` Andreas Färber
  2015-04-13 15:35   ` Alex Bennée
  2015-04-11 18:34 ` [Qemu-devel] [PATCH for-2.3? 5/7] tests/tcg: Fix run-runcom target Andreas Färber
                   ` (4 subsequent siblings)
  8 siblings, 1 reply; 24+ messages in thread
From: Andreas Färber @ 2015-04-11 18:34 UTC (permalink / raw)
  To: qemu-devel; +Cc: peter.maydell, Andreas Färber, rth

When ARCH != i386, the wrong test target was being added to the list of
tests to run. Fix this to have test-x86_64 run as well.

Note that test-x86_64 produces two build warnings on gcc 4.8.3, but we
don't use -Werror for these tests:

  test-i386.c:2110:1: warning: specifying vector types with __attribute__ ((mode)) is deprecated [-Wattributes]
   typedef int __m64 __attribute__ ((__mode__ (__V2SI__)));
  test-i386.c:2110:1: warning: use __attribute__ ((vector_size)) instead [-Wattributes]

  test-i386.c:2111:1: warning: specifying vector types with __attribute__ ((mode)) is deprecated [-Wattributes]
   typedef float __m128 __attribute__ ((__mode__(__V4SF__)));
  test-i386.c:2111:1: warning: use __attribute__ ((vector_size)) instead [-Wattributes]

Signed-off-by: Andreas Färber <afaerber@suse.de>
---
 tests/tcg/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/tcg/Makefile b/tests/tcg/Makefile
index d79e0bb..ab1055f 100644
--- a/tests/tcg/Makefile
+++ b/tests/tcg/Makefile
@@ -29,7 +29,7 @@ I386_TESTS=hello-i386 \
 
 # native i386 compilers sometimes are not biarch.  assume cross-compilers are
 ifneq ($(ARCH),i386)
-I386_TESTS+=run-test-x86_64
+I386_TESTS+=test-x86_64
 endif
 
 TESTS = test_path
-- 
2.1.4

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

* [Qemu-devel] [PATCH for-2.3? 5/7] tests/tcg: Fix run-runcom target
  2015-04-11 18:34 [Qemu-devel] [PATCH for-2.3? 0/7] tests: Fix TCG make test Andreas Färber
                   ` (3 preceding siblings ...)
  2015-04-11 18:34 ` [Qemu-devel] [PATCH for-2.3? 4/7] tests/tcg: Fix running x86_64 tests Andreas Färber
@ 2015-04-11 18:34 ` Andreas Färber
  2015-04-13 15:36   ` Alex Bennée
  2015-04-11 18:34 ` [Qemu-devel] [PATCH for-2.3? 6/7] tests/tcg: Prettify run-runcom output Andreas Färber
                   ` (3 subsequent siblings)
  8 siblings, 1 reply; 24+ messages in thread
From: Andreas Färber @ 2015-04-11 18:34 UTC (permalink / raw)
  To: qemu-devel; +Cc: peter.maydell, Andreas Färber, rth

The path had not been updated after relocating the TCG tests.

Fix this to allow executing the test via `make -C tests/tcg run-runcom`.

Signed-off-by: Andreas Färber <afaerber@suse.de>
---
 tests/tcg/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/tcg/Makefile b/tests/tcg/Makefile
index ab1055f..db8c510 100644
--- a/tests/tcg/Makefile
+++ b/tests/tcg/Makefile
@@ -74,7 +74,7 @@ run-test-mmap: test-mmap
 #	-$(QEMU) -p 32768 ./test-mmap 32768
 
 run-runcom: runcom
-	-$(QEMU) ./runcom $(SRC_PATH)/tests/pi_10.com
+	-$(QEMU) ./runcom $(SRC_PATH)/tests/tcg/pi_10.com
 
 run-test_path: test_path
 	./test_path
-- 
2.1.4

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

* [Qemu-devel] [PATCH for-2.3? 6/7] tests/tcg: Prettify run-runcom output
  2015-04-11 18:34 [Qemu-devel] [PATCH for-2.3? 0/7] tests: Fix TCG make test Andreas Färber
                   ` (4 preceding siblings ...)
  2015-04-11 18:34 ` [Qemu-devel] [PATCH for-2.3? 5/7] tests/tcg: Fix run-runcom target Andreas Färber
@ 2015-04-11 18:34 ` Andreas Färber
  2015-04-13 15:37   ` Alex Bennée
  2015-04-11 18:34 ` [Qemu-devel] [PATCH for-2.3? 7/7] tests/tcg: Enable runcom test by default Andreas Färber
                   ` (2 subsequent siblings)
  8 siblings, 1 reply; 24+ messages in thread
From: Andreas Färber @ 2015-04-11 18:34 UTC (permalink / raw)
  To: qemu-devel; +Cc: peter.maydell, Andreas Färber, rth

Executing the binary pi_10.com terminates without a trailing newline.

As it does not seem to be caused by the runcom program and since we
can't easily fix pi_10.com, add an echo after executing it. This places
"make:" output (or that of a target following it) on a new line as expected.

Signed-off-by: Andreas Färber <afaerber@suse.de>
---
 tests/tcg/Makefile | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tests/tcg/Makefile b/tests/tcg/Makefile
index db8c510..f853d54 100644
--- a/tests/tcg/Makefile
+++ b/tests/tcg/Makefile
@@ -75,6 +75,7 @@ run-test-mmap: test-mmap
 
 run-runcom: runcom
 	-$(QEMU) ./runcom $(SRC_PATH)/tests/tcg/pi_10.com
+	@echo
 
 run-test_path: test_path
 	./test_path
-- 
2.1.4

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

* [Qemu-devel] [PATCH for-2.3? 7/7] tests/tcg: Enable runcom test by default
  2015-04-11 18:34 [Qemu-devel] [PATCH for-2.3? 0/7] tests: Fix TCG make test Andreas Färber
                   ` (5 preceding siblings ...)
  2015-04-11 18:34 ` [Qemu-devel] [PATCH for-2.3? 6/7] tests/tcg: Prettify run-runcom output Andreas Färber
@ 2015-04-11 18:34 ` Andreas Färber
  2015-04-11 20:22   ` Peter Maydell
  2015-04-13 11:36 ` [Qemu-devel] [PATCH for-2.3? 0/7] tests: Fix TCG make test Peter Maydell
  2015-06-24 14:19 ` Andreas Färber
  8 siblings, 1 reply; 24+ messages in thread
From: Andreas Färber @ 2015-04-11 18:34 UTC (permalink / raw)
  To: qemu-devel; +Cc: peter.maydell, Andreas Färber, rth

The comment of it requiring root appears outdated - makes no difference.
pi_10.com terminates reproducibly with "...10559240190274216248".

Signed-off-by: Andreas Färber <afaerber@suse.de>
---
 tests/tcg/Makefile | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/tests/tcg/Makefile b/tests/tcg/Makefile
index f853d54..1ba4264 100644
--- a/tests/tcg/Makefile
+++ b/tests/tcg/Makefile
@@ -15,9 +15,6 @@ 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 \
@@ -25,7 +22,7 @@ I386_TESTS=hello-i386 \
 	   test-i386 \
 	   test-i386-fprem \
 	   test-mmap \
-	   # runcom
+	   runcom
 
 # native i386 compilers sometimes are not biarch.  assume cross-compilers are
 ifneq ($(ARCH),i386)
-- 
2.1.4

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

* Re: [Qemu-devel] [PATCH for-2.3? 7/7] tests/tcg: Enable runcom test by default
  2015-04-11 18:34 ` [Qemu-devel] [PATCH for-2.3? 7/7] tests/tcg: Enable runcom test by default Andreas Färber
@ 2015-04-11 20:22   ` Peter Maydell
  2015-04-11 20:28     ` Andreas Färber
  0 siblings, 1 reply; 24+ messages in thread
From: Peter Maydell @ 2015-04-11 20:22 UTC (permalink / raw)
  To: Andreas Färber; +Cc: QEMU Developers, Richard Henderson

On 11 April 2015 at 19:34, Andreas Färber <afaerber@suse.de> wrote:
> The comment of it requiring root appears outdated - makes no difference.

This depends on what your system has set for the tunable
/proc/sys/vm/mmap_min_addr. On my system it is 65536 (I think
Ubuntu and Debian ship like this), and in that case you can't
mmap MAP_FIXED to address zero unless you're root (tested with
a little C program that does the same mmap that runcom does).

thanks
-- PMM

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

* Re: [Qemu-devel] [PATCH for-2.3? 7/7] tests/tcg: Enable runcom test by default
  2015-04-11 20:22   ` Peter Maydell
@ 2015-04-11 20:28     ` Andreas Färber
  2015-04-11 21:33       ` Peter Maydell
  0 siblings, 1 reply; 24+ messages in thread
From: Andreas Färber @ 2015-04-11 20:28 UTC (permalink / raw)
  To: Peter Maydell; +Cc: QEMU Developers, Richard Henderson

Am 11.04.2015 um 22:22 schrieb Peter Maydell:
> On 11 April 2015 at 19:34, Andreas Färber <afaerber@suse.de> wrote:
>> The comment of it requiring root appears outdated - makes no difference.
> 
> This depends on what your system has set for the tunable
> /proc/sys/vm/mmap_min_addr. On my system it is 65536 (I think
> Ubuntu and Debian ship like this), and in that case you can't
> mmap MAP_FIXED to address zero unless you're root (tested with
> a little C program that does the same mmap that runcom does).

Hm,

$ cat /proc/sys/vm/mmap_min_addr
65536

Are you sure that QEMU / runcom / pi_10.com still try to map to that
address zero?

Regards,
Andreas

-- 
SUSE Linux GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Felix Imendörffer, Jane Smithard, Jennifer Guild, Dilip Upmanyu,
Graham Norton; HRB 21284 (AG Nürnberg)

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

* Re: [Qemu-devel] [PATCH for-2.3? 7/7] tests/tcg: Enable runcom test by default
  2015-04-11 20:28     ` Andreas Färber
@ 2015-04-11 21:33       ` Peter Maydell
  2015-04-11 21:46         ` Andreas Färber
  0 siblings, 1 reply; 24+ messages in thread
From: Peter Maydell @ 2015-04-11 21:33 UTC (permalink / raw)
  To: Andreas Färber; +Cc: QEMU Developers, Richard Henderson

On 11 April 2015 at 21:28, Andreas Färber <afaerber@suse.de> wrote:
> Are you sure that QEMU / runcom / pi_10.com still try to map to that
> address zero?

It's the first thing runcom.c's main() does after checking you've
passed it enough command line arguments.

-- PMM

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

* Re: [Qemu-devel] [PATCH for-2.3? 7/7] tests/tcg: Enable runcom test by default
  2015-04-11 21:33       ` Peter Maydell
@ 2015-04-11 21:46         ` Andreas Färber
  2015-04-12  8:34           ` Alexander Graf
  0 siblings, 1 reply; 24+ messages in thread
From: Andreas Färber @ 2015-04-11 21:46 UTC (permalink / raw)
  To: Peter Maydell; +Cc: Alexander Graf, QEMU Developers, Richard Henderson

Am 11.04.2015 um 23:33 schrieb Peter Maydell:
> On 11 April 2015 at 21:28, Andreas Färber <afaerber@suse.de> wrote:
>> Are you sure that QEMU / runcom / pi_10.com still try to map to that
>> address zero?
> 
> It's the first thing runcom.c's main() does after checking you've
> passed it enough command line arguments.

This?

    vm86_mem = mmap((void *)0x00000000, 0x110000,
                    PROT_WRITE | PROT_READ | PROT_EXEC,
                    MAP_FIXED | MAP_ANON | MAP_PRIVATE, -1, 0);
    if (vm86_mem == MAP_FAILED) {
        perror("mmap");
        exit(1);
    }

For whatever reason it does not take the MAP_FAILED path here...

But I can certainly live with dropping this patch, it's the last for a
reason. :)

Andreas

-- 
SUSE Linux GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Felix Imendörffer, Jane Smithard, Jennifer Guild, Dilip Upmanyu,
Graham Norton; HRB 21284 (AG Nürnberg)

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

* Re: [Qemu-devel] [PATCH for-2.3? 7/7] tests/tcg: Enable runcom test by default
  2015-04-11 21:46         ` Andreas Färber
@ 2015-04-12  8:34           ` Alexander Graf
  2015-04-12  8:39             ` Andreas Färber
  2015-04-12 11:45             ` Peter Maydell
  0 siblings, 2 replies; 24+ messages in thread
From: Alexander Graf @ 2015-04-12  8:34 UTC (permalink / raw)
  To: Andreas Färber; +Cc: Peter Maydell, QEMU Developers, Richard Henderson



> Am 11.04.2015 um 23:46 schrieb Andreas Färber <afaerber@suse.de>:
> 
>> Am 11.04.2015 um 23:33 schrieb Peter Maydell:
>>> On 11 April 2015 at 21:28, Andreas Färber <afaerber@suse.de> wrote:
>>> Are you sure that QEMU / runcom / pi_10.com still try to map to that
>>> address zero?
>> 
>> It's the first thing runcom.c's main() does after checking you've
>> passed it enough command line arguments.
> 
> This?
> 
>    vm86_mem = mmap((void *)0x00000000, 0x110000,
>                    PROT_WRITE | PROT_READ | PROT_EXEC,
>                    MAP_FIXED | MAP_ANON | MAP_PRIVATE, -1, 0);
>    if (vm86_mem == MAP_FAILED) {
>        perror("mmap");
>        exit(1);
>    }
> 
> For whatever reason it does not take the MAP_FAILED path here...

Wasn't a NULL argument for the address a hint saying "map wherever you please"? I also feel like I'm missing context here - what exactly is broken?

Alex

> 
> But I can certainly live with dropping this patch, it's the last for a
> reason. :)
> 
> Andreas
> 
> -- 
> SUSE Linux GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
> GF: Felix Imendörffer, Jane Smithard, Jennifer Guild, Dilip Upmanyu,
> Graham Norton; HRB 21284 (AG Nürnberg)

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

* Re: [Qemu-devel] [PATCH for-2.3? 7/7] tests/tcg: Enable runcom test by default
  2015-04-12  8:34           ` Alexander Graf
@ 2015-04-12  8:39             ` Andreas Färber
  2015-04-12 11:45             ` Peter Maydell
  1 sibling, 0 replies; 24+ messages in thread
From: Andreas Färber @ 2015-04-12  8:39 UTC (permalink / raw)
  To: Alexander Graf; +Cc: Peter Maydell, QEMU Developers, Richard Henderson

Am 12.04.2015 um 10:34 schrieb Alexander Graf:
>> Am 11.04.2015 um 23:46 schrieb Andreas Färber <afaerber@suse.de>:
>>
>>> Am 11.04.2015 um 23:33 schrieb Peter Maydell:
>>>> On 11 April 2015 at 21:28, Andreas Färber <afaerber@suse.de> wrote:
>>>> Are you sure that QEMU / runcom / pi_10.com still try to map to that
>>>> address zero?
>>>
>>> It's the first thing runcom.c's main() does after checking you've
>>> passed it enough command line arguments.
>>
>> This?
>>
>>    vm86_mem = mmap((void *)0x00000000, 0x110000,
>>                    PROT_WRITE | PROT_READ | PROT_EXEC,
>>                    MAP_FIXED | MAP_ANON | MAP_PRIVATE, -1, 0);
>>    if (vm86_mem == MAP_FAILED) {
>>        perror("mmap");
>>        exit(1);
>>    }
>>
>> For whatever reason it does not take the MAP_FAILED path here...
> 
> Wasn't a NULL argument for the address a hint saying "map wherever you please"? I also feel like I'm missing context here - what exactly is broken?

Sorry for CC'ing you so late, I believe you and rth had been fiddling
with guest bases and that stuff back in the day... Please just take a
look at the whole series, in particular patches 3 and 7.

Thanks,
Andreas

-- 
SUSE Linux GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Felix Imendörffer, Jane Smithard, Jennifer Guild, Dilip Upmanyu,
Graham Norton; HRB 21284 (AG Nürnberg)

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

* Re: [Qemu-devel] [PATCH for-2.3? 7/7] tests/tcg: Enable runcom test by default
  2015-04-12  8:34           ` Alexander Graf
  2015-04-12  8:39             ` Andreas Färber
@ 2015-04-12 11:45             ` Peter Maydell
  1 sibling, 0 replies; 24+ messages in thread
From: Peter Maydell @ 2015-04-12 11:45 UTC (permalink / raw)
  To: Alexander Graf; +Cc: Richard Henderson, Andreas Färber, QEMU Developers

On 12 April 2015 at 09:34, Alexander Graf <agraf@suse.de> wrote:
>
>
>> Am 11.04.2015 um 23:46 schrieb Andreas Färber <afaerber@suse.de>:
>>
>>> Am 11.04.2015 um 23:33 schrieb Peter Maydell:
>>>> On 11 April 2015 at 21:28, Andreas Färber <afaerber@suse.de> wrote:
>>>> Are you sure that QEMU / runcom / pi_10.com still try to map to that
>>>> address zero?
>>>
>>> It's the first thing runcom.c's main() does after checking you've
>>> passed it enough command line arguments.
>>
>> This?
>>
>>    vm86_mem = mmap((void *)0x00000000, 0x110000,
>>                    PROT_WRITE | PROT_READ | PROT_EXEC,
>>                    MAP_FIXED | MAP_ANON | MAP_PRIVATE, -1, 0);
>>    if (vm86_mem == MAP_FAILED) {
>>        perror("mmap");
>>        exit(1);
>>    }
>>
>> For whatever reason it does not take the MAP_FAILED path here...
>
> Wasn't a NULL argument for the address a hint saying "map wherever
> you please"?

Only if you don't also say MAP_FIXED.

That aside, I've now looked more carefully at the makefile,
and we're not running 'runcom' directly, we're running it
within QEMU's user-mode. So a guest allocation at vaddr 0
isn't going to turn into a host mmap at vaddr 0 (we actually
query the host mmap_min_addr parameter in linux-user/main.c).

So I think the issue noted in the comment on the makefile
(back in 2010) would have been a bug which we've presumably
fixed in the meantime by adding support for guest_base and
making sure it works correctly. (Looking at the revision
log suggests that guest_base should in theory have already
supported adjustment based on mmap_min_addr at the point
when runcom was taken out of the makefile, but presumably
there was a bug.)

-- PMM

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

* Re: [Qemu-devel] [PATCH for-2.3? 0/7] tests: Fix TCG make test
  2015-04-11 18:34 [Qemu-devel] [PATCH for-2.3? 0/7] tests: Fix TCG make test Andreas Färber
                   ` (6 preceding siblings ...)
  2015-04-11 18:34 ` [Qemu-devel] [PATCH for-2.3? 7/7] tests/tcg: Enable runcom test by default Andreas Färber
@ 2015-04-13 11:36 ` Peter Maydell
  2015-04-13 14:00   ` Peter Maydell
  2015-06-24 14:19 ` Andreas Färber
  8 siblings, 1 reply; 24+ messages in thread
From: Peter Maydell @ 2015-04-13 11:36 UTC (permalink / raw)
  To: Andreas Färber; +Cc: QEMU Developers, Richard Henderson

On 11 April 2015 at 19:34, Andreas Färber <afaerber@suse.de> wrote:
> Hello,
>
> In my quest to improve our test coverage, in light of the recent cpu_copy() breakage,
> I've taken a stab at make test and actually managed to get most of it to work on x86_64.

Thanks for tackling this cleanup; to answer the question
in the subject, I think that at this point in the release
cycle and given that 'make test' has always been somewhere
between flaky and broken we should not put this in 2.3.

-- PMM

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

* Re: [Qemu-devel] [PATCH for-2.3? 1/7] tests/tcg: Fix test_path build
  2015-04-11 18:34 ` [Qemu-devel] [PATCH for-2.3? 1/7] tests/tcg: Fix test_path build Andreas Färber
@ 2015-04-13 11:57   ` Alex Bennée
  0 siblings, 0 replies; 24+ messages in thread
From: Alex Bennée @ 2015-04-13 11:57 UTC (permalink / raw)
  To: Andreas Färber; +Cc: peter.maydell, qemu-devel, rth


Andreas Färber <afaerber@suse.de> writes:

> tests/tcg/test_path.c incorporates source files that rely on GLib.
> Add GLIB_CFLAGS to QEMU_CFLAGS to fix the build.
>
> Signed-off-by: Andreas Färber <afaerber@suse.de>

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>

> ---
>  tests/tcg/Makefile | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/tests/tcg/Makefile b/tests/tcg/Makefile
> index 89e3342..64f661a 100644
> --- a/tests/tcg/Makefile
> +++ b/tests/tcg/Makefile
> @@ -10,6 +10,7 @@ CC_X86_64=$(CC_I386) -m64
>  QEMU_INCLUDES += -I../..
>  CFLAGS=-Wall -O2 -g -fno-strict-aliasing
>  #CFLAGS+=-msse2
> +QEMU_CFLAGS += $(GLIB_CFLAGS)
>  LDFLAGS=
>  
>  # TODO: automatically detect ARM and MIPS compilers, and run those too

-- 
Alex Bennée

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

* Re: [Qemu-devel] [PATCH for-2.3? 0/7] tests: Fix TCG make test
  2015-04-13 11:36 ` [Qemu-devel] [PATCH for-2.3? 0/7] tests: Fix TCG make test Peter Maydell
@ 2015-04-13 14:00   ` Peter Maydell
  0 siblings, 0 replies; 24+ messages in thread
From: Peter Maydell @ 2015-04-13 14:00 UTC (permalink / raw)
  To: Andreas Färber; +Cc: QEMU Developers, Richard Henderson

On 13 April 2015 at 12:36, Peter Maydell <peter.maydell@linaro.org> wrote:
> On 11 April 2015 at 19:34, Andreas Färber <afaerber@suse.de> wrote:
>> Hello,
>>
>> In my quest to improve our test coverage, in light of the recent cpu_copy() breakage,
>> I've taken a stab at make test and actually managed to get most of it to work on x86_64.
>
> Thanks for tackling this cleanup; to answer the question
> in the subject, I think that at this point in the release
> cycle and given that 'make test' has always been somewhere
> between flaky and broken we should not put this in 2.3.

[summary of a comment from IRC]
Also, even with this patchset it looks like obvious test failures
(eg "reference output differs from actual" and "test segvs")
don't turn into "'make test' returns an error status, so it
doesn't seem to me that "make test" is actually testing
anything usefully at all. I would favour for 2.3 sticking
with our current approach (viz, telling people to use 'make
check', not 'make test'), and for 2.4 trying to integrate
these tests into 'make check', fixing them up in the
process.

thanks
-- PMM

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

* Re: [Qemu-devel] [PATCH for-2.3? 2/7] tests/tcg: Fix linux-test build
  2015-04-11 18:34 ` [Qemu-devel] [PATCH for-2.3? 2/7] tests/tcg: Fix linux-test build Andreas Färber
@ 2015-04-13 15:34   ` Alex Bennée
  0 siblings, 0 replies; 24+ messages in thread
From: Alex Bennée @ 2015-04-13 15:34 UTC (permalink / raw)
  To: Andreas Färber; +Cc: peter.maydell, qemu-devel, rth


Andreas Färber <afaerber@suse.de> writes:

> Include a missing system header for struct rusage / getrusage().
>
> Signed-off-by: Andreas Färber <afaerber@suse.de>

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>

> ---
>  tests/tcg/linux-test.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/tests/tcg/linux-test.c b/tests/tcg/linux-test.c
> index 1c6c013..15c9d7f 100644
> --- a/tests/tcg/linux-test.c
> +++ b/tests/tcg/linux-test.c
> @@ -39,6 +39,7 @@
>  #include <dirent.h>
>  #include <setjmp.h>
>  #include <sys/shm.h>
> +#include <sys/resource.h>
>  
>  #define TESTPATH "/tmp/linux-test.tmp"
>  #define TESTPORT 7654

-- 
Alex Bennée

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

* Re: [Qemu-devel] [PATCH for-2.3? 4/7] tests/tcg: Fix running x86_64 tests
  2015-04-11 18:34 ` [Qemu-devel] [PATCH for-2.3? 4/7] tests/tcg: Fix running x86_64 tests Andreas Färber
@ 2015-04-13 15:35   ` Alex Bennée
  0 siblings, 0 replies; 24+ messages in thread
From: Alex Bennée @ 2015-04-13 15:35 UTC (permalink / raw)
  To: Andreas Färber; +Cc: peter.maydell, qemu-devel, rth


Andreas Färber <afaerber@suse.de> writes:

> When ARCH != i386, the wrong test target was being added to the list of
> tests to run. Fix this to have test-x86_64 run as well.
>
> Note that test-x86_64 produces two build warnings on gcc 4.8.3, but we
> don't use -Werror for these tests:
>
>   test-i386.c:2110:1: warning: specifying vector types with __attribute__ ((mode)) is deprecated [-Wattributes]
>    typedef int __m64 __attribute__ ((__mode__ (__V2SI__)));
>   test-i386.c:2110:1: warning: use __attribute__ ((vector_size)) instead [-Wattributes]
>
>   test-i386.c:2111:1: warning: specifying vector types with __attribute__ ((mode)) is deprecated [-Wattributes]
>    typedef float __m128 __attribute__ ((__mode__(__V4SF__)));
>   test-i386.c:2111:1: warning: use __attribute__ ((vector_size)) instead [-Wattributes]
>
> Signed-off-by: Andreas Färber <afaerber@suse.de>

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>

> ---
>  tests/tcg/Makefile | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tests/tcg/Makefile b/tests/tcg/Makefile
> index d79e0bb..ab1055f 100644
> --- a/tests/tcg/Makefile
> +++ b/tests/tcg/Makefile
> @@ -29,7 +29,7 @@ I386_TESTS=hello-i386 \
>  
>  # native i386 compilers sometimes are not biarch.  assume cross-compilers are
>  ifneq ($(ARCH),i386)
> -I386_TESTS+=run-test-x86_64
> +I386_TESTS+=test-x86_64
>  endif
>  
>  TESTS = test_path

-- 
Alex Bennée

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

* Re: [Qemu-devel] [PATCH for-2.3? 5/7] tests/tcg: Fix run-runcom target
  2015-04-11 18:34 ` [Qemu-devel] [PATCH for-2.3? 5/7] tests/tcg: Fix run-runcom target Andreas Färber
@ 2015-04-13 15:36   ` Alex Bennée
  0 siblings, 0 replies; 24+ messages in thread
From: Alex Bennée @ 2015-04-13 15:36 UTC (permalink / raw)
  To: Andreas Färber; +Cc: peter.maydell, qemu-devel, rth


Andreas Färber <afaerber@suse.de> writes:

> The path had not been updated after relocating the TCG tests.
>
> Fix this to allow executing the test via `make -C tests/tcg run-runcom`.
>
> Signed-off-by: Andreas Färber <afaerber@suse.de>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>

> ---
>  tests/tcg/Makefile | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tests/tcg/Makefile b/tests/tcg/Makefile
> index ab1055f..db8c510 100644
> --- a/tests/tcg/Makefile
> +++ b/tests/tcg/Makefile
> @@ -74,7 +74,7 @@ run-test-mmap: test-mmap
>  #	-$(QEMU) -p 32768 ./test-mmap 32768
>  
>  run-runcom: runcom
> -	-$(QEMU) ./runcom $(SRC_PATH)/tests/pi_10.com
> +	-$(QEMU) ./runcom $(SRC_PATH)/tests/tcg/pi_10.com
>  
>  run-test_path: test_path
>  	./test_path

-- 
Alex Bennée

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

* Re: [Qemu-devel] [PATCH for-2.3? 6/7] tests/tcg: Prettify run-runcom output
  2015-04-11 18:34 ` [Qemu-devel] [PATCH for-2.3? 6/7] tests/tcg: Prettify run-runcom output Andreas Färber
@ 2015-04-13 15:37   ` Alex Bennée
  2015-04-13 15:38     ` Peter Maydell
  0 siblings, 1 reply; 24+ messages in thread
From: Alex Bennée @ 2015-04-13 15:37 UTC (permalink / raw)
  To: Andreas Färber; +Cc: peter.maydell, qemu-devel, rth


Andreas Färber <afaerber@suse.de> writes:

> Executing the binary pi_10.com terminates without a trailing newline.
>
> As it does not seem to be caused by the runcom program and since we
> can't easily fix pi_10.com, add an echo after executing it. This places
> "make:" output (or that of a target following it) on a new line as expected.
>
> Signed-off-by: Andreas Färber <afaerber@suse.de>
> ---
>  tests/tcg/Makefile | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/tests/tcg/Makefile b/tests/tcg/Makefile
> index db8c510..f853d54 100644
> --- a/tests/tcg/Makefile
> +++ b/tests/tcg/Makefile
> @@ -75,6 +75,7 @@ run-test-mmap: test-mmap
>  
>  run-runcom: runcom
>  	-$(QEMU) ./runcom $(SRC_PATH)/tests/tcg/pi_10.com
> +	@echo

I'm not so sure about this. Shouldn't we be being a lot quieter by
default. At the moment the TCG tests are very noisy with their output
compared to the rest of the tests. On a V=0 run I expect just to see
test name and a PASS/FAIL.

>  
>  run-test_path: test_path
>  	./test_path

-- 
Alex Bennée

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

* Re: [Qemu-devel] [PATCH for-2.3? 6/7] tests/tcg: Prettify run-runcom output
  2015-04-13 15:37   ` Alex Bennée
@ 2015-04-13 15:38     ` Peter Maydell
  0 siblings, 0 replies; 24+ messages in thread
From: Peter Maydell @ 2015-04-13 15:38 UTC (permalink / raw)
  To: Alex Bennée; +Cc: Richard Henderson, Andreas Färber, QEMU Developers

On 13 April 2015 at 16:37, Alex Bennée <alex.bennee@linaro.org> wrote:
> I'm not so sure about this. Shouldn't we be being a lot quieter by
> default. At the moment the TCG tests are very noisy with their output
> compared to the rest of the tests. On a V=0 run I expect just to see
> test name and a PASS/FAIL.

Yes, this test needs to be much quieter about what it's doing.
It also takes about an order of magnitude too long to
execute for a test case.

-- PMM

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

* Re: [Qemu-devel] [PATCH for-2.3? 0/7] tests: Fix TCG make test
  2015-04-11 18:34 [Qemu-devel] [PATCH for-2.3? 0/7] tests: Fix TCG make test Andreas Färber
                   ` (7 preceding siblings ...)
  2015-04-13 11:36 ` [Qemu-devel] [PATCH for-2.3? 0/7] tests: Fix TCG make test Peter Maydell
@ 2015-06-24 14:19 ` Andreas Färber
  8 siblings, 0 replies; 24+ messages in thread
From: Andreas Färber @ 2015-06-24 14:19 UTC (permalink / raw)
  To: qemu-devel, peter.maydell; +Cc: Marc-André Lureau, rth

Am 11.04.2015 um 20:34 schrieb Andreas Färber:
> Hello,
> 
> In my quest to improve our test coverage, in light of the recent cpu_copy() breakage,
> I've taken a stab at make test and actually managed to get most of it to work on x86_64.
> 
> Regards,
> Andreas

Ping for 2.4. CC'ing Marc-André.

> 
> Andreas Färber (7):
>   tests/tcg: Fix test_path build
>   tests/tcg: Fix linux-test build
>   tests/tcg: Disable hanging test-mmap runs
>   tests/tcg: Fix running x86_64 tests
>   tests/tcg: Fix run-runcom target
>   tests/tcg: Prettify run-runcom output
>   tests/tcg: Enable runcom test by default
> 
>  tests/tcg/Makefile     | 17 ++++++++---------
>  tests/tcg/linux-test.c |  1 +
>  2 files changed, 9 insertions(+), 9 deletions(-)
> 


-- 
SUSE Linux GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Felix Imendörffer, Jane Smithard, Dilip Upmanyu, Graham Norton; HRB
21284 (AG Nürnberg)

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

end of thread, other threads:[~2015-06-24 14:19 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-11 18:34 [Qemu-devel] [PATCH for-2.3? 0/7] tests: Fix TCG make test Andreas Färber
2015-04-11 18:34 ` [Qemu-devel] [PATCH for-2.3? 1/7] tests/tcg: Fix test_path build Andreas Färber
2015-04-13 11:57   ` Alex Bennée
2015-04-11 18:34 ` [Qemu-devel] [PATCH for-2.3? 2/7] tests/tcg: Fix linux-test build Andreas Färber
2015-04-13 15:34   ` Alex Bennée
2015-04-11 18:34 ` [Qemu-devel] [PATCH for-2.3? 3/7] tests/tcg: Disable hanging test-mmap runs Andreas Färber
2015-04-11 18:34 ` [Qemu-devel] [PATCH for-2.3? 4/7] tests/tcg: Fix running x86_64 tests Andreas Färber
2015-04-13 15:35   ` Alex Bennée
2015-04-11 18:34 ` [Qemu-devel] [PATCH for-2.3? 5/7] tests/tcg: Fix run-runcom target Andreas Färber
2015-04-13 15:36   ` Alex Bennée
2015-04-11 18:34 ` [Qemu-devel] [PATCH for-2.3? 6/7] tests/tcg: Prettify run-runcom output Andreas Färber
2015-04-13 15:37   ` Alex Bennée
2015-04-13 15:38     ` Peter Maydell
2015-04-11 18:34 ` [Qemu-devel] [PATCH for-2.3? 7/7] tests/tcg: Enable runcom test by default Andreas Färber
2015-04-11 20:22   ` Peter Maydell
2015-04-11 20:28     ` Andreas Färber
2015-04-11 21:33       ` Peter Maydell
2015-04-11 21:46         ` Andreas Färber
2015-04-12  8:34           ` Alexander Graf
2015-04-12  8:39             ` Andreas Färber
2015-04-12 11:45             ` Peter Maydell
2015-04-13 11:36 ` [Qemu-devel] [PATCH for-2.3? 0/7] tests: Fix TCG make test Peter Maydell
2015-04-13 14:00   ` Peter Maydell
2015-06-24 14:19 ` Andreas Färber

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.