]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libgomp: testsuite: Don't XPASS libgomp.c/alloc-pinned-1.c etc. on non-Linux targets...
authorRainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
Mon, 12 Feb 2024 13:44:17 +0000 (14:44 +0100)
committerRainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
Mon, 12 Feb 2024 13:44:17 +0000 (14:44 +0100)
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.

2024-02-02  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

libgomp:
PR testsuite/113448
* testsuite/libgomp.c/alloc-pinned-1.c [!__linux__] (CHECK_SIZE):
Call abort.
* testsuite/libgomp.c/alloc-pinned-2.c [!__linux__] (CHECK_SIZE):
Likewise.

libgomp/testsuite/libgomp.c/alloc-pinned-1.c
libgomp/testsuite/libgomp.c/alloc-pinned-2.c

index e17a21f0a6c0dd6c2c92dc5b191aa18d26f9449e..4185accf2e65df7bc6c49cc8f86278385b44fa0c 100644 (file)
@@ -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
index 3cf322cfbc86474516e14814bce7d1d326eaab6f..0b9c11d031580d9950970d63ee924ef388857bd3 100644 (file)
@@ -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