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 3FF2F3A6F1A; Sun, 5 Jul 2026 19:54:38 +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=1783281283; cv=none; b=B4MHSKboBpz4MXdGpw9Jztrnz770PGFTd6cDwB9G6C3oipMPZl85XMv5gE6ewcoj+7x8mLPAxUP2Mk15QjnPcfO/DSop0lgVbmjaH3TTEllm0aaezJWnQNGv+O2ZMvtYa3etSSUNjiAa0cTALSKzFRam5L/Mz6xSxsFuThYsP9I= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783281283; c=relaxed/simple; bh=2qx44+4XBVz+Y9S56gK1FcojsnIahE1DDT7gVjkW+Y8=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=oxjOBb3uXXRnUehJetvkYxpqATalPot+ZLayeZ/2GoApfYRoRTvwcvfA+VN3HFtV2ThkQlaXzMB4WXF7AVfUusq2EZRW0J0hYDQ9gy3Z5p16RL4fvxvRRJEed6+CLemcSxIpR+3ep4zUYJQhy+XQgW6XQQ73axo9D3YXYVN0scg= 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=2HoMmUjI; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=upiKbSbP; 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="2HoMmUjI"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="upiKbSbP" Date: Sun, 05 Jul 2026 19:54:35 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1783281277; 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=I0trtZhzhebnxVS5gnUfbDPVpWj7dV+5fPiddOygxIo=; b=2HoMmUjI4bi+/mRlX2IH2++G9xzzsb12Aiu3y2YTwxxOzn9RSLS30b2/XRSoOuyJBArduU fMflOGzrwHq3S5nk8SGNRZ8vQ9dqQlkzq9rUO2OU9VseaisddkqtwZbC68DGCLpdhY8FZn PE7yiPQZEaioq9YLoev5x+QZHzpVXT9nK736039MgTLrf3WhRzqsu+E8DhFSqogHfR2T31 M0RQIUIt6Zdf9UUTecwe+1+8deHvFbuFxUN26X+lDzLoJWIXImvRj9fRMf5E9CS4xN+W+0 oKdd6GVi74stm8MokXMFezDAEWyMAc04eNqzTKHSfkTtLSW387DR9KuY9U8fOw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1783281277; 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=I0trtZhzhebnxVS5gnUfbDPVpWj7dV+5fPiddOygxIo=; b=upiKbSbPBwWjMTaOiNmpY0cgLp4q5MEzBHN7C1CHJLNfp+M4V2krgV+ZUh0oF4a7nblnPI oPewPlrkVjVVLODw== 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: Migrate futex_wait_uninitialized_heap to harness Cc: Wake Liu , Thomas Gleixner , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20260525092002.3762888-4-wakel@google.com> References: <20260525092002.3762888-4-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: <178328127596.744054.1736135900097336580.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: 78834d8b9c99a6e2e000bb4019498ee76336887e Gitweb: https://git.kernel.org/tip/78834d8b9c99a6e2e000bb4019498ee7633= 6887e Author: Wake Liu AuthorDate: Mon, 25 May 2026 09:20:02=20 Committer: Thomas Gleixner CommitterDate: Sun, 05 Jul 2026 21:49:17 +02:00 selftests/futex: Migrate futex_wait_uninitialized_heap to harness Migrate futex_wait_uninitialized_heap test to the kselftest harness framework, removing mixed legacy ksft_* API usages and ensuring proper thread joining. [ tglx: Fixup coding style ] Signed-off-by: Wake Liu Signed-off-by: Thomas Gleixner Link: https://patch.msgid.link/20260525092002.3762888-4-wakel@google.com --- tools/testing/selftests/futex/functional/futex_wait_uninitialized_heap.c | 3= 5 ++++++++++++++++++++--------------- 1 file changed, 20 insertions(+), 15 deletions(-) diff --git a/tools/testing/selftests/futex/functional/futex_wait_uninitialize= d_heap.c b/tools/testing/selftests/futex/functional/futex_wait_uninitialized_= heap.c index b07d68a..bbffc23 100644 --- a/tools/testing/selftests/futex/functional/futex_wait_uninitialized_heap.c +++ b/tools/testing/selftests/futex/functional/futex_wait_uninitialized_heap.c @@ -17,17 +17,18 @@ * ***************************************************************************= **/ =20 +#include +#include #include #include #include +#include +#include +#include #include #include #include #include -#include -#include -#include -#include =20 #include "futextest.h" #include "kselftest_harness.h" @@ -40,6 +41,7 @@ void *buf; =20 void *wait_thread(void *arg) { + struct __test_metadata *_metadata =3D (struct __test_metadata *)arg; int res; =20 child_ret =3D true; @@ -47,7 +49,8 @@ void *wait_thread(void *arg) child_blocked =3D 0; =20 if (res !=3D 0 && errno !=3D EWOULDBLOCK) { - ksft_exit_fail_msg("futex failure\n"); + EXPECT_EQ(res, 0) + TH_LOG("futex failure: %s", strerror(errno)); child_ret =3D false; } pthread_exit(NULL); @@ -63,21 +66,23 @@ TEST(futex_wait_uninitialized_heap) =20 buf =3D mmap(NULL, page_size, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, 0, 0); - if (buf =3D=3D (void *)-1) - ksft_exit_fail_msg("mmap\n"); + ASSERT_NE(buf, MAP_FAILED) + TH_LOG("mmap failed: %s", strerror(errno)); =20 - ret =3D pthread_create(&thr, NULL, wait_thread, NULL); - if (ret) - ksft_exit_fail_msg("pthread_create\n"); + ret =3D pthread_create(&thr, NULL, wait_thread, _metadata); + ASSERT_EQ(ret, 0) + TH_LOG("pthread_create failed"); =20 - ksft_print_dbg_msg("waiting %dus for child to return\n", WAIT_US); + TH_LOG("waiting %dus for child to return", WAIT_US); usleep(WAIT_US); =20 - if (child_blocked) - ksft_test_result_fail("child blocked in kernel\n"); + EXPECT_EQ(child_blocked, 0) + TH_LOG("child blocked in kernel"); + EXPECT_TRUE(child_ret) + TH_LOG("child error"); =20 - if (!child_ret) - ksft_test_result_fail("child error\n"); + pthread_join(thr, NULL); + munmap(buf, page_size); } =20 TEST_HARNESS_MAIN