All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v5 00/19] Cleanup of TCG tests
@ 2016-12-01  5:14 Pranith Kumar
  2016-12-01  5:14 ` [Qemu-devel] [PATCH 01/19] linux-user: fix settime old value location Pranith Kumar
                   ` (19 more replies)
  0 siblings, 20 replies; 32+ messages in thread
From: Pranith Kumar @ 2016-12-01  5:14 UTC (permalink / raw)
  To: alex.bennee; +Cc: qemu-devel, rth

Hello,

This patch series cleans up the tcg tests in tests/tcg folder.

The tests have bit-rotten and were not compiling or running. I fixed
the Makefiles to make them compile though there are tests which do not
pass.

The motivation is to add litmus tests to each arch and have them run
using the 'make check' target to test consistency on TCG.

There are no maintainers listed for this test folder. So I am cc'ing
people who I think might be interested.

The tests are hooked to the 'tests-tcg' target. Alternatively, as
suggested by Alex Bennee you can run a tcg tests for a particular arch
from the build/<arch>-linux-user/tests directory as follows:

$ CROSS_CC=<cross-compiler> make -f ../../tests/tcg/<arch>/Makefile

Thanks,
--
Pranith

Marc-André Lureau (9):
  linux-user: fix settime old value location
  linux-user: fix tcg/mmap test
  check-help: add some hint to run a single test
  tests/tcg: comment unused code
  tests/tcg: declare some functions as static
  linux-test: fix build
  linux-test: fix set/getitimer returned timer check
  Fix test-i386-fprem compilation
  test-i386: modernize vector code v4sf

Pranith Kumar (10):
  tests/tcg: Move arm tests to arch specific folder
  tests/tcg: Move mips test to arch specific folder
  tests/tcg: Add tests-tcg hook in Makefile
  tests/tcg/i386: Fix hello-i386 test
  tests/tcg: Move i386 tests to arch specific folder
  tests/tcg/i386: Fix test-i386 compilation
  tests/tcg: Fix compilation of linux-test.c
  tests/tcg: Move arch independent tests to misc directory
  tests/tcg: Add and update Makefiles
  tests/tcg: test-i386.c: Fix format warnings

 linux-user/mmap.c                       |  27 +++---
 linux-user/syscall.c                    |   2 +-
 tests/Makefile.include                  |   2 +
 tests/tcg/Makefile                      | 156 --------------------------------
 tests/tcg/Makefile.include              |  33 +++++++
 tests/tcg/alpha/Makefile                |  38 +++++---
 tests/tcg/arm/Makefile                  |  51 +++++++++++
 tests/tcg/{ => arm}/hello-arm.c         |   0
 tests/tcg/{ => arm}/test-arm-iwmmxt.s   |   0
 tests/tcg/cris/Makefile                 |  17 +++-
 tests/tcg/i386/Makefile                 |  87 ++++++++++++++++++
 tests/tcg/{ => i386}/hello-i386.c       |   9 +-
 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  |  10 +-
 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        |   7 +-
 tests/tcg/{ => i386}/test-i386.h        |   0
 tests/tcg/lm32/Makefile                 |  17 +++-
 tests/tcg/mips/Makefile                 |  46 ++++++++++
 tests/tcg/{ => mips}/hello-mips.c       |   0
 tests/tcg/mips/mips32-dsp/Makefile      |  17 +++-
 tests/tcg/mips/mips32-dspr2/Makefile    |  17 +++-
 tests/tcg/mips/mips64-dsp/Makefile      |  18 +++-
 tests/tcg/mips/mips64-dspr2/Makefile    |  17 +++-
 tests/tcg/misc/Makefile                 |  81 +++++++++++++++++
 tests/tcg/{ => misc}/linux-test.c       |  57 +++++++-----
 tests/tcg/{ => misc}/sha1.c             |   0
 tests/tcg/{ => misc}/test-mmap.c        |   2 +-
 tests/tcg/{ => misc}/test_path.c        |   0
 tests/tcg/{ => misc}/testthread.c       |   0
 tests/tcg/openrisc/Makefile             |  19 +++-
 tests/tcg/xtensa/Makefile               |  17 +++-
 37 files changed, 518 insertions(+), 229 deletions(-)
 delete mode 100644 tests/tcg/Makefile
 create mode 100644 tests/tcg/Makefile.include
 create mode 100644 tests/tcg/arm/Makefile
 rename tests/tcg/{ => arm}/hello-arm.c (100%)
 rename tests/tcg/{ => arm}/test-arm-iwmmxt.s (100%)
 create mode 100644 tests/tcg/i386/Makefile
 rename tests/tcg/{ => i386}/hello-i386.c (72%)
 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 (98%)
 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 (99%)
 rename tests/tcg/{ => i386}/test-i386.h (100%)
 create mode 100644 tests/tcg/mips/Makefile
 rename tests/tcg/{ => mips}/hello-mips.c (100%)
 create mode 100644 tests/tcg/misc/Makefile
 rename tests/tcg/{ => misc}/linux-test.c (90%)
 rename tests/tcg/{ => misc}/sha1.c (100%)
 rename tests/tcg/{ => misc}/test-mmap.c (99%)
 rename tests/tcg/{ => misc}/test_path.c (100%)
 rename tests/tcg/{ => misc}/testthread.c (100%)

-- 
2.10.2

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

* [Qemu-devel] [PATCH 01/19] linux-user: fix settime old value location
  2016-12-01  5:14 [Qemu-devel] [PATCH v5 00/19] Cleanup of TCG tests Pranith Kumar
@ 2016-12-01  5:14 ` Pranith Kumar
  2016-12-09 17:01   ` Alex Bennée
  2016-12-10 11:22   ` Laurent Vivier
  2016-12-01  5:14 ` [Qemu-devel] [PATCH 02/19] linux-user: fix tcg/mmap test Pranith Kumar
                   ` (18 subsequent siblings)
  19 siblings, 2 replies; 32+ messages in thread
From: Pranith Kumar @ 2016-12-01  5:14 UTC (permalink / raw)
  To: alex.bennee; +Cc: qemu-devel, rth, Marc-André Lureau

From: Marc-André Lureau <marcandre.lureau@redhat.com>

old_value is the 4th argument of timer_settime(), not the 2nd.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Pranith Kumar <bobby.prani@gmail.com>
---
 linux-user/syscall.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 7b77503..5bd477a 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -12027,7 +12027,7 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,
             target_to_host_itimerspec(&hspec_new, arg3);
             ret = get_errno(
                           timer_settime(htimer, arg2, &hspec_new, &hspec_old));
-            host_to_target_itimerspec(arg2, &hspec_old);
+            host_to_target_itimerspec(arg4, &hspec_old);
         }
         break;
     }
-- 
2.10.2

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

* [Qemu-devel] [PATCH 02/19] linux-user: fix tcg/mmap test
  2016-12-01  5:14 [Qemu-devel] [PATCH v5 00/19] Cleanup of TCG tests Pranith Kumar
  2016-12-01  5:14 ` [Qemu-devel] [PATCH 01/19] linux-user: fix settime old value location Pranith Kumar
@ 2016-12-01  5:14 ` Pranith Kumar
  2016-12-09 17:12   ` Alex Bennée
  2016-12-10 14:08   ` Laurent Vivier
  2016-12-01  5:14 ` [Qemu-devel] [PATCH 03/19] check-help: add some hint to run a single test Pranith Kumar
                   ` (17 subsequent siblings)
  19 siblings, 2 replies; 32+ messages in thread
From: Pranith Kumar @ 2016-12-01  5:14 UTC (permalink / raw)
  To: alex.bennee; +Cc: qemu-devel, rth, Marc-André Lureau

From: Marc-André Lureau <marcandre.lureau@redhat.com>

tests/tcg/mmap test fails with values other than default target page
size. When creating a map beyond EOF, extra anonymous pages are added up
to the target page boundary. Currently, this operation is performed only
when qemu_real_host_page_size < TARGET_PAGE_SIZE, but it should be
performed if the configured page size (qemu -p) is larger than
qemu_real_host_page_size too.

(also fixes some style issues to please checkpatch)

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Pranith Kumar <bobby.prani@gmail.com>
---
 linux-user/mmap.c | 27 ++++++++++++++-------------
 1 file changed, 14 insertions(+), 13 deletions(-)

diff --git a/linux-user/mmap.c b/linux-user/mmap.c
index 61685bf..0794a43 100644
--- a/linux-user/mmap.c
+++ b/linux-user/mmap.c
@@ -418,31 +418,32 @@ abi_long target_mmap(abi_ulong start, abi_ulong len, int prot,
     }
 
     /* When mapping files into a memory area larger than the file, accesses
-       to pages beyond the file size will cause a SIGBUS. 
+       to pages beyond the file size will cause a SIGBUS.
 
        For example, if mmaping a file of 100 bytes on a host with 4K pages
        emulating a target with 8K pages, the target expects to be able to
        access the first 8K. But the host will trap us on any access beyond
-       4K.  
+       4K.
 
        When emulating a target with a larger page-size than the hosts, we
        may need to truncate file maps at EOF and add extra anonymous pages
        up to the targets page boundary.  */
 
-    if ((qemu_real_host_page_size < TARGET_PAGE_SIZE)
-        && !(flags & MAP_ANONYMOUS)) {
-       struct stat sb;
+    if ((qemu_real_host_page_size < qemu_host_page_size) &&
+        !(flags & MAP_ANONYMOUS)) {
+        struct stat sb;
 
-       if (fstat (fd, &sb) == -1)
-           goto fail;
+        if (fstat(fd, &sb) == -1) {
+            goto fail;
+        }
 
        /* Are we trying to create a map beyond EOF?.  */
-       if (offset + len > sb.st_size) {
-           /* If so, truncate the file map at eof aligned with 
-              the hosts real pagesize. Additional anonymous maps
-              will be created beyond EOF.  */
-           len = REAL_HOST_PAGE_ALIGN(sb.st_size - offset);
-       }
+        if (offset + len > sb.st_size) {
+            /* If so, truncate the file map at eof aligned with
+               the hosts real pagesize. Additional anonymous maps
+               will be created beyond EOF.  */
+            len = REAL_HOST_PAGE_ALIGN(sb.st_size - offset);
+        }
     }
 
     if (!(flags & MAP_FIXED)) {
-- 
2.10.2

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

* [Qemu-devel] [PATCH 03/19] check-help: add some hint to run a single test
  2016-12-01  5:14 [Qemu-devel] [PATCH v5 00/19] Cleanup of TCG tests Pranith Kumar
  2016-12-01  5:14 ` [Qemu-devel] [PATCH 01/19] linux-user: fix settime old value location Pranith Kumar
  2016-12-01  5:14 ` [Qemu-devel] [PATCH 02/19] linux-user: fix tcg/mmap test Pranith Kumar
@ 2016-12-01  5:14 ` Pranith Kumar
  2016-12-09 17:14   ` Alex Bennée
  2016-12-01  5:14 ` [Qemu-devel] [PATCH 04/19] tests/tcg: comment unused code Pranith Kumar
                   ` (16 subsequent siblings)
  19 siblings, 1 reply; 32+ messages in thread
From: Pranith Kumar @ 2016-12-01  5:14 UTC (permalink / raw)
  To: alex.bennee; +Cc: qemu-devel, rth, Marc-André Lureau

From: Marc-André Lureau <marcandre.lureau@redhat.com>

It's possible to run the test directly, tests/test-foo, but then
recompilation is not triggered and test environment variables aren't set
for you.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Pranith Kumar <bobby.prani@gmail.com>
---
 tests/Makefile.include | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tests/Makefile.include b/tests/Makefile.include
index e98d3b6..2a2b78d 100644
--- a/tests/Makefile.include
+++ b/tests/Makefile.include
@@ -731,6 +731,7 @@ check-help:
 	@echo " make check-qtest-TARGET   Run qtest tests for given target"
 	@echo " make check-qtest          Run qtest tests"
 	@echo " make check-unit           Run qobject tests"
+	@echo " make check-tests/test-foo Run the tests/test-foo unit test only"
 	@echo " make check-qapi-schema    Run QAPI schema tests"
 	@echo " make check-block          Run block tests"
 	@echo " make check-report.html    Generates an HTML test report"
-- 
2.10.2

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

* [Qemu-devel] [PATCH 04/19] tests/tcg: comment unused code
  2016-12-01  5:14 [Qemu-devel] [PATCH v5 00/19] Cleanup of TCG tests Pranith Kumar
                   ` (2 preceding siblings ...)
  2016-12-01  5:14 ` [Qemu-devel] [PATCH 03/19] check-help: add some hint to run a single test Pranith Kumar
@ 2016-12-01  5:14 ` Pranith Kumar
  2016-12-09 17:15   ` Alex Bennée
  2016-12-01  5:14 ` [Qemu-devel] [PATCH 06/19] linux-test: fix build Pranith Kumar
                   ` (15 subsequent siblings)
  19 siblings, 1 reply; 32+ messages in thread
From: Pranith Kumar @ 2016-12-01  5:14 UTC (permalink / raw)
  To: alex.bennee; +Cc: qemu-devel, rth, Marc-André Lureau

From: Marc-André Lureau <marcandre.lureau@redhat.com>

I didn't remove it, as suggest by checkpatch, because it looks like it
may eventually be restored back.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Pranith Kumar <bobby.prani@gmail.com>
---
 tests/tcg/linux-test.c      | 8 ++++++--
 tests/tcg/test-i386-fprem.c | 4 ++++
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/tests/tcg/linux-test.c b/tests/tcg/linux-test.c
index 5070d31..38d163c 100644
--- a/tests/tcg/linux-test.c
+++ b/tests/tcg/linux-test.c
@@ -350,6 +350,7 @@ void test_socket(void)
 
 #define WCOUNT_MAX 512
 
+#if 0
 void test_pipe(void)
 {
     fd_set rfds, wfds;
@@ -421,11 +422,13 @@ void test_clone(void)
 
     stack1 = malloc(STACK_SIZE);
     pid1 = chk_error(clone(thread1_func, stack1 + STACK_SIZE,
-                           CLONE_VM | CLONE_FS | CLONE_FILES | SIGCHLD, "hello1"));
+                           CLONE_VM | CLONE_FS | CLONE_FILES |
+                           SIGCHLD, (void *)"hello1"));
 
     stack2 = malloc(STACK_SIZE);
     pid2 = chk_error(clone(thread2_func, stack2 + STACK_SIZE,
-                           CLONE_VM | CLONE_FS | CLONE_FILES | SIGCHLD, "hello2"));
+                           CLONE_VM | CLONE_FS | CLONE_FILES | SIGCHLD,
+                           (void *)"hello2"));
 
     while (waitpid(pid1, &status1, 0) != pid1);
     free(stack1);
@@ -435,6 +438,7 @@ void test_clone(void)
         thread2_res != 6)
         error("clone");
 }
+#endif
 
 /***********************************/
 
diff --git a/tests/tcg/test-i386-fprem.c b/tests/tcg/test-i386-fprem.c
index 1a71623..1a2b144 100644
--- a/tests/tcg/test-i386-fprem.c
+++ b/tests/tcg/test-i386-fprem.c
@@ -54,6 +54,7 @@ union float80u {
 
 #define IEEE854_LONG_DOUBLE_BIAS 0x3fff
 
+#if 0
 static const union float80u q_nan = {
     .ieee_nan.negative = 0,  /* X */
     .ieee_nan.exponent = 0x7fff,
@@ -61,6 +62,7 @@ static const union float80u q_nan = {
     .ieee_nan.quiet_nan = 1,
     .ieee_nan.mantissa = 0,
 };
+#endif
 
 static const union float80u s_nan = {
     .ieee_nan.negative = 0,  /* X */
@@ -91,12 +93,14 @@ static const union float80u pos_denorm = {
     .ieee.mantissa = 1,
 };
 
+#if 0
 static const union float80u smallest_positive_norm = {
     .ieee.negative = 0,
     .ieee.exponent = 1,
     .ieee.one = 1,
     .ieee.mantissa = 0,
 };
+#endif
 
 static void fninit()
 {
-- 
2.10.2

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

* [Qemu-devel] [PATCH 06/19] linux-test: fix build
  2016-12-01  5:14 [Qemu-devel] [PATCH v5 00/19] Cleanup of TCG tests Pranith Kumar
                   ` (3 preceding siblings ...)
  2016-12-01  5:14 ` [Qemu-devel] [PATCH 04/19] tests/tcg: comment unused code Pranith Kumar
@ 2016-12-01  5:14 ` Pranith Kumar
  2016-12-01  5:14 ` [Qemu-devel] [PATCH 07/19] linux-test: fix set/getitimer returned timer check Pranith Kumar
                   ` (14 subsequent siblings)
  19 siblings, 0 replies; 32+ messages in thread
From: Pranith Kumar @ 2016-12-01  5:14 UTC (permalink / raw)
  To: alex.bennee; +Cc: qemu-devel, rth, Marc-André Lureau

From: Marc-André Lureau <marcandre.lureau@redhat.com>

- QEMU_INCLUDES because it uses qemu/include
- stdbool, for the bool usage
- sys/resource.h for rusage and friends
- qemu/compiler.h because it is no longer included in fprintf-fn.h
  (we may want to include it from qemu/cutils.h instead)

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Pranith Kumar <bobby.prani@gmail.com>
---
 tests/tcg/Makefile     | 2 +-
 tests/tcg/linux-test.c | 3 +++
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/tests/tcg/Makefile b/tests/tcg/Makefile
index 89e3342..d1557c2 100644
--- a/tests/tcg/Makefile
+++ b/tests/tcg/Makefile
@@ -106,7 +106,7 @@ test-x86_64: test-i386.c \
 
 # generic Linux and CPU test
 linux-test: linux-test.c
-	$(CC_I386) $(CFLAGS) $(LDFLAGS) -o $@ $< -lm
+	$(CC_I386) $(QEMU_INCLUDES) $(CFLAGS) $(LDFLAGS) -o $@ $< -lm
 
 # vm86 test
 runcom: runcom.c
diff --git a/tests/tcg/linux-test.c b/tests/tcg/linux-test.c
index b46a1c4..65fca30 100644
--- a/tests/tcg/linux-test.c
+++ b/tests/tcg/linux-test.c
@@ -17,6 +17,7 @@
  *  along with this program; if not, see <http://www.gnu.org/licenses/>.
  */
 #define _GNU_SOURCE
+#include <stdbool.h>
 #include <stdarg.h>
 #include <stdlib.h>
 #include <stdio.h>
@@ -31,6 +32,7 @@
 #include <utime.h>
 #include <time.h>
 #include <sys/time.h>
+#include <sys/resource.h>
 #include <sys/uio.h>
 #include <sys/socket.h>
 #include <netinet/in.h>
@@ -39,6 +41,7 @@
 #include <dirent.h>
 #include <setjmp.h>
 #include <sys/shm.h>
+#include "qemu/compiler.h"
 #include "qemu/cutils.h"
 
 #define TESTPATH "/tmp/linux-test.tmp"
-- 
2.10.2

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

* [Qemu-devel] [PATCH 07/19] linux-test: fix set/getitimer returned timer check
  2016-12-01  5:14 [Qemu-devel] [PATCH v5 00/19] Cleanup of TCG tests Pranith Kumar
                   ` (4 preceding siblings ...)
  2016-12-01  5:14 ` [Qemu-devel] [PATCH 06/19] linux-test: fix build Pranith Kumar
@ 2016-12-01  5:14 ` Pranith Kumar
  2016-12-01  5:14 ` [Qemu-devel] [PATCH 08/19] Fix test-i386-fprem compilation Pranith Kumar
                   ` (13 subsequent siblings)
  19 siblings, 0 replies; 32+ messages in thread
From: Pranith Kumar @ 2016-12-01  5:14 UTC (permalink / raw)
  To: alex.bennee; +Cc: qemu-devel, rth, Marc-André Lureau

From: Marc-André Lureau <marcandre.lureau@redhat.com>

The previous value of the timer indicates the time to the next timer
expiration, which is likely not the same as when the timer was set.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Pranith Kumar <bobby.prani@gmail.com>
---
 tests/tcg/linux-test.c | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/tests/tcg/linux-test.c b/tests/tcg/linux-test.c
index 65fca30..24fce2b 100644
--- a/tests/tcg/linux-test.c
+++ b/tests/tcg/linux-test.c
@@ -482,9 +482,12 @@ static void test_signal(void)
     it.it_value.tv_usec = 10 * 1000;
     chk_error(setitimer(ITIMER_REAL, &it, NULL));
     chk_error(getitimer(ITIMER_REAL, &oit));
-    if (oit.it_value.tv_sec != it.it_value.tv_sec ||
-        oit.it_value.tv_usec != it.it_value.tv_usec)
+    if (oit.it_value.tv_sec != it.it_interval.tv_sec ||
+        oit.it_value.tv_usec > it.it_interval.tv_usec ||
+        oit.it_interval.tv_sec != it.it_interval.tv_sec ||
+        oit.it_interval.tv_usec != it.it_interval.tv_usec) {
         error("itimer");
+    }
 
     while (alarm_count < 5) {
         usleep(10 * 1000);
@@ -497,8 +500,11 @@ static void test_signal(void)
     memset(&oit, 0xff, sizeof(oit));
     chk_error(setitimer(ITIMER_REAL, &it, &oit));
     if (oit.it_value.tv_sec != 0 ||
-        oit.it_value.tv_usec != 10 * 1000)
+        oit.it_value.tv_usec > 10 * 1000 ||
+        oit.it_interval.tv_sec != 0 ||
+        oit.it_interval.tv_usec != 10 * 1000) {
         error("setitimer");
+    }
 
     /* SIGSEGV test */
     act.sa_sigaction = sig_segv;
-- 
2.10.2

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

* [Qemu-devel] [PATCH 08/19] Fix test-i386-fprem compilation
  2016-12-01  5:14 [Qemu-devel] [PATCH v5 00/19] Cleanup of TCG tests Pranith Kumar
                   ` (5 preceding siblings ...)
  2016-12-01  5:14 ` [Qemu-devel] [PATCH 07/19] linux-test: fix set/getitimer returned timer check Pranith Kumar
@ 2016-12-01  5:14 ` Pranith Kumar
  2016-12-01  5:14 ` [Qemu-devel] [PATCH 09/19] test-i386: modernize vector code v4sf Pranith Kumar
                   ` (12 subsequent siblings)
  19 siblings, 0 replies; 32+ messages in thread
From: Pranith Kumar @ 2016-12-01  5:14 UTC (permalink / raw)
  To: alex.bennee; +Cc: qemu-devel, rth, Marc-André Lureau

From: Marc-André Lureau <marcandre.lureau@redhat.com>

This test doesn't depend on glib, and thus cannot use osdep.h.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Pranith Kumar <bobby.prani@gmail.com>
---
 tests/tcg/test-i386-fprem.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/tests/tcg/test-i386-fprem.c b/tests/tcg/test-i386-fprem.c
index 1a2b144..a258362 100644
--- a/tests/tcg/test-i386-fprem.c
+++ b/tests/tcg/test-i386-fprem.c
@@ -23,7 +23,11 @@
  *  along with this program; if not, see <http://www.gnu.org/licenses/>.
  */
 
-#include "qemu/osdep.h"
+#include <stdint.h>
+#include <stdio.h>
+#include "qemu/compiler.h"
+
+#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
 
 /*
  * Inspired by <ieee754.h>'s union ieee854_long_double, but with single
-- 
2.10.2

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

* [Qemu-devel] [PATCH 09/19] test-i386: modernize vector code v4sf
  2016-12-01  5:14 [Qemu-devel] [PATCH v5 00/19] Cleanup of TCG tests Pranith Kumar
                   ` (6 preceding siblings ...)
  2016-12-01  5:14 ` [Qemu-devel] [PATCH 08/19] Fix test-i386-fprem compilation Pranith Kumar
@ 2016-12-01  5:14 ` Pranith Kumar
  2016-12-01  5:14 ` [Qemu-devel] [PATCH 10/19] tests/tcg: Move arm tests to arch specific folder Pranith Kumar
                   ` (11 subsequent siblings)
  19 siblings, 0 replies; 32+ messages in thread
From: Pranith Kumar @ 2016-12-01  5:14 UTC (permalink / raw)
  To: alex.bennee; +Cc: qemu-devel, rth, Marc-André Lureau

From: Marc-André Lureau <marcandre.lureau@redhat.com>

Fixes the following compiler warning:

tests/tcg/test-i386.c:2110:1: warning: specifying vector types with __attribute__ ((mode)) is deprecated [-Wattributes]
 typedef int __m64 __attribute__ ((__mode__ (__V2SI__)));
 ^~~~~~~

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Pranith Kumar <bobby.prani@gmail.com>
---
 tests/tcg/test-i386.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/tests/tcg/test-i386.c b/tests/tcg/test-i386.c
index 0f7b943..b0f8975 100644
--- a/tests/tcg/test-i386.c
+++ b/tests/tcg/test-i386.c
@@ -2107,15 +2107,14 @@ static void test_enter(void)
 
 #ifdef TEST_SSE
 
-typedef int __m64 __attribute__ ((__mode__ (__V2SI__)));
-typedef float __m128 __attribute__ ((__mode__(__V4SF__)));
+typedef float v4sf __attribute__ ((vector_size(4 * sizeof(float))));
 
 typedef union {
     double d[2];
     float s[4];
     uint32_t l[4];
     uint64_t q[2];
-    __m128 dq;
+    v4sf dq;
 } XMMReg;
 
 static uint64_t __attribute__((aligned(16))) test_values[4][2] = {
-- 
2.10.2

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

* [Qemu-devel] [PATCH 10/19] tests/tcg: Move arm tests to arch specific folder
  2016-12-01  5:14 [Qemu-devel] [PATCH v5 00/19] Cleanup of TCG tests Pranith Kumar
                   ` (7 preceding siblings ...)
  2016-12-01  5:14 ` [Qemu-devel] [PATCH 09/19] test-i386: modernize vector code v4sf Pranith Kumar
@ 2016-12-01  5:14 ` Pranith Kumar
  2016-12-01  5:14 ` [Qemu-devel] [PATCH 11/19] tests/tcg: Move mips test " Pranith Kumar
                   ` (10 subsequent siblings)
  19 siblings, 0 replies; 32+ messages in thread
From: Pranith Kumar @ 2016-12-01  5:14 UTC (permalink / raw)
  To: alex.bennee; +Cc: qemu-devel, rth

Signed-off-by: Pranith Kumar <bobby.prani@gmail.com>
---
 tests/tcg/arm/Makefile                | 45 +++++++++++++++++++++++++++++++++++
 tests/tcg/{ => arm}/hello-arm.c       |  0
 tests/tcg/{ => arm}/test-arm-iwmmxt.s |  0
 3 files changed, 45 insertions(+)
 create mode 100644 tests/tcg/arm/Makefile
 rename tests/tcg/{ => arm}/hello-arm.c (100%)
 rename tests/tcg/{ => arm}/test-arm-iwmmxt.s (100%)

diff --git a/tests/tcg/arm/Makefile b/tests/tcg/arm/Makefile
new file mode 100644
index 0000000..c2ae491
--- /dev/null
+++ b/tests/tcg/arm/Makefile
@@ -0,0 +1,45 @@
+BUILD_DIR?=$(CURDIR)
+SRC_PATH=../../../
+include $(BUILD_DIR)/config-host.mak
+include $(SRC_PATH)/rules.mak
+
+$(call set-vpath, $(SRC_PATH)/tests/tcg/arm)
+
+QEMU=$(BUILD_DIR)/arm-linux-user/qemu-arm
+
+QEMU_INCLUDES += -I$(BUILD_DIR)
+CFLAGS=-Wall -O2 -g -fno-strict-aliasing
+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
+
+TESTS=hello-arm arm-iwmmxt
+
+all: $(patsubst %,run-%,$(TESTS))
+test: all
+
+# rules to run tests
+
+run-%: %
+	$(QEMU) ./$*
+
+#.PHONY: $(patsubst %,run-%,$(TESTS))
+
+run-hello-arm: hello-arm
+run-arm-iwmmxt: arm-iwmmxt
+
+# arm test
+hello-arm: hello-arm.o
+	arm-linux-gnueabi-ld -o $@ $<
+
+hello-arm.o: hello-arm.c
+	arm-linux-gnueabi-gcc -Wall -g -O2 -c -o $@ $<
+
+arm-iwmmxt: test-arm-iwmmxt.s
+	cpp < $< | arm-linux-gnueabi-gcc -Wall -static -march=iwmmxt -mabi=aapcs -x assembler - -o $@
+
+clean:
+	rm -f *~ *.o $(TESTS)
diff --git a/tests/tcg/hello-arm.c b/tests/tcg/arm/hello-arm.c
similarity index 100%
rename from tests/tcg/hello-arm.c
rename to tests/tcg/arm/hello-arm.c
diff --git a/tests/tcg/test-arm-iwmmxt.s b/tests/tcg/arm/test-arm-iwmmxt.s
similarity index 100%
rename from tests/tcg/test-arm-iwmmxt.s
rename to tests/tcg/arm/test-arm-iwmmxt.s
-- 
2.10.2

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

* [Qemu-devel] [PATCH 11/19] tests/tcg: Move mips test to arch specific folder
  2016-12-01  5:14 [Qemu-devel] [PATCH v5 00/19] Cleanup of TCG tests Pranith Kumar
                   ` (8 preceding siblings ...)
  2016-12-01  5:14 ` [Qemu-devel] [PATCH 10/19] tests/tcg: Move arm tests to arch specific folder Pranith Kumar
@ 2016-12-01  5:14 ` Pranith Kumar
  2016-12-01  5:14 ` [Qemu-devel] [PATCH 12/19] tests/tcg: Add tests-tcg hook in Makefile Pranith Kumar
                   ` (9 subsequent siblings)
  19 siblings, 0 replies; 32+ messages in thread
From: Pranith Kumar @ 2016-12-01  5:14 UTC (permalink / raw)
  To: alex.bennee; +Cc: qemu-devel, rth

Signed-off-by: Pranith Kumar <bobby.prani@gmail.com>
---
 tests/tcg/{ => mips}/hello-mips.c | 0
 1 file changed, 0 insertions(+), 0 deletions(-)
 rename tests/tcg/{ => mips}/hello-mips.c (100%)

diff --git a/tests/tcg/hello-mips.c b/tests/tcg/mips/hello-mips.c
similarity index 100%
rename from tests/tcg/hello-mips.c
rename to tests/tcg/mips/hello-mips.c
-- 
2.10.2

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

* [Qemu-devel] [PATCH 12/19] tests/tcg: Add tests-tcg hook in Makefile
  2016-12-01  5:14 [Qemu-devel] [PATCH v5 00/19] Cleanup of TCG tests Pranith Kumar
                   ` (9 preceding siblings ...)
  2016-12-01  5:14 ` [Qemu-devel] [PATCH 11/19] tests/tcg: Move mips test " Pranith Kumar
@ 2016-12-01  5:14 ` Pranith Kumar
  2016-12-13 17:10   ` Alex Bennée
  2016-12-01  5:14 ` [Qemu-devel] [PATCH 13/19] tests/tcg/i386: Fix hello-i386 test Pranith Kumar
                   ` (8 subsequent siblings)
  19 siblings, 1 reply; 32+ messages in thread
From: Pranith Kumar @ 2016-12-01  5:14 UTC (permalink / raw)
  To: alex.bennee; +Cc: qemu-devel, rth

You can call 'make tests-tcg' to build and run native tcg tests.

Signed-off-by: Pranith Kumar <bobby.prani@gmail.com>
---
 tests/Makefile.include     |  1 +
 tests/tcg/Makefile.include | 33 +++++++++++++++++++++++++++++++++
 2 files changed, 34 insertions(+)
 create mode 100644 tests/tcg/Makefile.include

diff --git a/tests/Makefile.include b/tests/Makefile.include
index 2a2b78d..b046bdd 100644
--- a/tests/Makefile.include
+++ b/tests/Makefile.include
@@ -836,3 +836,4 @@ all: $(QEMU_IOTESTS_HELPERS-y)
 
 -include $(wildcard tests/*.d)
 -include $(wildcard tests/libqos/*.d)
+-include $(SRC_PATH)/tests/tcg/Makefile.include
diff --git a/tests/tcg/Makefile.include b/tests/tcg/Makefile.include
new file mode 100644
index 0000000..3eff125
--- /dev/null
+++ b/tests/tcg/Makefile.include
@@ -0,0 +1,33 @@
+#
+# linux-user TCG tests
+#
+# The Make is expected to be invoked in the ${BUILD_DIR} directory
+# using the tests-tcg target
+#
+BUILD_DIR?=$(CURDIR)
+include $(BUILD_DIR)/config-host.mak	# brings in SRC_PATH
+
+UNAME_M := $(shell uname -m)
+
+tests-tcg: prepare $(UNAME_M)
+
+prepare:
+	mkdir -p $(BUILD_DIR)/$(UNAME_M)-linux-user/tests/
+
+x86_64:
+	cd $(BUILD_DIR)/x86_64-linux-user/tests/ && \
+	make -f $(SRC_PATH)/tests/tcg/i386/Makefile
+
+i386:
+	cd $(BUILD_DIR)/i386-linux-user/tests/ && \
+	make -f $(SRC_PATH)/tests/tcg/i386/Makefile
+
+arm:
+	cd $(BUILD_DIR)/arm-linux-user/tests/ && \
+	make -f $(SRC_PATH)/tests/tcg/arm/Makefile
+
+aarch64:
+	cd $(BUILD_DIR)/aarch64-linux-user/tests/ && \
+	make -f $(SRC_PATH)/tests/tcg/arm/Makefile
+
+.PHONY: tests-tcg
-- 
2.10.2

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

* [Qemu-devel] [PATCH 13/19] tests/tcg/i386: Fix hello-i386 test
  2016-12-01  5:14 [Qemu-devel] [PATCH v5 00/19] Cleanup of TCG tests Pranith Kumar
                   ` (10 preceding siblings ...)
  2016-12-01  5:14 ` [Qemu-devel] [PATCH 12/19] tests/tcg: Add tests-tcg hook in Makefile Pranith Kumar
@ 2016-12-01  5:14 ` Pranith Kumar
  2016-12-01  5:14 ` [Qemu-devel] [PATCH 14/19] tests/tcg: Move i386 tests to arch specific folder Pranith Kumar
                   ` (7 subsequent siblings)
  19 siblings, 0 replies; 32+ messages in thread
From: Pranith Kumar @ 2016-12-01  5:14 UTC (permalink / raw)
  To: alex.bennee; +Cc: qemu-devel, rth

Include a missing header and rename the function names to avoid
definition mis-match.

Signed-off-by: Pranith Kumar <bobby.prani@gmail.com>
---
 tests/tcg/hello-i386.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/tests/tcg/hello-i386.c b/tests/tcg/hello-i386.c
index fa00380..4a46f80 100644
--- a/tests/tcg/hello-i386.c
+++ b/tests/tcg/hello-i386.c
@@ -1,6 +1,7 @@
 #include <asm/unistd.h>
+#include <stddef.h>
 
-static inline void exit(int status)
+static inline void _exit(int status)
 {
   int __res;
   __asm__ volatile ("movl %%ecx,%%ebx\n"\
@@ -8,7 +9,7 @@ static inline void exit(int status)
 		    :  "=a" (__res) : "0" (__NR_exit),"c" ((long)(status)));
 }
 
-static inline int write(int fd, const char * buf, int len)
+static inline int _write(int fd, const char * buf, int len)
 {
   int status;
   __asm__ volatile ("pushl %%ebx\n"\
@@ -22,6 +23,6 @@ static inline int write(int fd, const char * buf, int len)
 
 void _start(void)
 {
-    write(1, "Hello World\n", 12);
-    exit(0);
+    _write(1, "Hello World\n", 12);
+    _exit(0);
 }
-- 
2.10.2

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

* [Qemu-devel] [PATCH 14/19] tests/tcg: Move i386 tests to arch specific folder
  2016-12-01  5:14 [Qemu-devel] [PATCH v5 00/19] Cleanup of TCG tests Pranith Kumar
                   ` (11 preceding siblings ...)
  2016-12-01  5:14 ` [Qemu-devel] [PATCH 13/19] tests/tcg/i386: Fix hello-i386 test Pranith Kumar
@ 2016-12-01  5:14 ` Pranith Kumar
  2016-12-01  5:14 ` [Qemu-devel] [PATCH 15/19] tests/tcg/i386: Fix test-i386 compilation Pranith Kumar
                   ` (6 subsequent siblings)
  19 siblings, 0 replies; 32+ messages in thread
From: Pranith Kumar @ 2016-12-01  5:14 UTC (permalink / raw)
  To: alex.bennee; +Cc: qemu-devel, rth

Signed-off-by: Pranith Kumar <bobby.prani@gmail.com>
---
 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 $@ \
-              $(<D)/test-i386.c $(<D)/test-i386-code16.S $(<D)/test-i386-vm86.S -lm
-
-test-i386-fprem: test-i386-fprem.c
-	$(CC_I386) $(QEMU_INCLUDES) $(CFLAGS) $(LDFLAGS) -o $@ $^
-
-test-x86_64: test-i386.c \
-           test-i386.h test-i386-shift.h test-i386-muldiv.h
-	$(CC_X86_64) $(QEMU_INCLUDES) $(CFLAGS) $(LDFLAGS) -o $@ $(<D)/test-i386.c -lm
-
-# generic Linux and CPU test
-linux-test: linux-test.c
-	$(CC_I386) $(QEMU_INCLUDES) $(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_I386) $(CFLAGS) $(LDFLAGS) -o $@ $<
-
-sha1: sha1.c
-	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $<
-
-speed: sha1 sha1-i386
-	time ./sha1
-	time $(QEMU) ./sha1-i386
-
-# arm test
-hello-arm: hello-arm.o
-	arm-linux-ld -o $@ $<
-
-hello-arm.o: hello-arm.c
-	arm-linux-gcc -Wall -g -O2 -c -o $@ $<
-
-test-arm-iwmmxt: test-arm-iwmmxt.s
-	cpp < $< | arm-linux-gnu-gcc -Wall -static -march=iwmmxt -mabi=aapcs -x assembler - -o $@
-
-# MIPS test
-hello-mips: hello-mips.c
-	mips-linux-gnu-gcc -nostdlib -static -mno-abicalls -fno-PIC -mabi=32 -Wall -Wextra -g -O2 -o $@ $<
-
-hello-mipsel: hello-mips.c
-	mipsel-linux-gnu-gcc -nostdlib -static -mno-abicalls -fno-PIC -mabi=32 -Wall -Wextra -g -O2 -o $@ $<
-
-# testsuite for the CRIS port.
-test-cris:
-	$(MAKE) -C cris check
-
-# testsuite for the LM32 port.
-test-lm32:
-	$(MAKE) -C lm32 check
-
-clean:
-	rm -f *~ *.o test-i386.out test-i386.ref \
-           test-x86_64.log test-x86_64.ref qruncom $(TESTS)
diff --git a/tests/tcg/i386/Makefile b/tests/tcg/i386/Makefile
new file mode 100644
index 0000000..15f77af
--- /dev/null
+++ b/tests/tcg/i386/Makefile
@@ -0,0 +1,88 @@
+BUILD_DIR=../../../build/
+SRC_PATH=../../../
+include $(BUILD_DIR)/config-host.mak
+include $(SRC_PATH)/rules.mak
+
+$(call set-vpath, $(SRC_PATH)/tests/tcg/i386)
+
+QEMU=$(BUILD_DIR)/i386-linux-user/qemu-i386
+QEMU_X86_64=$(BUILD_DIR)/x86_64-linux-user/qemu-x86_64
+CC_X86_64=$(CC_I386) -m64
+
+QEMU_INCLUDES += -I$(BUILD_DIR)
+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 \
+	   test-i386 \
+	   test-i386-fprem
+	   # runcom
+
+# native i386 compilers sometimes are not biarch.  assume cross-compilers are
+ifneq ($(ARCH),i386)
+I386_TESTS+=run-test-x86_64
+endif
+
+all: $(patsubst %,run-%,$(I386_TESTS))
+test: all
+
+# rules to run tests
+
+.PHONY: $(patsubst %,run-%,$(I386_TESTS))
+
+run-%: %
+	-$(QEMU) ./$*
+
+run-hello-i386: hello-i386
+	$(QEMU) ./hello-i386
+
+run-test-i386: test-i386
+	./test-i386 > 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 $@ \
+              $(<D)/test-i386.c $(<D)/test-i386-code16.S $(<D)/test-i386-vm86.S -lm
+
+test-i386-fprem: test-i386-fprem.c
+	$(CC) $(QEMU_INCLUDES) $(CFLAGS) $(LDFLAGS) -o $@ $^ `pkg-config --cflags --libs glib-2.0`
+
+test-x86_64: test-i386.c \
+           test-i386.h test-i386-shift.h test-i386-muldiv.h
+	$(CC_X86_64) $(QEMU_INCLUDES) $(CFLAGS) $(LDFLAGS) -o $@ $(<D)/test-i386.c -lm
+
+# vm86 test
+runcom: runcom.c
+	$(CC_I386) $(CFLAGS) $(LDFLAGS) -o $@ $<
+
+clean:
+	rm -f *~ *.o test-i386.out test-i386.ref test-i386-fprem.out test-i386-fprem.ref \
+           test-x86_64.log test-x86_64.ref qruncom $(I386_TESTS)
diff --git a/tests/tcg/hello-i386.c b/tests/tcg/i386/hello-i386.c
similarity index 100%
rename from tests/tcg/hello-i386.c
rename to tests/tcg/i386/hello-i386.c
diff --git a/tests/tcg/pi_10.com b/tests/tcg/i386/pi_10.com
similarity index 100%
rename from tests/tcg/pi_10.com
rename to tests/tcg/i386/pi_10.com
diff --git a/tests/tcg/runcom.c b/tests/tcg/i386/runcom.c
similarity index 100%
rename from tests/tcg/runcom.c
rename to tests/tcg/i386/runcom.c
diff --git a/tests/tcg/test-i386-code16.S b/tests/tcg/i386/test-i386-code16.S
similarity index 100%
rename from tests/tcg/test-i386-code16.S
rename to tests/tcg/i386/test-i386-code16.S
diff --git a/tests/tcg/test-i386-fprem.c b/tests/tcg/i386/test-i386-fprem.c
similarity index 100%
rename from tests/tcg/test-i386-fprem.c
rename to tests/tcg/i386/test-i386-fprem.c
diff --git a/tests/tcg/test-i386-muldiv.h b/tests/tcg/i386/test-i386-muldiv.h
similarity index 100%
rename from tests/tcg/test-i386-muldiv.h
rename to tests/tcg/i386/test-i386-muldiv.h
diff --git a/tests/tcg/test-i386-shift.h b/tests/tcg/i386/test-i386-shift.h
similarity index 100%
rename from tests/tcg/test-i386-shift.h
rename to tests/tcg/i386/test-i386-shift.h
diff --git a/tests/tcg/test-i386-ssse3.c b/tests/tcg/i386/test-i386-ssse3.c
similarity index 100%
rename from tests/tcg/test-i386-ssse3.c
rename to tests/tcg/i386/test-i386-ssse3.c
diff --git a/tests/tcg/test-i386-vm86.S b/tests/tcg/i386/test-i386-vm86.S
similarity index 100%
rename from tests/tcg/test-i386-vm86.S
rename to tests/tcg/i386/test-i386-vm86.S
diff --git a/tests/tcg/test-i386.c b/tests/tcg/i386/test-i386.c
similarity index 100%
rename from tests/tcg/test-i386.c
rename to tests/tcg/i386/test-i386.c
diff --git a/tests/tcg/test-i386.h b/tests/tcg/i386/test-i386.h
similarity index 100%
rename from tests/tcg/test-i386.h
rename to tests/tcg/i386/test-i386.h
-- 
2.10.2

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

* [Qemu-devel] [PATCH 15/19] tests/tcg/i386: Fix test-i386 compilation
  2016-12-01  5:14 [Qemu-devel] [PATCH v5 00/19] Cleanup of TCG tests Pranith Kumar
                   ` (12 preceding siblings ...)
  2016-12-01  5:14 ` [Qemu-devel] [PATCH 14/19] tests/tcg: Move i386 tests to arch specific folder Pranith Kumar
@ 2016-12-01  5:14 ` Pranith Kumar
  2016-12-01  5:14 ` [Qemu-devel] [PATCH 16/19] tests/tcg: Fix compilation of linux-test.c Pranith Kumar
                   ` (5 subsequent siblings)
  19 siblings, 0 replies; 32+ messages in thread
From: Pranith Kumar @ 2016-12-01  5:14 UTC (permalink / raw)
  To: alex.bennee; +Cc: qemu-devel, rth

Signed-off-by: Pranith Kumar <bobby.prani@gmail.com>
---
 tests/tcg/i386/Makefile | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/tests/tcg/i386/Makefile b/tests/tcg/i386/Makefile
index 15f77af..97c1a97 100644
--- a/tests/tcg/i386/Makefile
+++ b/tests/tcg/i386/Makefile
@@ -20,13 +20,13 @@ LDFLAGS=
 # also, pi_10.com runs indefinitely
 
 I386_TESTS=hello-i386 \
-	   test-i386 \
 	   test-i386-fprem
 	   # runcom
 
 # native i386 compilers sometimes are not biarch.  assume cross-compilers are
 ifneq ($(ARCH),i386)
-I386_TESTS+=run-test-x86_64
+I386_TESTS+=test-i386 \
+	    run-test-x86_64
 endif
 
 all: $(patsubst %,run-%,$(I386_TESTS))
@@ -44,7 +44,7 @@ run-hello-i386: hello-i386
 
 run-test-i386: test-i386
 	./test-i386 > test-i386.ref
-	-$(QEMU) test-i386 > test-i386.out
+	-$(QEMU_X86_64) 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
@@ -69,7 +69,7 @@ hello-i386: hello-i386.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) $(QEMU_INCLUDES) $(CFLAGS) $(LDFLAGS) -o $@ \
+	$(CC) $(QEMU_INCLUDES) $(CFLAGS) $(LDFLAGS) -o $@ \
               $(<D)/test-i386.c $(<D)/test-i386-code16.S $(<D)/test-i386-vm86.S -lm
 
 test-i386-fprem: test-i386-fprem.c
-- 
2.10.2

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

* [Qemu-devel] [PATCH 16/19] tests/tcg: Fix compilation of linux-test.c
  2016-12-01  5:14 [Qemu-devel] [PATCH v5 00/19] Cleanup of TCG tests Pranith Kumar
                   ` (13 preceding siblings ...)
  2016-12-01  5:14 ` [Qemu-devel] [PATCH 15/19] tests/tcg/i386: Fix test-i386 compilation Pranith Kumar
@ 2016-12-01  5:14 ` Pranith Kumar
  2016-12-13 13:37   ` Alex Bennée
  2016-12-01  5:14 ` [Qemu-devel] [PATCH 17/19] tests/tcg: Move independent tests to misc dir Pranith Kumar
                   ` (4 subsequent siblings)
  19 siblings, 1 reply; 32+ messages in thread
From: Pranith Kumar @ 2016-12-01  5:14 UTC (permalink / raw)
  To: alex.bennee; +Cc: qemu-devel, rth

Signed-off-by: Pranith Kumar <bobby.prani@gmail.com>
---
 tests/tcg/linux-test.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tests/tcg/linux-test.c b/tests/tcg/linux-test.c
index 24fce2b..e676e39 100644
--- a/tests/tcg/linux-test.c
+++ b/tests/tcg/linux-test.c
@@ -41,6 +41,8 @@
 #include <dirent.h>
 #include <setjmp.h>
 #include <sys/shm.h>
+#include <stdbool.h>
+#include <sys/resource.h>
 #include "qemu/compiler.h"
 #include "qemu/cutils.h"
 
-- 
2.10.2

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

* [Qemu-devel] [PATCH 17/19] tests/tcg: Move independent tests to misc dir
  2016-12-01  5:14 [Qemu-devel] [PATCH v5 00/19] Cleanup of TCG tests Pranith Kumar
                   ` (14 preceding siblings ...)
  2016-12-01  5:14 ` [Qemu-devel] [PATCH 16/19] tests/tcg: Fix compilation of linux-test.c Pranith Kumar
@ 2016-12-01  5:14 ` Pranith Kumar
  2016-12-13 13:38   ` Alex Bennée
  2016-12-01  5:14 ` [Qemu-devel] [PATCH 18/19] tests/tcg: Add and update Makefiles Pranith Kumar
                   ` (3 subsequent siblings)
  19 siblings, 1 reply; 32+ messages in thread
From: Pranith Kumar @ 2016-12-01  5:14 UTC (permalink / raw)
  To: alex.bennee; +Cc: qemu-devel, rth

Signed-off-by: Pranith Kumar <bobby.prani@gmail.com>
---
 tests/tcg/misc/Makefile           | 81 +++++++++++++++++++++++++++++++++++++++
 tests/tcg/{ => misc}/linux-test.c |  0
 tests/tcg/{ => misc}/sha1.c       |  0
 tests/tcg/{ => misc}/test-mmap.c  |  0
 tests/tcg/{ => misc}/test_path.c  |  0
 tests/tcg/{ => misc}/testthread.c |  0
 6 files changed, 81 insertions(+)
 create mode 100644 tests/tcg/misc/Makefile
 rename tests/tcg/{ => misc}/linux-test.c (100%)
 rename tests/tcg/{ => misc}/sha1.c (100%)
 rename tests/tcg/{ => misc}/test-mmap.c (100%)
 rename tests/tcg/{ => misc}/test_path.c (100%)
 rename tests/tcg/{ => misc}/testthread.c (100%)

diff --git a/tests/tcg/misc/Makefile b/tests/tcg/misc/Makefile
new file mode 100644
index 0000000..0aa6f2e
--- /dev/null
+++ b/tests/tcg/misc/Makefile
@@ -0,0 +1,81 @@
+# -*- Mode: makefile -*-
+#
+# Generic linux-user TCG tests
+#
+# These tests all use standard non-architecture specific APIs so can
+# be built for all TCG targets. The Make is expected to be called in
+# the ${BUILD_DIR}/$(TARGET_NAME_ARCH)-linux-user/tests directory
+#
+# To build for other architectures call make with CROSS_CC set
+#
+
+BUILD_DIR=../..
+include $(BUILD_DIR)/config-host.mak	# brings in SRC_PATH
+include ../config-target.mak		# TARGET_NAME
+include $(SRC_PATH)/rules.mak
+
+$(call set-vpath, $(SRC_PATH)/tests/tcg/misc)
+
+QEMU=$(BUILD_DIR)/$(TARGET_NAME)-linux-user/qemu-$(TARGET_NAME)
+
+# Compiler set-up, default to system compiler if not set
+CROSS_CC?=$(CC)
+
+CFLAGS=-Wall -O2 -g -fno-strict-aliasing -static
+LDFLAGS=
+
+TESTS=linux-test \
+      testthread \
+      sha1 \
+      test-mmap
+
+all: $(patsubst %,run-%,$(TESTS))
+test: all
+
+# rules to run tests
+
+run-%: %
+	-$(QEMU) ./$*
+
+run-linux-test: linux-test
+run-testthread: testthread
+run-sha1: sha1
+run-test_path: test_path
+
+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-test_path: test_path
+
+# rules to compile tests
+
+# These two need to be re-written as relying on glib (rather than just glibc)
+# test_path: test_path.o
+# 	$(CROSS_CC) $^ -o $@ -lglib-2.0
+
+# test_path.o: test_path.c
+# 	$(CROSS_CC) $^ -c -o $@ $(QEMU_INCLUDES) `pkg-config --cflags --libs glib-2.0`
+
+testthread: testthread.c
+	$(CROSS_CC) $(CFLAGS) $(LDFLAGS) -o $@ $< -lpthread
+
+# generic Linux and CPU test
+linux-test: linux-test.c
+	$(CROSS_CC) $(CFLAGS) $(LDFLAGS) -o $@ $< -lm
+
+test-mmap: test-mmap.c
+	$(CROSS_CC) $(CFLAGS) -Wall -O2 $(LDFLAGS) -o $@ $< -static
+
+# speed test
+sha1: sha1.c
+	$(CROSS_CC) $(CFLAGS) $(LDFLAGS) -o $@ $<
+
+speed: sha1
+	time ./sha1
+	time $(QEMU) ./sha1
+
+clean:
+	rm -f *~ *.o $(TESTS)
diff --git a/tests/tcg/linux-test.c b/tests/tcg/misc/linux-test.c
similarity index 100%
rename from tests/tcg/linux-test.c
rename to tests/tcg/misc/linux-test.c
diff --git a/tests/tcg/sha1.c b/tests/tcg/misc/sha1.c
similarity index 100%
rename from tests/tcg/sha1.c
rename to tests/tcg/misc/sha1.c
diff --git a/tests/tcg/test-mmap.c b/tests/tcg/misc/test-mmap.c
similarity index 100%
rename from tests/tcg/test-mmap.c
rename to tests/tcg/misc/test-mmap.c
diff --git a/tests/tcg/test_path.c b/tests/tcg/misc/test_path.c
similarity index 100%
rename from tests/tcg/test_path.c
rename to tests/tcg/misc/test_path.c
diff --git a/tests/tcg/testthread.c b/tests/tcg/misc/testthread.c
similarity index 100%
rename from tests/tcg/testthread.c
rename to tests/tcg/misc/testthread.c
-- 
2.10.2

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

* [Qemu-devel] [PATCH 18/19] tests/tcg: Add and update Makefiles
  2016-12-01  5:14 [Qemu-devel] [PATCH v5 00/19] Cleanup of TCG tests Pranith Kumar
                   ` (15 preceding siblings ...)
  2016-12-01  5:14 ` [Qemu-devel] [PATCH 17/19] tests/tcg: Move independent tests to misc dir Pranith Kumar
@ 2016-12-01  5:14 ` Pranith Kumar
  2016-12-14 15:46   ` Alex Bennée
  2016-12-01  5:14 ` [Qemu-devel] [PATCH 19/19] tests/tcg: test-i386.c: Fix format warnings Pranith Kumar
                   ` (2 subsequent siblings)
  19 siblings, 1 reply; 32+ messages in thread
From: Pranith Kumar @ 2016-12-01  5:14 UTC (permalink / raw)
  To: alex.bennee; +Cc: qemu-devel, rth

This commit fixes the makefiles to bring them to the desired state.

Signed-off-by: Pranith Kumar <bobby.prani@gmail.com>
---
 tests/tcg/alpha/Makefile             | 38 +++++++++++++++++++----------
 tests/tcg/arm/Makefile               | 32 +++++++++++++++----------
 tests/tcg/cris/Makefile              | 17 +++++++++++--
 tests/tcg/i386/Makefile              | 23 +++++++++---------
 tests/tcg/lm32/Makefile              | 17 +++++++++++--
 tests/tcg/mips/Makefile              | 46 ++++++++++++++++++++++++++++++++++++
 tests/tcg/mips/mips32-dsp/Makefile   | 17 +++++++++++--
 tests/tcg/mips/mips32-dspr2/Makefile | 17 +++++++++++--
 tests/tcg/mips/mips64-dsp/Makefile   | 18 ++++++++++++--
 tests/tcg/mips/mips64-dspr2/Makefile | 17 ++++++++++++-
 tests/tcg/openrisc/Makefile          | 19 ++++++++++++---
 tests/tcg/xtensa/Makefile            | 17 +++++++++++--
 12 files changed, 225 insertions(+), 53 deletions(-)
 create mode 100644 tests/tcg/mips/Makefile

diff --git a/tests/tcg/alpha/Makefile b/tests/tcg/alpha/Makefile
index 2b1f03d..e20315f 100644
--- a/tests/tcg/alpha/Makefile
+++ b/tests/tcg/alpha/Makefile
@@ -1,33 +1,47 @@
-CROSS=alpha-linux-gnu-
-CC=$(CROSS)gcc
-AS=$(CROSS)as
+# -*- Mode: makefile -*-
+#
+# Alpha linux-user TCG tests
+#
+# The Make is expected to be called in the
+# ${BUILD_DIR}/alpha-linux-user/tests directory
+#
 
-SIM=../../alpha-linux-user/qemu-alpha
+BUILD_DIR?=$(CURDIR)
+include $(BUILD_DIR)/config-host.mak	# brings in SRC_PATH
+include ../config-target.mak		# TARGET_NAME
+include $(SRC_PATH)/rules.mak
 
-CFLAGS=-O
-LINK=$(CC) -o $@ crt.o $< -nostdlib
+$(call set-vpath, $(SRC_PATH)/tests/tcg/alpha)
+
+QEMU=$(BUILD_DIR)/alpha-linux-user/qemu-alpha
+
+# Compiler set-up, default to system compiler if not set
+CROSS_CC?=$(CC)
+
+CFLAGS=-Wall -O2 -g -fno-strict-aliasing -static
+LDFLAGS=-nostdlib
 
 TESTS=test-cond test-cmov
 
 all: hello-alpha $(TESTS)
 
 hello-alpha: hello-alpha.o crt.o
-	$(LINK)
+	$(CROSS_CC) -o $@ crt.o $< $(LDFLAGS)
 
 test-cond: test-cond.o crt.o
-	$(LINK)
+	$(CROSS_CC) -o $@ crt.o $< $(LDFLAGS)
 
 test-cmov.o: test-cond.c
-	$(CC) -c $(CFLAGS) -DTEST_CMOV -o $@ $<
+	$(CROSS_CC) -c $(CFLAGS) -DTEST_CMOV -o $@ $<
 
 test-cmov: test-cmov.o crt.o
-	$(LINK)
+	$(CROSS_CC) -o $@ crt.o $< $(LDFLAGS)
 
 test-ovf: test-ovf.o crt.o
-	$(LINK)
+	$(CROSS_CC) -o $@ crt.o $< $(LDFLAGS)
 
 check: $(TESTS)
-	for f in $(TESTS); do $(SIM) $$f || exit 1; done
+	for f in $(TESTS); do $(QEMU) $$f || exit 1; done
 
 clean:
 	$(RM) *.o *~ hello-alpha $(TESTS)
diff --git a/tests/tcg/arm/Makefile b/tests/tcg/arm/Makefile
index c2ae491..a7c8953 100644
--- a/tests/tcg/arm/Makefile
+++ b/tests/tcg/arm/Makefile
@@ -1,20 +1,26 @@
-BUILD_DIR?=$(CURDIR)
-SRC_PATH=../../../
-include $(BUILD_DIR)/config-host.mak
+# -*- Mode: makefile -*-
+#
+# Arm linux-user TCG tests
+#
+# The Make is expected to be called in the
+# ${BUILD_DIR}/arm-linux-user/tests directory
+#
+
+BUILD_DIR=../..
+include $(BUILD_DIR)/config-host.mak	# brings in SRC_PATH
+include ../config-target.mak		# TARGET_NAME
 include $(SRC_PATH)/rules.mak
 
 $(call set-vpath, $(SRC_PATH)/tests/tcg/arm)
 
 QEMU=$(BUILD_DIR)/arm-linux-user/qemu-arm
 
-QEMU_INCLUDES += -I$(BUILD_DIR)
-CFLAGS=-Wall -O2 -g -fno-strict-aliasing
-LDFLAGS=
-
-# TODO: automatically detect ARM and MIPS compilers, and run those too
+# Compiler set-up, default to system compiler if not set
+CROSS_CC?=$(CC)
 
-# runcom maps page 0, so it requires root privileges
-# also, pi_10.com runs indefinitely
+QEMU_INCLUDES += -I$(BUILD_DIR)
+CFLAGS=-Wall -O2 -g -fno-strict-aliasing -nostdlib
+LDFLAGS=-nostdlib
 
 TESTS=hello-arm arm-iwmmxt
 
@@ -33,13 +39,13 @@ run-arm-iwmmxt: arm-iwmmxt
 
 # arm test
 hello-arm: hello-arm.o
-	arm-linux-gnueabi-ld -o $@ $<
+	$(CROSS_CC) $(LDFLAGS) -o $@ $<
 
 hello-arm.o: hello-arm.c
-	arm-linux-gnueabi-gcc -Wall -g -O2 -c -o $@ $<
+	$(CROSS_CC) $(CFLAGS) -c -o $@ $<
 
 arm-iwmmxt: test-arm-iwmmxt.s
-	cpp < $< | arm-linux-gnueabi-gcc -Wall -static -march=iwmmxt -mabi=aapcs -x assembler - -o $@
+	cpp < $< | $(CROSS_CC) -Wall -static -march=iwmmxt -mabi=aapcs -x assembler - -o $@
 
 clean:
 	rm -f *~ *.o $(TESTS)
diff --git a/tests/tcg/cris/Makefile b/tests/tcg/cris/Makefile
index 6b3dba4..009c3f4 100644
--- a/tests/tcg/cris/Makefile
+++ b/tests/tcg/cris/Makefile
@@ -1,7 +1,20 @@
--include ../../../config-host.mak
+# -*- Mode: makefile -*-
+#
+# Cris linux-user TCG tests
+#
+# The Make is expected to be called in the
+# ${BUILD_DIR}/cris-linux-user/tests directory
+#
+
+BUILD_DIR=../..
+include $(BUILD_DIR)/config-host.mak	# brings in SRC_PATH
+include ../config-target.mak		# TARGET_NAME
+include $(SRC_PATH)/rules.mak
+
+$(call set-vpath, $(SRC_PATH)/tests/tcg/arm)
 
 CROSS=crisv32-axis-linux-gnu-
-SIM=../../../cris-linux-user/qemu-cris -L ./
+SIM=$(BUILD_DIR)/cris-linux-user/qemu-cris -L ./
 SIMG=cris-axis-linux-gnu-run --sysroot=./
 
 CC      = $(CROSS)gcc
diff --git a/tests/tcg/i386/Makefile b/tests/tcg/i386/Makefile
index 97c1a97..55a45ad 100644
--- a/tests/tcg/i386/Makefile
+++ b/tests/tcg/i386/Makefile
@@ -1,6 +1,14 @@
-BUILD_DIR=../../../build/
-SRC_PATH=../../../
-include $(BUILD_DIR)/config-host.mak
+# -*- Mode: makefile -*-
+#
+# i386 linux-user TCG tests
+#
+# The Make is expected to be called in the
+# ${BUILD_DIR}/i386-linux-user/tests directory
+#
+
+BUILD_DIR=../..
+include $(BUILD_DIR)/config-host.mak	# brings in SRC_PATH
+include ../config-target.mak		# TARGET_NAME
 include $(SRC_PATH)/rules.mak
 
 $(call set-vpath, $(SRC_PATH)/tests/tcg/i386)
@@ -14,14 +22,8 @@ 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 \
 	   test-i386-fprem
-	   # runcom
 
 # native i386 compilers sometimes are not biarch.  assume cross-compilers are
 ifneq ($(ARCH),i386)
@@ -57,9 +59,6 @@ run-test-x86_64: test-x86_64
 	-$(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
diff --git a/tests/tcg/lm32/Makefile b/tests/tcg/lm32/Makefile
index 57e7363..ad5d9a7 100644
--- a/tests/tcg/lm32/Makefile
+++ b/tests/tcg/lm32/Makefile
@@ -1,8 +1,21 @@
--include ../../../config-host.mak
+# -*- Mode: makefile -*-
+#
+# lm32 linux-system TCG tests
+#
+# The Make is expected to be called in the
+# ${BUILD_DIR}/lm32-softmmu/tests directory
+#
+
+BUILD_DIR=../..
+include $(BUILD_DIR)/config-host.mak	# brings in SRC_PATH
+include ../config-target.mak		# TARGET_NAME
+include $(SRC_PATH)/rules.mak
+
+$(call set-vpath, $(SRC_PATH)/tests/tcg/lm32)
 
 CROSS=lm32-elf-
 
-SIM = qemu-system-lm32
+QEMU=$(BUILD_DIR)/lm32-softmmu/qemu-system-lm32
 SIMFLAGS = -M lm32-evr -nographic -semihosting -net none -kernel
 
 CC      = $(CROSS)gcc
diff --git a/tests/tcg/mips/Makefile b/tests/tcg/mips/Makefile
new file mode 100644
index 0000000..a56d6c8
--- /dev/null
+++ b/tests/tcg/mips/Makefile
@@ -0,0 +1,46 @@
+# -*- Mode: makefile -*-
+#
+# mips linux-user TCG tests
+#
+# The Make is expected to be called in the
+# ${BUILD_DIR}/mips-linux-user/tests directory
+#
+
+BUILD_DIR=../..
+include $(BUILD_DIR)/config-host.mak	# brings in SRC_PATH
+include ../config-target.mak		# TARGET_NAME
+include $(SRC_PATH)/rules.mak
+
+$(call set-vpath, $(SRC_PATH)/tests/tcg/mips)
+
+QEMU=$(BUILD_DIR)/mips-linux-user/qemu-mips
+
+# Compiler set-up, default to system compiler if not set
+CROSS_CC?=$(CC)
+
+CFLAGS=-Wall -O2 -g -fno-strict-aliasing
+LDFLAGS=
+
+TESTS=hello-mips
+
+all: $(patsubst %,run-%,$(TESTS))
+test: all
+
+# rules to run tests
+
+run-%: %
+	$(QEMU) ./$*
+
+#.PHONY: $(patsubst %,run-%,$(TESTS))
+
+run-hello-mips: hello-mips
+
+# mips test
+hello-mips: hello-mips.o
+	$(CROSS_CC) -o $@ $<
+
+hello-mips.o: hello-mips.c
+	$(CROSS_CC) -Wall -g -O2 -c -o $@ $<
+
+clean:
+	rm -f *~ *.o $(TESTS)
diff --git a/tests/tcg/mips/mips32-dsp/Makefile b/tests/tcg/mips/mips32-dsp/Makefile
index c3a0a00..996b9a0 100644
--- a/tests/tcg/mips/mips32-dsp/Makefile
+++ b/tests/tcg/mips/mips32-dsp/Makefile
@@ -1,8 +1,21 @@
--include ../../config-host.mak
+# -*- Mode: makefile -*-
+#
+# mipsel linux-user TCG tests
+#
+# The Make is expected to be called in the
+# ${BUILD_DIR}/mipsel-linux-user/tests directory
+#
+
+BUILD_DIR=../..
+include $(BUILD_DIR)/config-host.mak	# brings in SRC_PATH
+include ../config-target.mak		# TARGET_NAME
+include $(SRC_PATH)/rules.mak
+
+$(call set-vpath, $(SRC_PATH)/tests/tcg/mips/mips32-dsp)
 
 CROSS=mips64el-unknown-linux-gnu-
 
-SIM=qemu-mipsel
+SIM=$(BUILD_DIR)/mipsel-linux-user/qemu-mipsel
 SIM_FLAGS=-cpu 74Kf
 
 CC      = $(CROSS)gcc
diff --git a/tests/tcg/mips/mips32-dspr2/Makefile b/tests/tcg/mips/mips32-dspr2/Makefile
index ed19581..e99f2bc 100644
--- a/tests/tcg/mips/mips32-dspr2/Makefile
+++ b/tests/tcg/mips/mips32-dspr2/Makefile
@@ -1,8 +1,21 @@
--include ../../config-host.mak
+# -*- Mode: makefile -*-
+#
+# mipsel linux-user TCG tests
+#
+# The Make is expected to be called in the
+# ${BUILD_DIR}/mipsel-linux-user/tests directory
+#
+
+BUILD_DIR=../..
+include $(BUILD_DIR)/config-host.mak	# brings in SRC_PATH
+include ../config-target.mak		# TARGET_NAME
+include $(SRC_PATH)/rules.mak
+
+$(call set-vpath, $(SRC_PATH)/tests/tcg/mips/mips32-dsp)
 
 CROSS=mips64el-unknown-linux-gnu-
 
-SIM=qemu-mipsel
+SIM=$(BUILD_DIR)/mipsel-linux-user/qemu-mipsel
 SIM_FLAGS=-cpu 74Kf
 
 CC      = $(CROSS)gcc
diff --git a/tests/tcg/mips/mips64-dsp/Makefile b/tests/tcg/mips/mips64-dsp/Makefile
index b2ac6b3..4ee3bbb 100644
--- a/tests/tcg/mips/mips64-dsp/Makefile
+++ b/tests/tcg/mips/mips64-dsp/Makefile
@@ -1,7 +1,21 @@
+# -*- Mode: makefile -*-
+#
+# mips64el linux-user TCG tests
+#
+# The Make is expected to be called in the
+# ${BUILD_DIR}/mips64el-linux-user/tests directory
+#
 
-CROSS_COMPILE	?= mips64el-unknown-linux-gnu-
+BUILD_DIR=../..
+include $(BUILD_DIR)/config-host.mak	# brings in SRC_PATH
+include ../config-target.mak		# TARGET_NAME
+include $(SRC_PATH)/rules.mak
 
-SIM = qemu-system-mips64el
+$(call set-vpath, $(SRC_PATH)/tests/tcg/mips/mips64-dsp)
+
+CROSS=mips64el-unknown-linux-gnu-
+
+SIM=$(BUILD_DIR)/mipsel-linux-user/qemu-mips64el
 SIMFLAGS = -nographic -cpu mips64dspr2 -kernel
 
 AS      = $(CROSS_COMPILE)as
diff --git a/tests/tcg/mips/mips64-dspr2/Makefile b/tests/tcg/mips/mips64-dspr2/Makefile
index ba44bb9..8510d8c 100644
--- a/tests/tcg/mips/mips64-dspr2/Makefile
+++ b/tests/tcg/mips/mips64-dspr2/Makefile
@@ -1,6 +1,21 @@
+# -*- Mode: makefile -*-
+#
+# mips64el linux-user TCG tests
+#
+# The Make is expected to be called in the
+# ${BUILD_DIR}/mips64el-linux-user/tests directory
+#
+
+BUILD_DIR=../..
+include $(BUILD_DIR)/config-host.mak	# brings in SRC_PATH
+include ../config-target.mak		# TARGET_NAME
+include $(SRC_PATH)/rules.mak
+
+$(call set-vpath, $(SRC_PATH)/tests/tcg/mips/mips64-dsp)
+
 CROSS_COMPILE	?= mips64el-unknown-linux-gnu-
 
-SIM = qemu-system-mips64el
+SIM=$(BUILD_DIR)/mipsel-linux-user/qemu-mips64el
 SIMFLAGS = -nographic -cpu mips64dspr2 -kernel
 
 AS      = $(CROSS_COMPILE)as
diff --git a/tests/tcg/openrisc/Makefile b/tests/tcg/openrisc/Makefile
index 7e65888..071aaab 100644
--- a/tests/tcg/openrisc/Makefile
+++ b/tests/tcg/openrisc/Makefile
@@ -1,8 +1,21 @@
--include ../../config-host.mak
+# -*- Mode: makefile -*-
+#
+# openrisc linux-user TCG tests
+#
+# The Make is expected to be called in the
+# ${BUILD_DIR}/or32-linux-user/tests directory
+#
 
-CROSS = or32-linux-
+BUILD_DIR=../..
+include $(BUILD_DIR)/config-host.mak	# brings in SRC_PATH
+include ../config-target.mak		# TARGET_NAME
+include $(SRC_PATH)/rules.mak
+
+$(call set-vpath, $(SRC_PATH)/tests/tcg/openrisc)
 
-SIM = qemu-or32
+SIM=$(BUILD_DIR)/or32-linux-user/qemu-mips
+
+CROSS = or32-linux-
 
 CC = $(CROSS)gcc
 
diff --git a/tests/tcg/xtensa/Makefile b/tests/tcg/xtensa/Makefile
index 522a63e..e3269ed 100644
--- a/tests/tcg/xtensa/Makefile
+++ b/tests/tcg/xtensa/Makefile
@@ -1,10 +1,23 @@
--include ../../../config-host.mak
+# -*- Mode: makefile -*-
+#
+# xtensa linux TCG tests
+#
+# The Make is expected to be called in the
+# ${BUILD_DIR}/xtensa-softmmu/tests directory
+#
+
+BUILD_DIR=../..
+include $(BUILD_DIR)/config-host.mak	# brings in SRC_PATH
+include ../config-target.mak		# TARGET_NAME
+include $(SRC_PATH)/rules.mak
+
+$(call set-vpath, $(SRC_PATH)/tests/tcg/xtensa)
 
 CORE=dc232b
 CROSS=xtensa-$(CORE)-elf-
 
 ifndef XT
-SIM = ../../../xtensa-softmmu/qemu-system-xtensa
+SIM = $(BUILD_DIR)/xtensa-softmmu/qemu-system-xtensa
 SIMFLAGS = -M sim -cpu $(CORE) -nographic -semihosting $(EXTFLAGS) -kernel
 SIMDEBUG = -s -S
 else
-- 
2.10.2

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

* [Qemu-devel] [PATCH 19/19] tests/tcg: test-i386.c: Fix format warnings
  2016-12-01  5:14 [Qemu-devel] [PATCH v5 00/19] Cleanup of TCG tests Pranith Kumar
                   ` (16 preceding siblings ...)
  2016-12-01  5:14 ` [Qemu-devel] [PATCH 18/19] tests/tcg: Add and update Makefiles Pranith Kumar
@ 2016-12-01  5:14 ` Pranith Kumar
  2016-12-01  9:22 ` [Qemu-devel] [PATCH v5 00/19] Cleanup of TCG tests Peter Maydell
  2016-12-13 13:31 ` Alex Bennée
  19 siblings, 0 replies; 32+ messages in thread
From: Pranith Kumar @ 2016-12-01  5:14 UTC (permalink / raw)
  To: alex.bennee; +Cc: qemu-devel, rth

Signed-off-by: Pranith Kumar <bobby.prani@gmail.com>
---
 tests/tcg/i386/test-i386.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/tcg/i386/test-i386.c b/tests/tcg/i386/test-i386.c
index b0f8975..6a11c2f 100644
--- a/tests/tcg/i386/test-i386.c
+++ b/tests/tcg/i386/test-i386.c
@@ -2258,7 +2258,7 @@ SSE_OP(a ## sd);
         "pop %0\n"\
         : "=rm" (eflags)\
         : "x" (a.dq), "x" (b.dq));\
-    printf("%-9s: a=%f b=%f cc=%04x\n",\
+    printf("%-9s: a=%f b=%f cc=%04lx\n",\
            #op, a1, b1,\
            eflags & (CC_C | CC_P | CC_Z | CC_S | CC_O | CC_A));\
 }
-- 
2.10.2

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

* Re: [Qemu-devel] [PATCH v5 00/19] Cleanup of TCG tests
  2016-12-01  5:14 [Qemu-devel] [PATCH v5 00/19] Cleanup of TCG tests Pranith Kumar
                   ` (17 preceding siblings ...)
  2016-12-01  5:14 ` [Qemu-devel] [PATCH 19/19] tests/tcg: test-i386.c: Fix format warnings Pranith Kumar
@ 2016-12-01  9:22 ` Peter Maydell
  2016-12-01 13:17   ` Pranith Kumar
  2016-12-13 13:31 ` Alex Bennée
  19 siblings, 1 reply; 32+ messages in thread
From: Peter Maydell @ 2016-12-01  9:22 UTC (permalink / raw)
  To: Pranith Kumar; +Cc: Alex Bennée, QEMU Developers, Richard Henderson

On 1 December 2016 at 05:14, Pranith Kumar <bobby.prani@gmail.com> wrote:
> Hello,
>
> This patch series cleans up the tcg tests in tests/tcg folder.

>  linux-user/mmap.c                       |  27 +++---
>  linux-user/syscall.c                    |   2 +-

These aren't test code -- it would probably be better not
to mix actual bug fixes up in a series that's mostly trying
to fix up test code.

I'd still like to see what the plan is for having this
actually work given that you don't know whether there's a
cross-toolchain available. That's the fundamental reason
why these tests have been left to bitrot.

thanks
-- PMM

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

* Re: [Qemu-devel] [PATCH v5 00/19] Cleanup of TCG tests
  2016-12-01  9:22 ` [Qemu-devel] [PATCH v5 00/19] Cleanup of TCG tests Peter Maydell
@ 2016-12-01 13:17   ` Pranith Kumar
  0 siblings, 0 replies; 32+ messages in thread
From: Pranith Kumar @ 2016-12-01 13:17 UTC (permalink / raw)
  To: Peter Maydell; +Cc: Alex Bennée, QEMU Developers, Richard Henderson


Peter Maydell writes:

> On 1 December 2016 at 05:14, Pranith Kumar <bobby.prani@gmail.com> wrote:
>> Hello,
>>
>> This patch series cleans up the tcg tests in tests/tcg folder.
>
>>  linux-user/mmap.c                       |  27 +++---
>>  linux-user/syscall.c                    |   2 +-
>
> These aren't test code -- it would probably be better not
> to mix actual bug fixes up in a series that's mostly trying
> to fix up test code.

OK, I will send these in a separate series.

>
> I'd still like to see what the plan is for having this
> actually work given that you don't know whether there's a
> cross-toolchain available. That's the fundamental reason
> why these tests have been left to bitrot.

The current idea is to call these tests explicitly with the cross
compiler passed as an argument. We can, at the very least, download the cross
compilers and enable the tests in travis.

Thanks,
-- 
Pranith

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

* Re: [Qemu-devel] [PATCH 01/19] linux-user: fix settime old value location
  2016-12-01  5:14 ` [Qemu-devel] [PATCH 01/19] linux-user: fix settime old value location Pranith Kumar
@ 2016-12-09 17:01   ` Alex Bennée
  2016-12-10 11:22   ` Laurent Vivier
  1 sibling, 0 replies; 32+ messages in thread
From: Alex Bennée @ 2016-12-09 17:01 UTC (permalink / raw)
  To: Pranith Kumar; +Cc: qemu-devel, rth, Marc-André Lureau


Pranith Kumar <bobby.prani@gmail.com> writes:

> From: Marc-André Lureau <marcandre.lureau@redhat.com>
>
> old_value is the 4th argument of timer_settime(), not the 2nd.
>
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> Signed-off-by: Pranith Kumar <bobby.prani@gmail.com>

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

but this should really be sent in another series.

> ---
>  linux-user/syscall.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/linux-user/syscall.c b/linux-user/syscall.c
> index 7b77503..5bd477a 100644
> --- a/linux-user/syscall.c
> +++ b/linux-user/syscall.c
> @@ -12027,7 +12027,7 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,
>              target_to_host_itimerspec(&hspec_new, arg3);
>              ret = get_errno(
>                            timer_settime(htimer, arg2, &hspec_new, &hspec_old));
> -            host_to_target_itimerspec(arg2, &hspec_old);
> +            host_to_target_itimerspec(arg4, &hspec_old);
>          }
>          break;
>      }


--
Alex Bennée

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

* Re: [Qemu-devel] [PATCH 02/19] linux-user: fix tcg/mmap test
  2016-12-01  5:14 ` [Qemu-devel] [PATCH 02/19] linux-user: fix tcg/mmap test Pranith Kumar
@ 2016-12-09 17:12   ` Alex Bennée
  2016-12-10 14:08   ` Laurent Vivier
  1 sibling, 0 replies; 32+ messages in thread
From: Alex Bennée @ 2016-12-09 17:12 UTC (permalink / raw)
  To: Pranith Kumar; +Cc: qemu-devel, rth, Marc-André Lureau


Pranith Kumar <bobby.prani@gmail.com> writes:

> From: Marc-André Lureau <marcandre.lureau@redhat.com>
>
> tests/tcg/mmap test fails with values other than default target page
> size. When creating a map beyond EOF, extra anonymous pages are added up
> to the target page boundary. Currently, this operation is performed only
> when qemu_real_host_page_size < TARGET_PAGE_SIZE, but it should be
> performed if the configured page size (qemu -p) is larger than
> qemu_real_host_page_size too.
>
> (also fixes some style issues to please checkpatch)
>
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> Signed-off-by: Pranith Kumar <bobby.prani@gmail.com>

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

but again doesn't really need to be in this series

> ---
>  linux-user/mmap.c | 27 ++++++++++++++-------------
>  1 file changed, 14 insertions(+), 13 deletions(-)
>
> diff --git a/linux-user/mmap.c b/linux-user/mmap.c
> index 61685bf..0794a43 100644
> --- a/linux-user/mmap.c
> +++ b/linux-user/mmap.c
> @@ -418,31 +418,32 @@ abi_long target_mmap(abi_ulong start, abi_ulong len, int prot,
>      }
>
>      /* When mapping files into a memory area larger than the file, accesses
> -       to pages beyond the file size will cause a SIGBUS.
> +       to pages beyond the file size will cause a SIGBUS.
>
>         For example, if mmaping a file of 100 bytes on a host with 4K pages
>         emulating a target with 8K pages, the target expects to be able to
>         access the first 8K. But the host will trap us on any access beyond
> -       4K.
> +       4K.
>
>         When emulating a target with a larger page-size than the hosts, we
>         may need to truncate file maps at EOF and add extra anonymous pages
>         up to the targets page boundary.  */
>
> -    if ((qemu_real_host_page_size < TARGET_PAGE_SIZE)
> -        && !(flags & MAP_ANONYMOUS)) {
> -       struct stat sb;
> +    if ((qemu_real_host_page_size < qemu_host_page_size) &&
> +        !(flags & MAP_ANONYMOUS)) {
> +        struct stat sb;
>
> -       if (fstat (fd, &sb) == -1)
> -           goto fail;
> +        if (fstat(fd, &sb) == -1) {
> +            goto fail;
> +        }
>
>         /* Are we trying to create a map beyond EOF?.  */
> -       if (offset + len > sb.st_size) {
> -           /* If so, truncate the file map at eof aligned with
> -              the hosts real pagesize. Additional anonymous maps
> -              will be created beyond EOF.  */
> -           len = REAL_HOST_PAGE_ALIGN(sb.st_size - offset);
> -       }
> +        if (offset + len > sb.st_size) {
> +            /* If so, truncate the file map at eof aligned with
> +               the hosts real pagesize. Additional anonymous maps
> +               will be created beyond EOF.  */
> +            len = REAL_HOST_PAGE_ALIGN(sb.st_size - offset);
> +        }
>      }
>
>      if (!(flags & MAP_FIXED)) {


--
Alex Bennée

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

* Re: [Qemu-devel] [PATCH 03/19] check-help: add some hint to run a single test
  2016-12-01  5:14 ` [Qemu-devel] [PATCH 03/19] check-help: add some hint to run a single test Pranith Kumar
@ 2016-12-09 17:14   ` Alex Bennée
  0 siblings, 0 replies; 32+ messages in thread
From: Alex Bennée @ 2016-12-09 17:14 UTC (permalink / raw)
  To: Pranith Kumar; +Cc: qemu-devel, rth, Marc-André Lureau


Pranith Kumar <bobby.prani@gmail.com> writes:

> From: Marc-André Lureau <marcandre.lureau@redhat.com>
>
> It's possible to run the test directly, tests/test-foo, but then
> recompilation is not triggered and test environment variables aren't set
> for you.
>
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> Signed-off-by: Pranith Kumar <bobby.prani@gmail.com>

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

> ---
>  tests/Makefile.include | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/tests/Makefile.include b/tests/Makefile.include
> index e98d3b6..2a2b78d 100644
> --- a/tests/Makefile.include
> +++ b/tests/Makefile.include
> @@ -731,6 +731,7 @@ check-help:
>  	@echo " make check-qtest-TARGET   Run qtest tests for given target"
>  	@echo " make check-qtest          Run qtest tests"
>  	@echo " make check-unit           Run qobject tests"
> +	@echo " make check-tests/test-foo Run the tests/test-foo unit test only"
>  	@echo " make check-qapi-schema    Run QAPI schema tests"
>  	@echo " make check-block          Run block tests"
>  	@echo " make check-report.html    Generates an HTML test report"


--
Alex Bennée

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

* Re: [Qemu-devel] [PATCH 04/19] tests/tcg: comment unused code
  2016-12-01  5:14 ` [Qemu-devel] [PATCH 04/19] tests/tcg: comment unused code Pranith Kumar
@ 2016-12-09 17:15   ` Alex Bennée
  0 siblings, 0 replies; 32+ messages in thread
From: Alex Bennée @ 2016-12-09 17:15 UTC (permalink / raw)
  To: Pranith Kumar; +Cc: qemu-devel, rth, Marc-André Lureau


Pranith Kumar <bobby.prani@gmail.com> writes:

> From: Marc-André Lureau <marcandre.lureau@redhat.com>
>
> I didn't remove it, as suggest by checkpatch, because it looks like it
> may eventually be restored back.

I'm not so sure, especially with having full source control. Either fix
it or delete it please.

>
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> Signed-off-by: Pranith Kumar <bobby.prani@gmail.com>
> ---
>  tests/tcg/linux-test.c      | 8 ++++++--
>  tests/tcg/test-i386-fprem.c | 4 ++++
>  2 files changed, 10 insertions(+), 2 deletions(-)
>
> diff --git a/tests/tcg/linux-test.c b/tests/tcg/linux-test.c
> index 5070d31..38d163c 100644
> --- a/tests/tcg/linux-test.c
> +++ b/tests/tcg/linux-test.c
> @@ -350,6 +350,7 @@ void test_socket(void)
>
>  #define WCOUNT_MAX 512
>
> +#if 0
>  void test_pipe(void)
>  {
>      fd_set rfds, wfds;
> @@ -421,11 +422,13 @@ void test_clone(void)
>
>      stack1 = malloc(STACK_SIZE);
>      pid1 = chk_error(clone(thread1_func, stack1 + STACK_SIZE,
> -                           CLONE_VM | CLONE_FS | CLONE_FILES | SIGCHLD, "hello1"));
> +                           CLONE_VM | CLONE_FS | CLONE_FILES |
> +                           SIGCHLD, (void *)"hello1"));
>
>      stack2 = malloc(STACK_SIZE);
>      pid2 = chk_error(clone(thread2_func, stack2 + STACK_SIZE,
> -                           CLONE_VM | CLONE_FS | CLONE_FILES | SIGCHLD, "hello2"));
> +                           CLONE_VM | CLONE_FS | CLONE_FILES | SIGCHLD,
> +                           (void *)"hello2"));
>
>      while (waitpid(pid1, &status1, 0) != pid1);
>      free(stack1);
> @@ -435,6 +438,7 @@ void test_clone(void)
>          thread2_res != 6)
>          error("clone");
>  }
> +#endif
>
>  /***********************************/
>
> diff --git a/tests/tcg/test-i386-fprem.c b/tests/tcg/test-i386-fprem.c
> index 1a71623..1a2b144 100644
> --- a/tests/tcg/test-i386-fprem.c
> +++ b/tests/tcg/test-i386-fprem.c
> @@ -54,6 +54,7 @@ union float80u {
>
>  #define IEEE854_LONG_DOUBLE_BIAS 0x3fff
>
> +#if 0
>  static const union float80u q_nan = {
>      .ieee_nan.negative = 0,  /* X */
>      .ieee_nan.exponent = 0x7fff,
> @@ -61,6 +62,7 @@ static const union float80u q_nan = {
>      .ieee_nan.quiet_nan = 1,
>      .ieee_nan.mantissa = 0,
>  };
> +#endif
>
>  static const union float80u s_nan = {
>      .ieee_nan.negative = 0,  /* X */
> @@ -91,12 +93,14 @@ static const union float80u pos_denorm = {
>      .ieee.mantissa = 1,
>  };
>
> +#if 0
>  static const union float80u smallest_positive_norm = {
>      .ieee.negative = 0,
>      .ieee.exponent = 1,
>      .ieee.one = 1,
>      .ieee.mantissa = 0,
>  };
> +#endif
>
>  static void fninit()
>  {


--
Alex Bennée

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

* Re: [Qemu-devel] [PATCH 01/19] linux-user: fix settime old value location
  2016-12-01  5:14 ` [Qemu-devel] [PATCH 01/19] linux-user: fix settime old value location Pranith Kumar
  2016-12-09 17:01   ` Alex Bennée
@ 2016-12-10 11:22   ` Laurent Vivier
  1 sibling, 0 replies; 32+ messages in thread
From: Laurent Vivier @ 2016-12-10 11:22 UTC (permalink / raw)
  To: Pranith Kumar, alex.bennee; +Cc: Marc-André Lureau, qemu-devel, rth

Le 01/12/2016 à 06:14, Pranith Kumar a écrit :
> From: Marc-André Lureau <marcandre.lureau@redhat.com>
> 
> old_value is the 4th argument of timer_settime(), not the 2nd.
> 
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> Signed-off-by: Pranith Kumar <bobby.prani@gmail.com>
> ---
>  linux-user/syscall.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/linux-user/syscall.c b/linux-user/syscall.c
> index 7b77503..5bd477a 100644
> --- a/linux-user/syscall.c
> +++ b/linux-user/syscall.c
> @@ -12027,7 +12027,7 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,
>              target_to_host_itimerspec(&hspec_new, arg3);
>              ret = get_errno(
>                            timer_settime(htimer, arg2, &hspec_new, &hspec_old));
> -            host_to_target_itimerspec(arg2, &hspec_old);
> +            host_to_target_itimerspec(arg4, &hspec_old);
>          }
>          break;
>      }
> 

arg4 can be NULL.

You should check for the return value like in timerfd_settime.

In the kernel we have:

	if (old_setting && !error &&
	    copy_to_user(old_setting, &old_spec, sizeof (old_spec)))
		error = -EFAULT;

Laurent

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

* Re: [Qemu-devel] [PATCH 02/19] linux-user: fix tcg/mmap test
  2016-12-01  5:14 ` [Qemu-devel] [PATCH 02/19] linux-user: fix tcg/mmap test Pranith Kumar
  2016-12-09 17:12   ` Alex Bennée
@ 2016-12-10 14:08   ` Laurent Vivier
  1 sibling, 0 replies; 32+ messages in thread
From: Laurent Vivier @ 2016-12-10 14:08 UTC (permalink / raw)
  To: Pranith Kumar, alex.bennee; +Cc: Marc-André Lureau, qemu-devel, rth

Le 01/12/2016 à 06:14, Pranith Kumar a écrit :
> From: Marc-André Lureau <marcandre.lureau@redhat.com>
> 
> tests/tcg/mmap test fails with values other than default target page
> size. When creating a map beyond EOF, extra anonymous pages are added up
> to the target page boundary. Currently, this operation is performed only
> when qemu_real_host_page_size < TARGET_PAGE_SIZE, but it should be
> performed if the configured page size (qemu -p) is larger than
> qemu_real_host_page_size too.
> 
> (also fixes some style issues to please checkpatch)
> 
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> Signed-off-by: Pranith Kumar <bobby.prani@gmail.com>
> ---
>  linux-user/mmap.c | 27 ++++++++++++++-------------
>  1 file changed, 14 insertions(+), 13 deletions(-)
> 
> diff --git a/linux-user/mmap.c b/linux-user/mmap.c
> index 61685bf..0794a43 100644
> --- a/linux-user/mmap.c
> +++ b/linux-user/mmap.c
> @@ -418,31 +418,32 @@ abi_long target_mmap(abi_ulong start, abi_ulong len, int prot,
>      }
>  
>      /* When mapping files into a memory area larger than the file, accesses
> -       to pages beyond the file size will cause a SIGBUS. 
> +       to pages beyond the file size will cause a SIGBUS.
>  
>         For example, if mmaping a file of 100 bytes on a host with 4K pages
>         emulating a target with 8K pages, the target expects to be able to
>         access the first 8K. But the host will trap us on any access beyond
> -       4K.  
> +       4K.

You should not mix coding style update and fix: this hides what it is
done in the patch: one word change. I think checkpatch only requires
changes around the fix.

>         When emulating a target with a larger page-size than the hosts, we
>         may need to truncate file maps at EOF and add extra anonymous pages
>         up to the targets page boundary.  */
>  
> -    if ((qemu_real_host_page_size < TARGET_PAGE_SIZE)
> -        && !(flags & MAP_ANONYMOUS)) {
> -       struct stat sb;
> +    if ((qemu_real_host_page_size < qemu_host_page_size) &&

So it appears to be the fix :)

Reviewed-by: Laurent Vivier <laurent@vivier.eu>

Thanks,
Laurent

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

* Re: [Qemu-devel] [PATCH v5 00/19] Cleanup of TCG tests
  2016-12-01  5:14 [Qemu-devel] [PATCH v5 00/19] Cleanup of TCG tests Pranith Kumar
                   ` (18 preceding siblings ...)
  2016-12-01  9:22 ` [Qemu-devel] [PATCH v5 00/19] Cleanup of TCG tests Peter Maydell
@ 2016-12-13 13:31 ` Alex Bennée
  19 siblings, 0 replies; 32+ messages in thread
From: Alex Bennée @ 2016-12-13 13:31 UTC (permalink / raw)
  To: Pranith Kumar; +Cc: qemu-devel, rth


Pranith Kumar <bobby.prani@gmail.com> writes:

> Hello,
>
> This patch series cleans up the tcg tests in tests/tcg folder.
>
> The tests have bit-rotten and were not compiling or running. I fixed
> the Makefiles to make them compile though there are tests which do not
> pass.
>
> The motivation is to add litmus tests to each arch and have them run
> using the 'make check' target to test consistency on TCG.
>
> There are no maintainers listed for this test folder. So I am cc'ing
> people who I think might be interested.
>
> The tests are hooked to the 'tests-tcg' target. Alternatively, as
> suggested by Alex Bennee you can run a tcg tests for a particular arch
> from the build/<arch>-linux-user/tests directory as follows:
>
> $ CROSS_CC=<cross-compiler> make -f ../../tests/tcg/<arch>/Makefile

So admittedly this isn't using a cross compiler rather than a linux-user
powered docker image but I first of all had to:

  mkdir arm-linux-user/tests

And then running:

  docker run --rm -it -v /home/alex/lsrc/qemu/qemu.git/:/src --user=alex:alex -w /src/arm-linux-user/tests debian:armhf make -f ../../tests/tcg/arm/Makefile

yielded:

  ../../tests/tcg/arm/Makefile:12: /home/alex/lsrc/qemu/qemu.git/rules.mak: No such file or directory
  make: *** No rule to make target '/home/alex/lsrc/qemu/qemu.git/rules.mak'.  Stop.

Which I guess is a relative vs absolute problem. I wonder if there is a
way to make it cleaner in the event of these re-locations?

BTW running:

  docker run --rm -it -v /home/alex/lsrc/qemu/qemu.git/:/home/alex/lsrc/qemu/qemu.git/ --user=alex:alex -w /home/alex/lsrc/qemu/qemu.git/arm-linux-user/tests debian:armhf make -f ../../tests/tcg/arm/Makefile

Gives:

  cc -Wall -O2 -g -fno-strict-aliasing -nostdlib -c -o hello-arm.o /home/alex/lsrc/qemu/qemu.git/tests/tcg/arm/hello-arm.c
/tmp/ccaztzVL.s: Assembler messages:
/tmp/ccaztzVL.s:41: Error: invalid swi expression
/tmp/ccaztzVL.s:41: Error: value of 9437185 too large for field of 2 bytes at 6
/tmp/ccaztzVL.s:77: Error: invalid swi expression
/tmp/ccaztzVL.s:77: Error: value of 9437188 too large for field of 2 bytes at 30
/tmp/ccaztzVL.s:122: Error: invalid swi expression
/tmp/ccaztzVL.s:122: Error: value of 9437188 too large for field of 2 bytes at 60
/tmp/ccaztzVL.s:136: Error: invalid swi expression
/tmp/ccaztzVL.s:136: Error: value of 9437185 too large for field of 2 bytes at 68
../../tests/tcg/arm/Makefile:45: recipe for target 'hello-arm.o' failed
make: *** [hello-arm.o] Error 1


>
> Thanks,
> --
> Pranith
>
> Marc-André Lureau (9):
>   linux-user: fix settime old value location
>   linux-user: fix tcg/mmap test
>   check-help: add some hint to run a single test
>   tests/tcg: comment unused code
>   tests/tcg: declare some functions as static
>   linux-test: fix build
>   linux-test: fix set/getitimer returned timer check
>   Fix test-i386-fprem compilation
>   test-i386: modernize vector code v4sf
>
> Pranith Kumar (10):
>   tests/tcg: Move arm tests to arch specific folder
>   tests/tcg: Move mips test to arch specific folder
>   tests/tcg: Add tests-tcg hook in Makefile
>   tests/tcg/i386: Fix hello-i386 test
>   tests/tcg: Move i386 tests to arch specific folder
>   tests/tcg/i386: Fix test-i386 compilation
>   tests/tcg: Fix compilation of linux-test.c
>   tests/tcg: Move arch independent tests to misc directory
>   tests/tcg: Add and update Makefiles
>   tests/tcg: test-i386.c: Fix format warnings
>
>  linux-user/mmap.c                       |  27 +++---
>  linux-user/syscall.c                    |   2 +-
>  tests/Makefile.include                  |   2 +
>  tests/tcg/Makefile                      | 156 --------------------------------
>  tests/tcg/Makefile.include              |  33 +++++++
>  tests/tcg/alpha/Makefile                |  38 +++++---
>  tests/tcg/arm/Makefile                  |  51 +++++++++++
>  tests/tcg/{ => arm}/hello-arm.c         |   0
>  tests/tcg/{ => arm}/test-arm-iwmmxt.s   |   0
>  tests/tcg/cris/Makefile                 |  17 +++-
>  tests/tcg/i386/Makefile                 |  87 ++++++++++++++++++
>  tests/tcg/{ => i386}/hello-i386.c       |   9 +-
>  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  |  10 +-
>  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        |   7 +-
>  tests/tcg/{ => i386}/test-i386.h        |   0
>  tests/tcg/lm32/Makefile                 |  17 +++-
>  tests/tcg/mips/Makefile                 |  46 ++++++++++
>  tests/tcg/{ => mips}/hello-mips.c       |   0
>  tests/tcg/mips/mips32-dsp/Makefile      |  17 +++-
>  tests/tcg/mips/mips32-dspr2/Makefile    |  17 +++-
>  tests/tcg/mips/mips64-dsp/Makefile      |  18 +++-
>  tests/tcg/mips/mips64-dspr2/Makefile    |  17 +++-
>  tests/tcg/misc/Makefile                 |  81 +++++++++++++++++
>  tests/tcg/{ => misc}/linux-test.c       |  57 +++++++-----
>  tests/tcg/{ => misc}/sha1.c             |   0
>  tests/tcg/{ => misc}/test-mmap.c        |   2 +-
>  tests/tcg/{ => misc}/test_path.c        |   0
>  tests/tcg/{ => misc}/testthread.c       |   0
>  tests/tcg/openrisc/Makefile             |  19 +++-
>  tests/tcg/xtensa/Makefile               |  17 +++-
>  37 files changed, 518 insertions(+), 229 deletions(-)
>  delete mode 100644 tests/tcg/Makefile
>  create mode 100644 tests/tcg/Makefile.include
>  create mode 100644 tests/tcg/arm/Makefile
>  rename tests/tcg/{ => arm}/hello-arm.c (100%)
>  rename tests/tcg/{ => arm}/test-arm-iwmmxt.s (100%)
>  create mode 100644 tests/tcg/i386/Makefile
>  rename tests/tcg/{ => i386}/hello-i386.c (72%)
>  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 (98%)
>  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 (99%)
>  rename tests/tcg/{ => i386}/test-i386.h (100%)
>  create mode 100644 tests/tcg/mips/Makefile
>  rename tests/tcg/{ => mips}/hello-mips.c (100%)
>  create mode 100644 tests/tcg/misc/Makefile
>  rename tests/tcg/{ => misc}/linux-test.c (90%)
>  rename tests/tcg/{ => misc}/sha1.c (100%)
>  rename tests/tcg/{ => misc}/test-mmap.c (99%)
>  rename tests/tcg/{ => misc}/test_path.c (100%)
>  rename tests/tcg/{ => misc}/testthread.c (100%)


--
Alex Bennée

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

* Re: [Qemu-devel] [PATCH 16/19] tests/tcg: Fix compilation of linux-test.c
  2016-12-01  5:14 ` [Qemu-devel] [PATCH 16/19] tests/tcg: Fix compilation of linux-test.c Pranith Kumar
@ 2016-12-13 13:37   ` Alex Bennée
  0 siblings, 0 replies; 32+ messages in thread
From: Alex Bennée @ 2016-12-13 13:37 UTC (permalink / raw)
  To: Pranith Kumar; +Cc: qemu-devel, rth


Pranith Kumar <bobby.prani@gmail.com> writes:

> Signed-off-by: Pranith Kumar <bobby.prani@gmail.com>
> ---
>  tests/tcg/linux-test.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/tests/tcg/linux-test.c b/tests/tcg/linux-test.c
> index 24fce2b..e676e39 100644
> --- a/tests/tcg/linux-test.c
> +++ b/tests/tcg/linux-test.c
> @@ -41,6 +41,8 @@
>  #include <dirent.h>
>  #include <setjmp.h>
>  #include <sys/shm.h>
> +#include <stdbool.h>
> +#include <sys/resource.h>
>  #include "qemu/compiler.h"
>  #include "qemu/cutils.h"

Should this be merged with patch 6/19?

--
Alex Bennée

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

* Re: [Qemu-devel] [PATCH 17/19] tests/tcg: Move independent tests to misc dir
  2016-12-01  5:14 ` [Qemu-devel] [PATCH 17/19] tests/tcg: Move independent tests to misc dir Pranith Kumar
@ 2016-12-13 13:38   ` Alex Bennée
  0 siblings, 0 replies; 32+ messages in thread
From: Alex Bennée @ 2016-12-13 13:38 UTC (permalink / raw)
  To: Pranith Kumar; +Cc: qemu-devel, rth


Pranith Kumar <bobby.prani@gmail.com> writes:

> Signed-off-by: Pranith Kumar <bobby.prani@gmail.com>
> ---
>  tests/tcg/misc/Makefile           | 81 +++++++++++++++++++++++++++++++++++++++
>  tests/tcg/{ => misc}/linux-test.c |  0
>  tests/tcg/{ => misc}/sha1.c       |  0
>  tests/tcg/{ => misc}/test-mmap.c  |  0
>  tests/tcg/{ => misc}/test_path.c  |  0
>  tests/tcg/{ => misc}/testthread.c |  0
>  6 files changed, 81 insertions(+)
>  create mode 100644 tests/tcg/misc/Makefile
>  rename tests/tcg/{ => misc}/linux-test.c (100%)
>  rename tests/tcg/{ => misc}/sha1.c (100%)
>  rename tests/tcg/{ => misc}/test-mmap.c (100%)
>  rename tests/tcg/{ => misc}/test_path.c (100%)
>  rename tests/tcg/{ => misc}/testthread.c (100%)
>
> diff --git a/tests/tcg/misc/Makefile b/tests/tcg/misc/Makefile
> new file mode 100644
> index 0000000..0aa6f2e
> --- /dev/null
> +++ b/tests/tcg/misc/Makefile
> @@ -0,0 +1,81 @@
> +# -*- Mode: makefile -*-
> +#
> +# Generic linux-user TCG tests
> +#
> +# These tests all use standard non-architecture specific APIs so can
> +# be built for all TCG targets. The Make is expected to be called in
> +# the ${BUILD_DIR}/$(TARGET_NAME_ARCH)-linux-user/tests directory
> +#
> +# To build for other architectures call make with CROSS_CC set
> +#
> +
> +BUILD_DIR=../..
> +include $(BUILD_DIR)/config-host.mak	# brings in SRC_PATH
> +include ../config-target.mak		# TARGET_NAME
> +include $(SRC_PATH)/rules.mak
> +
> +$(call set-vpath, $(SRC_PATH)/tests/tcg/misc)
> +
> +QEMU=$(BUILD_DIR)/$(TARGET_NAME)-linux-user/qemu-$(TARGET_NAME)
> +
> +# Compiler set-up, default to system compiler if not set
> +CROSS_CC?=$(CC)
> +
> +CFLAGS=-Wall -O2 -g -fno-strict-aliasing -static
> +LDFLAGS=
> +
> +TESTS=linux-test \
> +      testthread \
> +      sha1 \
> +      test-mmap
> +
> +all: $(patsubst %,run-%,$(TESTS))
> +test: all
> +
> +# rules to run tests
> +
> +run-%: %
> +	-$(QEMU) ./$*
> +
> +run-linux-test: linux-test
> +run-testthread: testthread
> +run-sha1: sha1
> +run-test_path: test_path
> +
> +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-test_path: test_path
> +
> +# rules to compile tests
> +
> +# These two need to be re-written as relying on glib (rather than just glibc)
> +# test_path: test_path.o
> +# 	$(CROSS_CC) $^ -o $@ -lglib-2.0
> +
> +# test_path.o: test_path.c
> +# 	$(CROSS_CC) $^ -c -o $@ $(QEMU_INCLUDES) `pkg-config --cflags --libs glib-2.0`
> +
> +testthread: testthread.c
> +	$(CROSS_CC) $(CFLAGS) $(LDFLAGS) -o $@ $< -lpthread
> +
> +# generic Linux and CPU test
> +linux-test: linux-test.c
> +	$(CROSS_CC) $(CFLAGS) $(LDFLAGS) -o $@ $< -lm

This breaks the previous fix from 6/19

> +
> +test-mmap: test-mmap.c
> +	$(CROSS_CC) $(CFLAGS) -Wall -O2 $(LDFLAGS) -o $@ $< -static
> +
> +# speed test
> +sha1: sha1.c
> +	$(CROSS_CC) $(CFLAGS) $(LDFLAGS) -o $@ $<
> +
> +speed: sha1
> +	time ./sha1
> +	time $(QEMU) ./sha1
> +
> +clean:
> +	rm -f *~ *.o $(TESTS)
> diff --git a/tests/tcg/linux-test.c b/tests/tcg/misc/linux-test.c
> similarity index 100%
> rename from tests/tcg/linux-test.c
> rename to tests/tcg/misc/linux-test.c
> diff --git a/tests/tcg/sha1.c b/tests/tcg/misc/sha1.c
> similarity index 100%
> rename from tests/tcg/sha1.c
> rename to tests/tcg/misc/sha1.c
> diff --git a/tests/tcg/test-mmap.c b/tests/tcg/misc/test-mmap.c
> similarity index 100%
> rename from tests/tcg/test-mmap.c
> rename to tests/tcg/misc/test-mmap.c
> diff --git a/tests/tcg/test_path.c b/tests/tcg/misc/test_path.c
> similarity index 100%
> rename from tests/tcg/test_path.c
> rename to tests/tcg/misc/test_path.c
> diff --git a/tests/tcg/testthread.c b/tests/tcg/misc/testthread.c
> similarity index 100%
> rename from tests/tcg/testthread.c
> rename to tests/tcg/misc/testthread.c


--
Alex Bennée

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

* Re: [Qemu-devel] [PATCH 12/19] tests/tcg: Add tests-tcg hook in Makefile
  2016-12-01  5:14 ` [Qemu-devel] [PATCH 12/19] tests/tcg: Add tests-tcg hook in Makefile Pranith Kumar
@ 2016-12-13 17:10   ` Alex Bennée
  0 siblings, 0 replies; 32+ messages in thread
From: Alex Bennée @ 2016-12-13 17:10 UTC (permalink / raw)
  To: Pranith Kumar; +Cc: qemu-devel, rth


Pranith Kumar <bobby.prani@gmail.com> writes:

> You can call 'make tests-tcg' to build and run native tcg tests.
>
> Signed-off-by: Pranith Kumar <bobby.prani@gmail.com>

This breaks the normal make check output:

  GTESTER tests/ptimer-test
  CC      tests/tmp105-test.o
  CC      tests/libqos/pci.o
tests/libqos/pci.c:14:24: fatal error: libqos/pci.h: No such file or directory
compilation terminated.
/home/alex/lsrc/qemu/qemu.git/rules.mak:60: recipe for target 'tests/libqos/pci.o' failed
make: *** [tests/libqos/pci.o] Error 1


> ---
>  tests/Makefile.include     |  1 +
>  tests/tcg/Makefile.include | 33 +++++++++++++++++++++++++++++++++
>  2 files changed, 34 insertions(+)
>  create mode 100644 tests/tcg/Makefile.include
>
> diff --git a/tests/Makefile.include b/tests/Makefile.include
> index 2a2b78d..b046bdd 100644
> --- a/tests/Makefile.include
> +++ b/tests/Makefile.include
> @@ -836,3 +836,4 @@ all: $(QEMU_IOTESTS_HELPERS-y)
>
>  -include $(wildcard tests/*.d)
>  -include $(wildcard tests/libqos/*.d)
> +-include $(SRC_PATH)/tests/tcg/Makefile.include
> diff --git a/tests/tcg/Makefile.include b/tests/tcg/Makefile.include
> new file mode 100644
> index 0000000..3eff125
> --- /dev/null
> +++ b/tests/tcg/Makefile.include
> @@ -0,0 +1,33 @@
> +#
> +# linux-user TCG tests
> +#
> +# The Make is expected to be invoked in the ${BUILD_DIR} directory
> +# using the tests-tcg target
> +#
> +BUILD_DIR?=$(CURDIR)
> +include $(BUILD_DIR)/config-host.mak	# brings in SRC_PATH
> +
> +UNAME_M := $(shell uname -m)
> +
> +tests-tcg: prepare $(UNAME_M)
> +
> +prepare:
> +	mkdir -p $(BUILD_DIR)/$(UNAME_M)-linux-user/tests/
> +
> +x86_64:
> +	cd $(BUILD_DIR)/x86_64-linux-user/tests/ && \
> +	make -f $(SRC_PATH)/tests/tcg/i386/Makefile
> +
> +i386:
> +	cd $(BUILD_DIR)/i386-linux-user/tests/ && \
> +	make -f $(SRC_PATH)/tests/tcg/i386/Makefile
> +
> +arm:
> +	cd $(BUILD_DIR)/arm-linux-user/tests/ && \
> +	make -f $(SRC_PATH)/tests/tcg/arm/Makefile
> +
> +aarch64:
> +	cd $(BUILD_DIR)/aarch64-linux-user/tests/ && \
> +	make -f $(SRC_PATH)/tests/tcg/arm/Makefile
> +
> +.PHONY: tests-tcg


--
Alex Bennée

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

* Re: [Qemu-devel] [PATCH 18/19] tests/tcg: Add and update Makefiles
  2016-12-01  5:14 ` [Qemu-devel] [PATCH 18/19] tests/tcg: Add and update Makefiles Pranith Kumar
@ 2016-12-14 15:46   ` Alex Bennée
  0 siblings, 0 replies; 32+ messages in thread
From: Alex Bennée @ 2016-12-14 15:46 UTC (permalink / raw)
  To: Pranith Kumar; +Cc: qemu-devel, rth


Pranith Kumar <bobby.prani@gmail.com> writes:

> This commit fixes the makefiles to bring them to the desired state.
>
> Signed-off-by: Pranith Kumar <bobby.prani@gmail.com>
> ---
>  tests/tcg/alpha/Makefile             | 38 +++++++++++++++++++----------
>  tests/tcg/arm/Makefile               | 32 +++++++++++++++----------
>  tests/tcg/cris/Makefile              | 17 +++++++++++--
>  tests/tcg/i386/Makefile              | 23 +++++++++---------
>  tests/tcg/lm32/Makefile              | 17 +++++++++++--
>  tests/tcg/mips/Makefile              | 46 ++++++++++++++++++++++++++++++++++++
>  tests/tcg/mips/mips32-dsp/Makefile   | 17 +++++++++++--
>  tests/tcg/mips/mips32-dspr2/Makefile | 17 +++++++++++--
>  tests/tcg/mips/mips64-dsp/Makefile   | 18 ++++++++++++--
>  tests/tcg/mips/mips64-dspr2/Makefile | 17 ++++++++++++-
>  tests/tcg/openrisc/Makefile          | 19 ++++++++++++---
>  tests/tcg/xtensa/Makefile            | 17 +++++++++++--
>  12 files changed, 225 insertions(+), 53 deletions(-)
>  create mode 100644 tests/tcg/mips/Makefile

I think these changes should be split and merged with each move commit.
I should be able to manually build each individual test target with each move.

>
> diff --git a/tests/tcg/alpha/Makefile b/tests/tcg/alpha/Makefile
> index 2b1f03d..e20315f 100644
> --- a/tests/tcg/alpha/Makefile
> +++ b/tests/tcg/alpha/Makefile
> @@ -1,33 +1,47 @@
> -CROSS=alpha-linux-gnu-
> -CC=$(CROSS)gcc
> -AS=$(CROSS)as
> +# -*- Mode: makefile -*-
> +#
> +# Alpha linux-user TCG tests
> +#
> +# The Make is expected to be called in the
> +# ${BUILD_DIR}/alpha-linux-user/tests directory
> +#
>
> -SIM=../../alpha-linux-user/qemu-alpha
> +BUILD_DIR?=$(CURDIR)
> +include $(BUILD_DIR)/config-host.mak	# brings in SRC_PATH
> +include ../config-target.mak		# TARGET_NAME
> +include $(SRC_PATH)/rules.mak
>
> -CFLAGS=-O
> -LINK=$(CC) -o $@ crt.o $< -nostdlib
> +$(call set-vpath, $(SRC_PATH)/tests/tcg/alpha)
> +
> +QEMU=$(BUILD_DIR)/alpha-linux-user/qemu-alpha
> +
> +# Compiler set-up, default to system compiler if not set
> +CROSS_CC?=$(CC)
> +
> +CFLAGS=-Wall -O2 -g -fno-strict-aliasing -static
> +LDFLAGS=-nostdlib
>
>  TESTS=test-cond test-cmov
>
>  all: hello-alpha $(TESTS)
>
>  hello-alpha: hello-alpha.o crt.o
> -	$(LINK)
> +	$(CROSS_CC) -o $@ crt.o $< $(LDFLAGS)
>
>  test-cond: test-cond.o crt.o
> -	$(LINK)
> +	$(CROSS_CC) -o $@ crt.o $< $(LDFLAGS)
>
>  test-cmov.o: test-cond.c
> -	$(CC) -c $(CFLAGS) -DTEST_CMOV -o $@ $<
> +	$(CROSS_CC) -c $(CFLAGS) -DTEST_CMOV -o $@ $<
>
>  test-cmov: test-cmov.o crt.o
> -	$(LINK)
> +	$(CROSS_CC) -o $@ crt.o $< $(LDFLAGS)
>
>  test-ovf: test-ovf.o crt.o
> -	$(LINK)
> +	$(CROSS_CC) -o $@ crt.o $< $(LDFLAGS)
>
>  check: $(TESTS)
> -	for f in $(TESTS); do $(SIM) $$f || exit 1; done
> +	for f in $(TESTS); do $(QEMU) $$f || exit 1; done
>
>  clean:
>  	$(RM) *.o *~ hello-alpha $(TESTS)
> diff --git a/tests/tcg/arm/Makefile b/tests/tcg/arm/Makefile
> index c2ae491..a7c8953 100644
> --- a/tests/tcg/arm/Makefile
> +++ b/tests/tcg/arm/Makefile
> @@ -1,20 +1,26 @@
> -BUILD_DIR?=$(CURDIR)
> -SRC_PATH=../../../
> -include $(BUILD_DIR)/config-host.mak
> +# -*- Mode: makefile -*-
> +#
> +# Arm linux-user TCG tests
> +#
> +# The Make is expected to be called in the
> +# ${BUILD_DIR}/arm-linux-user/tests directory
> +#
> +
> +BUILD_DIR=../..
> +include $(BUILD_DIR)/config-host.mak	# brings in SRC_PATH
> +include ../config-target.mak		# TARGET_NAME
>  include $(SRC_PATH)/rules.mak
>
>  $(call set-vpath, $(SRC_PATH)/tests/tcg/arm)
>
>  QEMU=$(BUILD_DIR)/arm-linux-user/qemu-arm
>
> -QEMU_INCLUDES += -I$(BUILD_DIR)
> -CFLAGS=-Wall -O2 -g -fno-strict-aliasing
> -LDFLAGS=
> -
> -# TODO: automatically detect ARM and MIPS compilers, and run those too
> +# Compiler set-up, default to system compiler if not set
> +CROSS_CC?=$(CC)
>
> -# runcom maps page 0, so it requires root privileges
> -# also, pi_10.com runs indefinitely
> +QEMU_INCLUDES += -I$(BUILD_DIR)
> +CFLAGS=-Wall -O2 -g -fno-strict-aliasing -nostdlib
> +LDFLAGS=-nostdlib
>
>  TESTS=hello-arm arm-iwmmxt
>
> @@ -33,13 +39,13 @@ run-arm-iwmmxt: arm-iwmmxt
>
>  # arm test
>  hello-arm: hello-arm.o
> -	arm-linux-gnueabi-ld -o $@ $<
> +	$(CROSS_CC) $(LDFLAGS) -o $@ $<
>
>  hello-arm.o: hello-arm.c
> -	arm-linux-gnueabi-gcc -Wall -g -O2 -c -o $@ $<
> +	$(CROSS_CC) $(CFLAGS) -c -o $@ $<
>
>  arm-iwmmxt: test-arm-iwmmxt.s
> -	cpp < $< | arm-linux-gnueabi-gcc -Wall -static -march=iwmmxt -mabi=aapcs -x assembler - -o $@
> +	cpp < $< | $(CROSS_CC) -Wall -static -march=iwmmxt -mabi=aapcs -x assembler - -o $@
>
>  clean:
>  	rm -f *~ *.o $(TESTS)
> diff --git a/tests/tcg/cris/Makefile b/tests/tcg/cris/Makefile
> index 6b3dba4..009c3f4 100644
> --- a/tests/tcg/cris/Makefile
> +++ b/tests/tcg/cris/Makefile
> @@ -1,7 +1,20 @@
> --include ../../../config-host.mak
> +# -*- Mode: makefile -*-
> +#
> +# Cris linux-user TCG tests
> +#
> +# The Make is expected to be called in the
> +# ${BUILD_DIR}/cris-linux-user/tests directory
> +#
> +
> +BUILD_DIR=../..
> +include $(BUILD_DIR)/config-host.mak	# brings in SRC_PATH
> +include ../config-target.mak		# TARGET_NAME
> +include $(SRC_PATH)/rules.mak
> +
> +$(call set-vpath, $(SRC_PATH)/tests/tcg/arm)
>
>  CROSS=crisv32-axis-linux-gnu-
> -SIM=../../../cris-linux-user/qemu-cris -L ./
> +SIM=$(BUILD_DIR)/cris-linux-user/qemu-cris -L ./
>  SIMG=cris-axis-linux-gnu-run --sysroot=./
>
>  CC      = $(CROSS)gcc
> diff --git a/tests/tcg/i386/Makefile b/tests/tcg/i386/Makefile
> index 97c1a97..55a45ad 100644
> --- a/tests/tcg/i386/Makefile
> +++ b/tests/tcg/i386/Makefile
> @@ -1,6 +1,14 @@
> -BUILD_DIR=../../../build/
> -SRC_PATH=../../../
> -include $(BUILD_DIR)/config-host.mak
> +# -*- Mode: makefile -*-
> +#
> +# i386 linux-user TCG tests
> +#
> +# The Make is expected to be called in the
> +# ${BUILD_DIR}/i386-linux-user/tests directory
> +#
> +
> +BUILD_DIR=../..
> +include $(BUILD_DIR)/config-host.mak	# brings in SRC_PATH
> +include ../config-target.mak		# TARGET_NAME
>  include $(SRC_PATH)/rules.mak
>
>  $(call set-vpath, $(SRC_PATH)/tests/tcg/i386)
> @@ -14,14 +22,8 @@ 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 \
>  	   test-i386-fprem
> -	   # runcom
>
>  # native i386 compilers sometimes are not biarch.  assume cross-compilers are
>  ifneq ($(ARCH),i386)
> @@ -57,9 +59,6 @@ run-test-x86_64: test-x86_64
>  	-$(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
> diff --git a/tests/tcg/lm32/Makefile b/tests/tcg/lm32/Makefile
> index 57e7363..ad5d9a7 100644
> --- a/tests/tcg/lm32/Makefile
> +++ b/tests/tcg/lm32/Makefile
> @@ -1,8 +1,21 @@
> --include ../../../config-host.mak
> +# -*- Mode: makefile -*-
> +#
> +# lm32 linux-system TCG tests
> +#
> +# The Make is expected to be called in the
> +# ${BUILD_DIR}/lm32-softmmu/tests directory
> +#
> +
> +BUILD_DIR=../..
> +include $(BUILD_DIR)/config-host.mak	# brings in SRC_PATH
> +include ../config-target.mak		# TARGET_NAME
> +include $(SRC_PATH)/rules.mak
> +
> +$(call set-vpath, $(SRC_PATH)/tests/tcg/lm32)
>
>  CROSS=lm32-elf-
>
> -SIM = qemu-system-lm32
> +QEMU=$(BUILD_DIR)/lm32-softmmu/qemu-system-lm32
>  SIMFLAGS = -M lm32-evr -nographic -semihosting -net none -kernel
>
>  CC      = $(CROSS)gcc
> diff --git a/tests/tcg/mips/Makefile b/tests/tcg/mips/Makefile
> new file mode 100644
> index 0000000..a56d6c8
> --- /dev/null
> +++ b/tests/tcg/mips/Makefile
> @@ -0,0 +1,46 @@
> +# -*- Mode: makefile -*-
> +#
> +# mips linux-user TCG tests
> +#
> +# The Make is expected to be called in the
> +# ${BUILD_DIR}/mips-linux-user/tests directory
> +#
> +
> +BUILD_DIR=../..
> +include $(BUILD_DIR)/config-host.mak	# brings in SRC_PATH
> +include ../config-target.mak		# TARGET_NAME
> +include $(SRC_PATH)/rules.mak
> +
> +$(call set-vpath, $(SRC_PATH)/tests/tcg/mips)
> +
> +QEMU=$(BUILD_DIR)/mips-linux-user/qemu-mips
> +
> +# Compiler set-up, default to system compiler if not set
> +CROSS_CC?=$(CC)
> +
> +CFLAGS=-Wall -O2 -g -fno-strict-aliasing
> +LDFLAGS=
> +
> +TESTS=hello-mips
> +
> +all: $(patsubst %,run-%,$(TESTS))

We need new run targets for the tests - certainly a default make
shouldn't run the test.

> +test: all
> +
> +# rules to run tests
> +
> +run-%: %
> +	$(QEMU) ./$*
> +
> +#.PHONY: $(patsubst %,run-%,$(TESTS))
> +
> +run-hello-mips: hello-mips
> +
> +# mips test
> +hello-mips: hello-mips.o
> +	$(CROSS_CC) -o $@ $<
> +
> +hello-mips.o: hello-mips.c
> +	$(CROSS_CC) -Wall -g -O2 -c -o $@ $<
> +
> +clean:
> +	rm -f *~ *.o $(TESTS)
> diff --git a/tests/tcg/mips/mips32-dsp/Makefile b/tests/tcg/mips/mips32-dsp/Makefile
> index c3a0a00..996b9a0 100644
> --- a/tests/tcg/mips/mips32-dsp/Makefile
> +++ b/tests/tcg/mips/mips32-dsp/Makefile
> @@ -1,8 +1,21 @@
> --include ../../config-host.mak
> +# -*- Mode: makefile -*-
> +#
> +# mipsel linux-user TCG tests
> +#
> +# The Make is expected to be called in the
> +# ${BUILD_DIR}/mipsel-linux-user/tests directory
> +#
> +
> +BUILD_DIR=../..
> +include $(BUILD_DIR)/config-host.mak	# brings in SRC_PATH
> +include ../config-target.mak		# TARGET_NAME
> +include $(SRC_PATH)/rules.mak
> +
> +$(call set-vpath, $(SRC_PATH)/tests/tcg/mips/mips32-dsp)
>
>  CROSS=mips64el-unknown-linux-gnu-
>
> -SIM=qemu-mipsel
> +SIM=$(BUILD_DIR)/mipsel-linux-user/qemu-mipsel
>  SIM_FLAGS=-cpu 74Kf
>
>  CC      = $(CROSS)gcc
> diff --git a/tests/tcg/mips/mips32-dspr2/Makefile b/tests/tcg/mips/mips32-dspr2/Makefile
> index ed19581..e99f2bc 100644
> --- a/tests/tcg/mips/mips32-dspr2/Makefile
> +++ b/tests/tcg/mips/mips32-dspr2/Makefile
> @@ -1,8 +1,21 @@
> --include ../../config-host.mak
> +# -*- Mode: makefile -*-
> +#
> +# mipsel linux-user TCG tests
> +#
> +# The Make is expected to be called in the
> +# ${BUILD_DIR}/mipsel-linux-user/tests directory
> +#
> +
> +BUILD_DIR=../..
> +include $(BUILD_DIR)/config-host.mak	# brings in SRC_PATH
> +include ../config-target.mak		# TARGET_NAME
> +include $(SRC_PATH)/rules.mak
> +
> +$(call set-vpath, $(SRC_PATH)/tests/tcg/mips/mips32-dsp)
>
>  CROSS=mips64el-unknown-linux-gnu-
>
> -SIM=qemu-mipsel
> +SIM=$(BUILD_DIR)/mipsel-linux-user/qemu-mipsel
>  SIM_FLAGS=-cpu 74Kf
>
>  CC      = $(CROSS)gcc
> diff --git a/tests/tcg/mips/mips64-dsp/Makefile b/tests/tcg/mips/mips64-dsp/Makefile
> index b2ac6b3..4ee3bbb 100644
> --- a/tests/tcg/mips/mips64-dsp/Makefile
> +++ b/tests/tcg/mips/mips64-dsp/Makefile
> @@ -1,7 +1,21 @@
> +# -*- Mode: makefile -*-
> +#
> +# mips64el linux-user TCG tests
> +#
> +# The Make is expected to be called in the
> +# ${BUILD_DIR}/mips64el-linux-user/tests directory
> +#
>
> -CROSS_COMPILE	?= mips64el-unknown-linux-gnu-
> +BUILD_DIR=../..
> +include $(BUILD_DIR)/config-host.mak	# brings in SRC_PATH
> +include ../config-target.mak		# TARGET_NAME
> +include $(SRC_PATH)/rules.mak
>
> -SIM = qemu-system-mips64el
> +$(call set-vpath, $(SRC_PATH)/tests/tcg/mips/mips64-dsp)
> +
> +CROSS=mips64el-unknown-linux-gnu-
> +
> +SIM=$(BUILD_DIR)/mipsel-linux-user/qemu-mips64el
>  SIMFLAGS = -nographic -cpu mips64dspr2 -kernel
>
>  AS      = $(CROSS_COMPILE)as
> diff --git a/tests/tcg/mips/mips64-dspr2/Makefile b/tests/tcg/mips/mips64-dspr2/Makefile
> index ba44bb9..8510d8c 100644
> --- a/tests/tcg/mips/mips64-dspr2/Makefile
> +++ b/tests/tcg/mips/mips64-dspr2/Makefile
> @@ -1,6 +1,21 @@
> +# -*- Mode: makefile -*-
> +#
> +# mips64el linux-user TCG tests
> +#
> +# The Make is expected to be called in the
> +# ${BUILD_DIR}/mips64el-linux-user/tests directory
> +#
> +
> +BUILD_DIR=../..
> +include $(BUILD_DIR)/config-host.mak	# brings in SRC_PATH
> +include ../config-target.mak		# TARGET_NAME
> +include $(SRC_PATH)/rules.mak
> +
> +$(call set-vpath, $(SRC_PATH)/tests/tcg/mips/mips64-dsp)
> +
>  CROSS_COMPILE	?= mips64el-unknown-linux-gnu-
>
> -SIM = qemu-system-mips64el
> +SIM=$(BUILD_DIR)/mipsel-linux-user/qemu-mips64el
>  SIMFLAGS = -nographic -cpu mips64dspr2 -kernel
>
>  AS      = $(CROSS_COMPILE)as
> diff --git a/tests/tcg/openrisc/Makefile b/tests/tcg/openrisc/Makefile
> index 7e65888..071aaab 100644
> --- a/tests/tcg/openrisc/Makefile
> +++ b/tests/tcg/openrisc/Makefile
> @@ -1,8 +1,21 @@
> --include ../../config-host.mak
> +# -*- Mode: makefile -*-
> +#
> +# openrisc linux-user TCG tests
> +#
> +# The Make is expected to be called in the
> +# ${BUILD_DIR}/or32-linux-user/tests directory
> +#
>
> -CROSS = or32-linux-
> +BUILD_DIR=../..
> +include $(BUILD_DIR)/config-host.mak	# brings in SRC_PATH
> +include ../config-target.mak		# TARGET_NAME
> +include $(SRC_PATH)/rules.mak
> +
> +$(call set-vpath, $(SRC_PATH)/tests/tcg/openrisc)
>
> -SIM = qemu-or32
> +SIM=$(BUILD_DIR)/or32-linux-user/qemu-mips
> +
> +CROSS = or32-linux-
>
>  CC = $(CROSS)gcc
>
> diff --git a/tests/tcg/xtensa/Makefile b/tests/tcg/xtensa/Makefile
> index 522a63e..e3269ed 100644
> --- a/tests/tcg/xtensa/Makefile
> +++ b/tests/tcg/xtensa/Makefile
> @@ -1,10 +1,23 @@
> --include ../../../config-host.mak
> +# -*- Mode: makefile -*-
> +#
> +# xtensa linux TCG tests
> +#
> +# The Make is expected to be called in the
> +# ${BUILD_DIR}/xtensa-softmmu/tests directory
> +#
> +
> +BUILD_DIR=../..
> +include $(BUILD_DIR)/config-host.mak	# brings in SRC_PATH
> +include ../config-target.mak		# TARGET_NAME
> +include $(SRC_PATH)/rules.mak
> +
> +$(call set-vpath, $(SRC_PATH)/tests/tcg/xtensa)
>
>  CORE=dc232b
>  CROSS=xtensa-$(CORE)-elf-
>
>  ifndef XT
> -SIM = ../../../xtensa-softmmu/qemu-system-xtensa
> +SIM = $(BUILD_DIR)/xtensa-softmmu/qemu-system-xtensa
>  SIMFLAGS = -M sim -cpu $(CORE) -nographic -semihosting $(EXTFLAGS) -kernel
>  SIMDEBUG = -s -S
>  else


--
Alex Bennée

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

end of thread, other threads:[~2016-12-14 15:47 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-01  5:14 [Qemu-devel] [PATCH v5 00/19] Cleanup of TCG tests Pranith Kumar
2016-12-01  5:14 ` [Qemu-devel] [PATCH 01/19] linux-user: fix settime old value location Pranith Kumar
2016-12-09 17:01   ` Alex Bennée
2016-12-10 11:22   ` Laurent Vivier
2016-12-01  5:14 ` [Qemu-devel] [PATCH 02/19] linux-user: fix tcg/mmap test Pranith Kumar
2016-12-09 17:12   ` Alex Bennée
2016-12-10 14:08   ` Laurent Vivier
2016-12-01  5:14 ` [Qemu-devel] [PATCH 03/19] check-help: add some hint to run a single test Pranith Kumar
2016-12-09 17:14   ` Alex Bennée
2016-12-01  5:14 ` [Qemu-devel] [PATCH 04/19] tests/tcg: comment unused code Pranith Kumar
2016-12-09 17:15   ` Alex Bennée
2016-12-01  5:14 ` [Qemu-devel] [PATCH 06/19] linux-test: fix build Pranith Kumar
2016-12-01  5:14 ` [Qemu-devel] [PATCH 07/19] linux-test: fix set/getitimer returned timer check Pranith Kumar
2016-12-01  5:14 ` [Qemu-devel] [PATCH 08/19] Fix test-i386-fprem compilation Pranith Kumar
2016-12-01  5:14 ` [Qemu-devel] [PATCH 09/19] test-i386: modernize vector code v4sf Pranith Kumar
2016-12-01  5:14 ` [Qemu-devel] [PATCH 10/19] tests/tcg: Move arm tests to arch specific folder Pranith Kumar
2016-12-01  5:14 ` [Qemu-devel] [PATCH 11/19] tests/tcg: Move mips test " Pranith Kumar
2016-12-01  5:14 ` [Qemu-devel] [PATCH 12/19] tests/tcg: Add tests-tcg hook in Makefile Pranith Kumar
2016-12-13 17:10   ` Alex Bennée
2016-12-01  5:14 ` [Qemu-devel] [PATCH 13/19] tests/tcg/i386: Fix hello-i386 test Pranith Kumar
2016-12-01  5:14 ` [Qemu-devel] [PATCH 14/19] tests/tcg: Move i386 tests to arch specific folder Pranith Kumar
2016-12-01  5:14 ` [Qemu-devel] [PATCH 15/19] tests/tcg/i386: Fix test-i386 compilation Pranith Kumar
2016-12-01  5:14 ` [Qemu-devel] [PATCH 16/19] tests/tcg: Fix compilation of linux-test.c Pranith Kumar
2016-12-13 13:37   ` Alex Bennée
2016-12-01  5:14 ` [Qemu-devel] [PATCH 17/19] tests/tcg: Move independent tests to misc dir Pranith Kumar
2016-12-13 13:38   ` Alex Bennée
2016-12-01  5:14 ` [Qemu-devel] [PATCH 18/19] tests/tcg: Add and update Makefiles Pranith Kumar
2016-12-14 15:46   ` Alex Bennée
2016-12-01  5:14 ` [Qemu-devel] [PATCH 19/19] tests/tcg: test-i386.c: Fix format warnings Pranith Kumar
2016-12-01  9:22 ` [Qemu-devel] [PATCH v5 00/19] Cleanup of TCG tests Peter Maydell
2016-12-01 13:17   ` Pranith Kumar
2016-12-13 13:31 ` Alex Bennée

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.