From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lj1-x22c.google.com (mail-lj1-x22c.google.com [IPv6:2a00:1450:4864:20::22c]) by sourceware.org (Postfix) with ESMTPS id 6A4413877015 for ; Wed, 12 Jun 2024 11:42:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 6A4413877015 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=baylibre.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 6A4413877015 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::22c ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1718192557; cv=none; b=cVvMCU7hai3iUXFkSPxBrn/h74DZ0yxuy4jjK0MPtai79KFVILncc56S9/E+D8DMdgKHywjJT780KNLIPbzGATmhcYt1AKxFCaTe7U/88r3vETjQgJfdOfUFphxFsFRtBy7rdtrv3ZsIwvFL9OqYxz/n3lzExrbKsXAdnF0rXWU= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1718192557; c=relaxed/simple; bh=qDiEON0RvuMgfQqNsBnOwJdxSYEgIjXaQpbs54jzC4U=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=G+ijhlRKzNYrLHPxvnlRFfTF3t3lF5rr11EbGTvf5zgk3XjVIbDUUx4PHhgUaEAG0uxwsiMALJ0usmlajNKEh6MDmh9REFeP+bW+A8dlbB0jjvB8viHXwqEbbmGtsAcq6OoQmsGVq2f7gq/apA2V182g48tlReC/5q6JWEsHZew= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-lj1-x22c.google.com with SMTP id 38308e7fff4ca-2eabd22d3f4so80225701fa.1 for ; Wed, 12 Jun 2024 04:42:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1718192552; x=1718797352; darn=gcc.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=4zClnyshK7E6HIt6ufmul2gNpuLyX8SjCBAFt48GZPA=; b=yz1jGgJr4IuuTKflorWuw4ialmqPwVtSkyQmhz4y0oiM9Cz//ZSBgvvtgcPT4ognhi Bvk57sPfgtcouzZVBHFdesohvuSpo9AXPzc8RR7hzihCun3LlN5TFQQTMQNIxX9JsahQ RqufQf+U+foX3vH3z5pa+zOPkz+lOgA8bGN4PWbQftcI/ibba9NKJ27VFZd2r8rslhd+ mjFDslLk+TBkdb6gbZqmd9zhpDOLXVj7OnUlDz03VnEsy1xhb7H4PCvbQtVLyxRvxn9/ wV0t7NM9BrXuOcaUc6as5Lb5P7ZBxqSio3yjb1FqdjvCofsk0CfxvgFFVdhrHpe6J9xw LWjg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718192552; x=1718797352; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=4zClnyshK7E6HIt6ufmul2gNpuLyX8SjCBAFt48GZPA=; b=DTWrIu47TBW14ZWcSdTDCZ0cUQzTvNC4a0wIdTFyOil/apc5wSlPM7KB4pqKlC7aKA ZreX99TYsrBdHxR4KOjy607OJSbmV9YLXWx+ByPs91gUypV6OuhN/4eopmIPKgIXeWwS p0VOsS1xw7SKkZSWDDPy3shOkCyABUvPCoWPFsBmsNcMhZCNtDitTQOi5W2dmaTwJz0A ARCSw2BQ/qSq3fdUUcR0qzStSQ7C46csoilj0wKn9D9QN6lWZ/f2DL5AXxe1SGzvGW56 8pEDPySn1GVpPCIZEXdOnI2m2hnqeZpYzFwE+ZtNWTpxmbvOkrmerE04dH99obOFAXPX zTUA== X-Gm-Message-State: AOJu0YwVC8Yjb6w0in9VsHrGXyEQDJGnSb7Z7ADbzNbIU64g71bc+xuW fRhYOclJ2gfS66+q2ROIBbM4+o2iBL+C0W1YgrFvCywPAN8eYMGfDpKjUK/sEV5iMaKMARsnSGm i7aQ= X-Google-Smtp-Source: AGHT+IHUXelC+QYyl4HKFKuUi6wrM+GLGJZQollqr2dN7+rFby40bg9NbR5aZ6z80NoyYFSqQ9OylQ== X-Received: by 2002:a2e:a310:0:b0:2eb:d825:e720 with SMTP id 38308e7fff4ca-2ebfc9295bbmr10370811fa.22.1718192551888; Wed, 12 Jun 2024 04:42:31 -0700 (PDT) Received: from arnold.baylibre (laubervilliers-658-1-213-31.w90-63.abo.wanadoo.fr. [90.63.244.31]) by smtp.googlemail.com with ESMTPSA id 5b1f17b1804b1-42286fe75ebsm23366235e9.9.2024.06.12.04.42.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jun 2024 04:42:31 -0700 (PDT) From: Andrew Stubbs To: gcc-patches@gcc.gnu.org Cc: tburnus@baylibre.com, jakub@redhat.com Subject: [PATCH v5 1/6] libgomp: change alloc-pinned tests failure mode Date: Wed, 12 Jun 2024 11:42:18 +0000 Message-ID: <20240612114223.2206735-2-ams@baylibre.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240612114223.2206735-1-ams@baylibre.com> References: <20240612114223.2206735-1-ams@baylibre.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-10.2 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: The feature doesn't work on non-Linux hosts, at present, so skip the tests entirely. On Linux systems that have insufficient lockable memory configured we still need to fail or else the feature won't be getting tested when we think it is, but now there's a message to explain why. libgomp/ChangeLog: * testsuite/libgomp.c/alloc-pinned-1.c: Change dg-xfail-run-if to dg-skip-if. Correct spelling mistake. Abort on insufficient lockable memory. Use #error on non-linux hosts. * testsuite/libgomp.c/alloc-pinned-2.c: Likewise. --- libgomp/testsuite/libgomp.c/alloc-pinned-1.c | 20 ++++++-------------- libgomp/testsuite/libgomp.c/alloc-pinned-2.c | 20 ++++++-------------- 2 files changed, 12 insertions(+), 28 deletions(-) diff --git a/libgomp/testsuite/libgomp.c/alloc-pinned-1.c b/libgomp/testsuite/libgomp.c/alloc-pinned-1.c index 4185accf2e6..672f2453a78 100644 --- a/libgomp/testsuite/libgomp.c/alloc-pinned-1.c +++ b/libgomp/testsuite/libgomp.c/alloc-pinned-1.c @@ -1,6 +1,6 @@ /* { dg-do run } */ -/* { dg-xfail-run-if "Pinning not implemented on this host" { ! *-*-linux-gnu } } */ +/* { dg-skip-if "Pinning not implemented on this host" { ! *-*-linux-gnu* } } */ /* Test that pinned memory works. */ @@ -19,7 +19,10 @@ struct rlimit limit; \ if (getrlimit (RLIMIT_MEMLOCK, &limit) \ || limit.rlim_cur <= SIZE) \ - fprintf (stderr, "unsufficient lockable memory; please increase ulimit\n"); \ + { \ + fprintf (stderr, "insufficient lockable memory; please increase ulimit\n"); \ + abort (); \ + } \ } int @@ -44,18 +47,7 @@ get_pinned_mem () abort (); } #else -#define PAGE_SIZE 1024 /* unknown */ -#define CHECK_SIZE(SIZE) { \ - fprintf (stderr, "OS unsupported\n"); \ - abort (); \ - } -#define EXPECT_OMP_NULL_ALLOCATOR - -int -get_pinned_mem () -{ - return 0; -} +#error "OS unsupported" #endif static void diff --git a/libgomp/testsuite/libgomp.c/alloc-pinned-2.c b/libgomp/testsuite/libgomp.c/alloc-pinned-2.c index 0b9c11d0315..b6d1d83fb6f 100644 --- a/libgomp/testsuite/libgomp.c/alloc-pinned-2.c +++ b/libgomp/testsuite/libgomp.c/alloc-pinned-2.c @@ -1,6 +1,6 @@ /* { dg-do run } */ -/* { dg-xfail-run-if "Pinning not implemented on this host" { ! *-*-linux-gnu } } */ +/* { dg-skip-if "Pinning not implemented on this host" { ! *-*-linux-gnu* } } */ /* Test that pinned memory works (pool_size code path). */ @@ -19,7 +19,10 @@ struct rlimit limit; \ if (getrlimit (RLIMIT_MEMLOCK, &limit) \ || limit.rlim_cur <= SIZE) \ - fprintf (stderr, "unsufficient lockable memory; please increase ulimit\n"); \ + { \ + fprintf (stderr, "insufficient lockable memory; please increase ulimit\n"); \ + abort (); \ + } \ } int @@ -44,18 +47,7 @@ get_pinned_mem () abort (); } #else -#define PAGE_SIZE 1024 /* unknown */ -#define CHECK_SIZE(SIZE) { \ - fprintf (stderr, "OS unsupported\n"); \ - abort (); \ - } -#define EXPECT_OMP_NULL_ALLOCATOR - -int -get_pinned_mem () -{ - return 0; -} +#error "OS unsupported" #endif static void -- 2.41.0