From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1147) id C9F2B3858C98; Mon, 12 Feb 2024 13:45:07 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C9F2B3858C98 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1707745507; bh=jJzGkDvn90i9yAwJfnylSuNCN4HdSsEgl1p8AR1pPHI=; h=From:To:Subject:Date:From; b=kCpw8gqJ0f2riUSZ93VBbUGNtL9ew7mHg0PL+ZwzMpWxdi32a8UYGFKKjs8MD00CB 4BicdrnlGeM/4vz/aDwoYoDeiNuk6DDR9J/nDqAqk13MoXiZhsgA/3hg5lV6m6CtYE 9FVAea1tugJG8NDrOu0eiBLCDix6WRSTnu/btR9o= MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Rainer Orth To: gcc-cvs@gcc.gnu.org Subject: [gcc r14-8930] libgomp: testsuite: Don't XPASS libgomp.c/alloc-pinned-1.c etc. on non-Linux targets [PR113448] X-Act-Checkin: gcc X-Git-Author: Rainer Orth X-Git-Refname: refs/heads/master X-Git-Oldrev: 938a419182f8c43bd1212ffb98f8aa6077cf8326 X-Git-Newrev: 1e94648ab7b370c5867e146c7f59603e2e6ba2e6 Message-Id: <20240212134507.C9F2B3858C98@sourceware.org> Date: Mon, 12 Feb 2024 13:45:07 +0000 (GMT) List-Id: https://gcc.gnu.org/g:1e94648ab7b370c5867e146c7f59603e2e6ba2e6 commit r14-8930-g1e94648ab7b370c5867e146c7f59603e2e6ba2e6 Author: Rainer Orth Date: Mon Feb 12 14:44:17 2024 +0100 libgomp: testsuite: Don't XPASS libgomp.c/alloc-pinned-1.c etc. on non-Linux targets [PR113448] 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 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. Diff: --- libgomp/testsuite/libgomp.c/alloc-pinned-1.c | 5 ++++- libgomp/testsuite/libgomp.c/alloc-pinned-2.c | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/libgomp/testsuite/libgomp.c/alloc-pinned-1.c b/libgomp/testsuite/libgomp.c/alloc-pinned-1.c index e17a21f0a6c0..4185accf2e65 100644 --- 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 index 3cf322cfbc86..0b9c11d03158 100644 --- a/libgomp/testsuite/libgomp.c/alloc-pinned-2.c +++ b/libgomp/testsuite/libgomp.c/alloc-pinned-2.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