diff mbox series

libgomp: testsuite: Don't XPASS libgomp.c/alloc-pinned-1.c etc. on non-Linux targets [PR113448]

Message ID yddplxbnjto.fsf@CeBiTec.Uni-Bielefeld.DE
State New
Headers show
Series libgomp: testsuite: Don't XPASS libgomp.c/alloc-pinned-1.c etc. on non-Linux targets [PR113448] | expand

Commit Message

Rainer Orth Feb. 5, 2024, 1:04 p.m. UTC
Two libgomp tests XPASS on Solaris (any non-Linux target actually) since
their introduction:

XPASS: libgomp.c/alloc-pinned-1.c execution test
XPASS: libgomp.c/alloc-pinned-2.c execution test

The problem is that the test just prints

OS unsupported

and exits successfully, while the test is XFAILed:

/* { dg-xfail-run-if "Pinning not implemented on this host" { ! *-*-linux-gnu } } */

Fixed by aborting immediately after the message above in the non-Linux
case.

Tested on i386-pc-solaris2.11 and i686-pc-linux-gnu.

Ok for trunk?

	Rainer

Comments

Andrew Stubbs Feb. 12, 2024, 1:30 p.m. UTC | #1
On 05/02/2024 13:04, Rainer Orth wrote:
> Two libgomp tests XPASS on Solaris (any non-Linux target actually) since
> their introduction:
> 
> XPASS: libgomp.c/alloc-pinned-1.c execution test
> XPASS: libgomp.c/alloc-pinned-2.c execution test
> 
> The problem is that the test just prints
> 
> OS unsupported
> 
> and exits successfully, while the test is XFAILed:
> 
> /* { dg-xfail-run-if "Pinning not implemented on this host" { ! *-*-linux-gnu } } */
> 
> Fixed by aborting immediately after the message above in the non-Linux
> case.
> 
> Tested on i386-pc-solaris2.11 and i686-pc-linux-gnu.
> 
> Ok for trunk?

OK with me, FWIW.

Andrew
Jakub Jelinek Feb. 12, 2024, 1:39 p.m. UTC | #2
On Mon, Feb 12, 2024 at 01:30:31PM +0000, Andrew Stubbs wrote:
> On 05/02/2024 13:04, Rainer Orth wrote:
> > Two libgomp tests XPASS on Solaris (any non-Linux target actually) since
> > their introduction:
> > 
> > XPASS: libgomp.c/alloc-pinned-1.c execution test
> > XPASS: libgomp.c/alloc-pinned-2.c execution test
> > 
> > The problem is that the test just prints
> > 
> > OS unsupported
> > 
> > and exits successfully, while the test is XFAILed:
> > 
> > /* { dg-xfail-run-if "Pinning not implemented on this host" { ! *-*-linux-gnu } } */
> > 
> > Fixed by aborting immediately after the message above in the non-Linux
> > case.
> > 
> > Tested on i386-pc-solaris2.11 and i686-pc-linux-gnu.
> > 
> > Ok for trunk?
> 
> OK with me, FWIW.

LGTM as well.

	Jakub
diff mbox series

Patch

# HG changeset patch
# Parent  b7015efde7d6a48dd520698b470fcaf824758f21
libgomp: testsuite: Fix libgomp.c/alloc-pinned-1.c etc. on non-Linux targets [PR113085]

diff --git a/libgomp/testsuite/libgomp.c/alloc-pinned-1.c b/libgomp/testsuite/libgomp.c/alloc-pinned-1.c
--- a/libgomp/testsuite/libgomp.c/alloc-pinned-1.c
+++ b/libgomp/testsuite/libgomp.c/alloc-pinned-1.c
@@ -45,7 +45,10 @@  get_pinned_mem ()
 }
 #else
 #define PAGE_SIZE 1024 /* unknown */
-#define CHECK_SIZE(SIZE) fprintf (stderr, "OS unsupported\n");
+#define CHECK_SIZE(SIZE) { \
+  fprintf (stderr, "OS unsupported\n"); \
+  abort (); \
+  }
 #define EXPECT_OMP_NULL_ALLOCATOR
 
 int
diff --git a/libgomp/testsuite/libgomp.c/alloc-pinned-2.c b/libgomp/testsuite/libgomp.c/alloc-pinned-2.c
--- a/libgomp/testsuite/libgomp.c/alloc-pinned-2.c
+++ b/libgomp/testsuite/libgomp.c/alloc-pinned-2.c
@@ -45,12 +45,16 @@  get_pinned_mem ()
 }
 #else
 #define PAGE_SIZE 1024 /* unknown */
-#define CHECK_SIZE(SIZE) fprintf (stderr, "OS unsupported\n");
+#define CHECK_SIZE(SIZE) { \
+  fprintf (stderr, "OS unsupported\n"); \
+  abort (); \
+  }
 #define EXPECT_OMP_NULL_ALLOCATOR
 
 int
 get_pinned_mem ()
 {
+  abort ();
   return 0;
 }
 #endif