From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A5B723A5E93; Sun, 5 Jul 2026 19:54:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783281274; cv=none; b=gvC1/xcxoNFEKn5SlLWQOcq0mzo07N2m3whmjxl/cb0axn3yga0J1bFgxz9UdOijva0L+8lFjXasrtkbltkwT12vnwicHF75xzNl/3BDrSsL8Db9HXpkF8BNDxAh/FqaJ7M3AMyc7XHGaPKQ6LyExhaqoHaF0a/AaWgJ9/mN1+A= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783281274; c=relaxed/simple; bh=bDg2K/JAravYV3SXIv6S0otSXySYDWv7zxbFGYDzP3s=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=Nsqj/rOZTDLdyjfWKXLI7DyNyF7hP54mq0HlrkYR1zuG7KDnAvpnJT93ncGK+0P+MAl8IsA9Ob+cm0ANJjmMkxQQ4vqy0U8AvJzvRlmdUt9Hy1I8D38x+fs7v7+mrFqYWM1eZFMlYX4kq79mtX5mr+K2GiltMYdVeh25794B2fg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=y+90/LM+; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=dtPREDPx; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="y+90/LM+"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="dtPREDPx" Date: Sun, 05 Jul 2026 19:54:23 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1783281265; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=YC0Fuwrqg/MIPTF1c3S35h72Kv7XYQFmpOjAZf/HeQ8=; b=y+90/LM+OTaaRT7YtY7zLDnoivGgdYfX26dBAAQlZxwpYDp5hCYdnDVHd8mcxcJ86+2pKY asWG0rzhHv2mGXrsu2jVUVWGMYHl7QtBL53VKyzuaHwsp8aNKUclUt6+K+uplHXFhkAkXU q6wosRO36VcKZxLpS6H27NSXKpnoeYhFEZaUW4HhkqKqQDljkfw/pFFdCcSKSi3HMxgEiN bivIVUCb+9g3HXLTmMLF31gAJcjgXnkQroKfgnvsN2Df52sTwTYxWoyEMtTAUqKB3/ZnxT l70z8p/aoEQ13fYtV/56XzA9fQ0sTmysm7900n4PEyGYdsxlOwyA+bZ/Gh8VVg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1783281265; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=YC0Fuwrqg/MIPTF1c3S35h72Kv7XYQFmpOjAZf/HeQ8=; b=dtPREDPxxmf/jeUU+rEyKur84UlcFgSF+i0DII+9aTQFluSpmGxX3rlBnL7Pw1BCgd9dxP jEQJOhZhkUDOymDw== From: "tip-bot2 for Wake Liu" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: locking/futex] selftests/futex: Dynamically skip unsupported tests Cc: Wake Liu , Thomas Gleixner , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20260624070223.1533167-1-wakel@google.com> References: <20260624070223.1533167-1-wakel@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <178328126341.744054.16792154276399354951.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Precedence: bulk Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable The following commit has been merged into the locking/futex branch of tip: Commit-ID: 50c121e5a57abe446e46825fb9c69ac419765d5c Gitweb: https://git.kernel.org/tip/50c121e5a57abe446e46825fb9c69ac4197= 65d5c Author: Wake Liu AuthorDate: Wed, 24 Jun 2026 07:02:23=20 Committer: Thomas Gleixner CommitterDate: Sun, 05 Jul 2026 21:49:18 +02:00 selftests/futex: Dynamically skip unsupported tests Some new futex tests rely on kernel features that may not be supported on all configurations (e.g., FUTEX2_NUMA or PR_FUTEX_HASH). Currently, these tests fail with EINVAL when the features are missing. Add dynamic skip logic to: - futex_priv_hash: Skip if PR_FUTEX_HASH returns ENOSYS or EINVAL. - futex_numa_mpol: Skip if futex2 or FUTEX2_NUMA returns ENOSYS or EINVAL. This allows the tests to pass (as SKIPPED) on kernels without support, while preserving coverage on configurations that do support them. [ tglx: Adapt to harness changes, massage change log ] Signed-off-by: Wake Liu Signed-off-by: Thomas Gleixner Link: https://patch.msgid.link/20260624070223.1533167-1-wakel@google.com --- tools/testing/selftests/futex/functional/futex_numa_mpol.c | 3 +++ tools/testing/selftests/futex/functional/futex_priv_hash.c | 3 +++ 2 files changed, 6 insertions(+) diff --git a/tools/testing/selftests/futex/functional/futex_numa_mpol.c b/too= ls/testing/selftests/futex/functional/futex_numa_mpol.c index c79184f..4ffcf41 100644 --- a/tools/testing/selftests/futex/functional/futex_numa_mpol.c +++ b/tools/testing/selftests/futex/functional/futex_numa_mpol.c @@ -107,6 +107,9 @@ static void __test_futex(struct __test_metadata *_metadat= a, void *futex_ptr, int break; } if (ret < 0) { + if (errno =3D=3D ENOSYS || (errno =3D=3D EINVAL && (futex_flags & FUTEX2_= NUMA))) + SKIP(return, "futex2 or FUTEX2_NUMA not supported by kernel"); + ASSERT_GE(ret, 0) { TH_LOG("Failed futex2_wake(%d, 0x%x): %s", to_wake, futex_flags, strerror(errno)); diff --git a/tools/testing/selftests/futex/functional/futex_priv_hash.c b/too= ls/testing/selftests/futex/functional/futex_priv_hash.c index a742a79..a8742e2 100644 --- a/tools/testing/selftests/futex/functional/futex_priv_hash.c +++ b/tools/testing/selftests/futex/functional/futex_priv_hash.c @@ -143,6 +143,9 @@ TEST(priv_hash) =20 /* First thread, expect to be 0, not yet initialized */ ret =3D futex_hash_slots_get(); + if (ret < 0 && errno =3D=3D EINVAL) + SKIP(return, "PR_FUTEX_HASH not supported by kernel"); + ASSERT_EQ(ret, 0) TH_LOG("futex_hash_slots_get() failed: %d, %s", ret, strerror(errno)); =20