From patchwork Mon Jun 27 15:00:12 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aurelien Jarno X-Patchwork-Id: 13403 Received: (qmail 62325 invoked by alias); 27 Jun 2016 15:00:37 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 62311 invoked by uid 89); 27 Jun 2016 15:00:37 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=BAYES_00, KAM_LAZY_DOMAIN_SECURITY, RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=1216, 1213, o32, investigated X-HELO: hall.aurel32.net From: Aurelien Jarno To: libc-alpha@sourceware.org Cc: Joseph Myers , Matthew Fortune , Aurelien Jarno Subject: [PATCH] MIPS: run tst-mode-switch-{1,2,3}.c using test-skeleton.c Date: Mon, 27 Jun 2016 17:00:12 +0200 Message-Id: <1467039612-6050-1-git-send-email-aurelien@aurel32.net> 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. --- ChangeLog | 9 +++++++++ sysdeps/mips/tst-mode-switch-1.c | 5 ++++- sysdeps/mips/tst-mode-switch-2.c | 5 ++++- sysdeps/mips/tst-mode-switch-3.c | 5 ++++- 4 files changed, 21 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0847c8d..571333f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2016-06-27 Aurelien Jarno + + * 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 * sysdeps/unix/sysv/linux/mips/vfork.S (__vfork): Rename into diff --git a/sysdeps/mips/tst-mode-switch-1.c b/sysdeps/mips/tst-mode-switch-1.c index 1a26e4c..24e6f25 100644 --- a/sysdeps/mips/tst-mode-switch-1.c +++ b/sysdeps/mips/tst-mode-switch-1.c @@ -72,7 +72,7 @@ thread_function (void * arg __attribute__ ((unused))) } int -main (void) +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" diff --git a/sysdeps/mips/tst-mode-switch-2.c b/sysdeps/mips/tst-mode-switch-2.c index b41acf4..f4be2c4 100644 --- a/sysdeps/mips/tst-mode-switch-2.c +++ b/sysdeps/mips/tst-mode-switch-2.c @@ -78,7 +78,7 @@ thread_function (void * arg __attribute__ ((unused))) } int -main (void) +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" diff --git a/sysdeps/mips/tst-mode-switch-3.c b/sysdeps/mips/tst-mode-switch-3.c index 65e2b5e..02f7a43 100644 --- a/sysdeps/mips/tst-mode-switch-3.c +++ b/sysdeps/mips/tst-mode-switch-3.c @@ -44,7 +44,7 @@ float check1 = 2.0; double check2 = 3.0; int -main (void) +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"