public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
To: gcc-patches@gcc.gnu.org
Cc: Jakub Jelinek <jakub@redhat.com>, Andrew Stubbs <ams@baylibre.com>
Subject: [PATCH] libgomp: testsuite: Don't XPASS libgomp.c/alloc-pinned-1.c etc. on non-Linux targets [PR113448]
Date: Mon, 05 Feb 2024 14:04:35 +0100	[thread overview]
Message-ID: <yddplxbnjto.fsf@CeBiTec.Uni-Bielefeld.DE> (raw)

[-- Attachment #1: Type: text/plain, Size: 935 bytes --]

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

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University


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.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: libgomp-testsuite-alloc-pinned-non-linux.patch --]
[-- Type: text/x-patch, Size: 1203 bytes --]

# 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

             reply	other threads:[~2024-02-05 13:04 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-05 13:04 Rainer Orth [this message]
2024-02-12 13:30 ` Andrew Stubbs
2024-02-12 13:39   ` Jakub Jelinek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=yddplxbnjto.fsf@CeBiTec.Uni-Bielefeld.DE \
    --to=ro@cebitec.uni-bielefeld.de \
    --cc=ams@baylibre.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jakub@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).