From 0cdaef4dac5a885af9848e158e77cc347ee781bb Mon Sep 17 00:00:00 2001 From: Aurelien Jarno Date: Mon, 27 Jun 2016 16:45:45 +0200 Subject: MIPS: run tst-mode-switch-{1,2,3}.c using test-skeleton.c 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. --- sysdeps/mips/tst-mode-switch-1.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'sysdeps/mips/tst-mode-switch-1.c') diff --git a/sysdeps/mips/tst-mode-switch-1.c b/sysdeps/mips/tst-mode-switch-1.c index 1a26e4c..ebbdd3d 100644 --- a/sysdeps/mips/tst-mode-switch-1.c +++ b/sysdeps/mips/tst-mode-switch-1.c @@ -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" -- cgit v1.1