]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
MIPS: run tst-mode-switch-{1,2,3}.c using test-skeleton.c
authorAurelien Jarno <aurelien@aurel32.net>
Mon, 27 Jun 2016 14:45:45 +0000 (16:45 +0200)
committerRyan S. Arnold <ryan.arnold@linaro.org>
Sat, 22 Oct 2016 16:49:06 +0000 (11:49 -0500)
For some reasons I have not investigated yet, tst-mode-switch-1 hangs on
a MIPS UTM-8 machine running an o32 userland and a 3.6.1 kernel.

This patch changes the test so that it runs under the test-skeleton
framework, causing the test to fail after a timeout instead of hanging
the whole testsuite. At the same time, also change the tst-mode-switch-2
and tst-mode-switch-3 tests.

Changelog:
* sysdeps/mips/tst-mode-switch-1.c (main): Converted to ...
(do_test): ... this.
(TEST_FUNCTION): New macro.
 Include test-skeleton.c.
* sysdeps/mips/tst-mode-switch-2.c (main): Likewise.
* sysdeps/mips/tst-mode-switch-3.c (main): Likewise.

(cherry picked from commit 0cdaef4dac5a885af9848e158e77cc347ee781bb)

ChangeLog
sysdeps/mips/tst-mode-switch-1.c
sysdeps/mips/tst-mode-switch-2.c
sysdeps/mips/tst-mode-switch-3.c

index 811e7d0d6bf4c0257e8a1158df3d34ec9c29fe01..fed0de70e178bb185761bca26ca254ad2c4c3223 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2016-06-27  Aurelien Jarno  <aurelien@aurel32.net>
+
+       * sysdeps/mips/tst-mode-switch-1.c (main): Converted to ...
+       (do_test): ... this.
+       (TEST_FUNCTION): New macro.
+        Include test-skeleton.c.
+       * sysdeps/mips/tst-mode-switch-2.c (main): Likewise.
+       * sysdeps/mips/tst-mode-switch-3.c (main): Likewise.
+
 2016-06-21  Aurelien Jarno  <aurelien@aurel32.net>
 
        * sysdeps/unix/sysv/linux/mips/vfork.S (__vfork): Rename into
index 1a26e4c7b50928b23d9b645466a6dd73adf33ff7..ebbdd3d9ebc03bd75cb03e09278a2392f1c0611c 100644 (file)
@@ -71,8 +71,8 @@ thread_function (void * arg __attribute__ ((unused)))
   return NULL;
 }
 
-int
-main (void)
+static int
+do_test (void)
 {
   int count = sysconf (_SC_NPROCESSORS_ONLN);
   if (count <= 0)
@@ -121,3 +121,6 @@ main (void)
 
   return result;
 }
+
+#define TEST_FUNCTION do_test ()
+#include "../../test-skeleton.c"
index b41acf45d3009d5bd7eaae1bfff4741cf12fa024..83dad80afee9645a468884119fc3423568bc710e 100644 (file)
@@ -77,8 +77,8 @@ thread_function (void * arg __attribute__ ((unused)))
   return NULL;
 }
 
-int
-main (void)
+static int
+do_test (void)
 {
   int count = sysconf (_SC_NPROCESSORS_ONLN);
   if (count <= 0)
@@ -161,3 +161,6 @@ main (void)
 
   return result;
 }
+
+#define TEST_FUNCTION do_test ()
+#include "../../test-skeleton.c"
index 65e2b5eebd83b7d41b0851166d49fac1625ea777..b0c76737fafce539bd0ec3d79c91c3fde646312e 100644 (file)
@@ -43,8 +43,8 @@ static jmp_buf env;
 float check1 = 2.0;
 double check2 = 3.0;
 
-int
-main (void)
+static int
+do_test (void)
 {
   int i;
   int result = 0;
@@ -88,3 +88,6 @@ main (void)
 
   return result;
 }
+
+#define TEST_FUNCTION do_test ()
+#include "../../test-skeleton.c"