From nobody Wed Apr 1 10:00:28 2026 Received: from todd.t-8ch.de (todd.t-8ch.de [159.69.126.157]) (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 D4B7143D508 for ; Tue, 31 Mar 2026 17:51:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=159.69.126.157 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774979508; cv=none; b=Qd9oDuRsDylBPFTZTtI/C8FDplVcvP7AX7KPVgBQPfhZbf0iefdUl0Vt+wz0gC31ZvlHJCXLhA2sdYRL1QpMKsltlgyqOHVc1o9oF+PX8AI4HBiSNOAMTNjp9uJhw/O2nhEdMPkt85U4BcgN75iPwyJ29GmuMVJKleWcTeJHGE4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774979508; c=relaxed/simple; bh=3hZ7nnNcG2pmocjADzjshKOMnlzRdWqhmJwOI83TQcM=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=WC6N0QCeAbBkDj5fOe9JzCk/DBX848YLVyV2D3uHs9kQdrohtZf5ycDxTuzJ1b7XAFxpeiu2xOJ0Ir2NSSh7pglvQ/8cpU+EwOIYJIMSSLlc6k85fP3e7AbW22sJKmXUki10bsugqwgdbgCqlWHT+sME5It+2JXhgs0XLqlTIWs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=weissschuh.net; spf=pass smtp.mailfrom=weissschuh.net; dkim=pass (1024-bit key) header.d=weissschuh.net header.i=@weissschuh.net header.b=uQtJQr/L; arc=none smtp.client-ip=159.69.126.157 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=weissschuh.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=weissschuh.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=weissschuh.net header.i=@weissschuh.net header.b="uQtJQr/L" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=weissschuh.net; s=mail; t=1774979503; bh=3hZ7nnNcG2pmocjADzjshKOMnlzRdWqhmJwOI83TQcM=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=uQtJQr/LUbvX92PZ0pnxP2F2rOm3sRgEbaygP4VZ57azzyA83A0RG+dVK4vMvTG3Z AY1j6lLQYE+LNNEw3HK+4wGrf0ChJZnf/xptbN6TYklCy+8m0krfdS13q+LddR3ghm EP+cNRvjc/iYpLTZHnbXYLLLkd8CzkSTHIaheR0g= From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= Date: Tue, 31 Mar 2026 19:51:41 +0200 Subject: [PATCH 1/6] selftests/nolibc: add some tests for makedev() and friends Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260331-nolibc-makedev-v1-1-ee79ee31e4d6@weissschuh.net> References: <20260331-nolibc-makedev-v1-0-ee79ee31e4d6@weissschuh.net> In-Reply-To: <20260331-nolibc-makedev-v1-0-ee79ee31e4d6@weissschuh.net> To: Willy Tarreau Cc: linux-kernel@vger.kernel.org, =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Mailer: b4 0.15.1 X-Developer-Signature: v=1; a=ed25519-sha256; t=1774979502; l=1235; i=linux@weissschuh.net; s=20221212; h=from:subject:message-id; bh=3hZ7nnNcG2pmocjADzjshKOMnlzRdWqhmJwOI83TQcM=; b=gjVCkk9qClkPyjUVXMNpV1yUEk7xD3BQLufD9yxk435XX436/vf9LphZPhfVEoFug09FxvDwl uAJaUenI/uTCWZ1M8nJP/ZimUSlkVVVYlmXeFmXAkEuCS8NAMEoGD4N X-Developer-Key: i=linux@weissschuh.net; a=ed25519; pk=KcycQgFPX2wGR5azS7RhpBqedglOZVgRPfdFSPB1LNw= These functions/macros are about to be changed. Add some tests to make sure they continue working. As they only handle small dev_t values, only test those for now. Signed-off-by: Thomas Wei=C3=9Fschuh --- tools/testing/selftests/nolibc/nolibc-test.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/testing/selftests/nolibc/nolibc-test.c b/tools/testing/s= elftests/nolibc/nolibc-test.c index 1efd10152e83..fec098ed71e5 100644 --- a/tools/testing/selftests/nolibc/nolibc-test.c +++ b/tools/testing/selftests/nolibc/nolibc-test.c @@ -1680,6 +1680,9 @@ int run_stdlib(int min, int max) CASE_TEST(memchr_foobar6_o); EXPECT_STREQ(1, memchr("foobar", 'o'= , 6), "oobar"); break; CASE_TEST(memchr_foobar3_b); EXPECT_STRZR(1, memchr("foobar", 'b'= , 3)); break; CASE_TEST(time_types); EXPECT_ZR(is_nolibc, test_time_types= ()); break; + CASE_TEST(makedev); EXPECT_EQ(1, makedev(0x12, 0x34), 0x= 1234); break; + CASE_TEST(major); EXPECT_EQ(1, major(0x1234), 0x12); b= reak; + CASE_TEST(minor); EXPECT_EQ(1, minor(0x1234), 0x34); b= reak; =20 case __LINE__: return ret; /* must be last */ --=20 2.53.0