From nobody Sat Oct 11 04:17:26 2025 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 8E716263F5E; Wed, 11 Jun 2025 10:34:01 +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=1749638043; cv=none; b=CnvflimFPneXhQmVKPl6B02wkV9QA6hvUmewg6G5fbkj5UnC7DLioSif0EhBAw7Ziaedx+e3X/TIBG7oFWAdc2ZFj/4komZYCgIZOwUvExxebeBorXpQvk3copilGOzW72G+1jpOzP+Q3EZYdhtPh8gtnCL4e5mTUQreXpxS2+Y= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1749638043; c=relaxed/simple; bh=L0qtb8FJX1isKiB/PbWpoGiF8bcQshhPPSDSunRZq94=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=EXVfzUtQi3qD0Kc5jvl8JDeLTQWrg4JCkfNKfZsVbhG4LIF/Npu0uOyx9KSqpNZvl8+X77KFe+qh7DLnd/qZzKnL04/L3ChiHUQl++MyKheo3Hw7XMv9gjsKI22JstdjyROy08zl5mfqSrZ786232OkmOqA6iOpemrN4a2e696w= 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=q3Cc3nxj; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=aJkrAz4n; 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="q3Cc3nxj"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="aJkrAz4n" From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1749638039; h=from:from: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=DgzEmy6Q/OWuk6h5GBXCorQ/DWv5dXNm4qfWcJTsUEM=; b=q3Cc3nxj5u7u6U3M0PcbdtkEdq74PeaAH1oxUIUiFfUMl2AjqvUnmK8UKaGQiFRZWWsXvT carCwZVK/HUpHhJTsnIhGkecnt4JdcGot4NZ6N0mTio9a6Gvl3sHvpAFuxO9m/FTjUdGc6 ZM9JVxPwcHvz0q4rzKuW2gVGtCHwQySAYdqd+rZiQgR6O/009F51/Yw3sZD8stikaPMCDm g3glYr2qgtFOKD9PsO0QHjEacapz+924Ibzv7Md7bdA/kT/rxgkOMaq8xAQYtS05yubwST Xy2e5A2hqLT/8LzNymw9+Jjtg6FzL1WCFz5k70NbBWeT6BLpBRDkMThC/okzFQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1749638039; h=from:from: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=DgzEmy6Q/OWuk6h5GBXCorQ/DWv5dXNm4qfWcJTsUEM=; b=aJkrAz4nkCFJ7+IylA826gp5jWp/7zaI1aluJYvLevikYv4O/bUj6JAY9A0bPG7qGNdubt vioVeQzr2o/Vc/Ag== Date: Wed, 11 Jun 2025 12:33:51 +0200 Subject: [PATCH v3 1/9] selftests: vDSO: chacha: Correctly skip test if necessary 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: <20250611-selftests-vdso-fixes-v3-1-e62e37a6bcf5@linutronix.de> References: <20250611-selftests-vdso-fixes-v3-0-e62e37a6bcf5@linutronix.de> In-Reply-To: <20250611-selftests-vdso-fixes-v3-0-e62e37a6bcf5@linutronix.de> To: Andy Lutomirski , Thomas Gleixner , Vincenzo Frascino , Shuah Khan , "Jason A. Donenfeld" Cc: Shuah Khan , linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, Muhammad Usama Anjum , =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Developer-Signature: v=1; a=ed25519-sha256; t=1749638036; l=1694; i=thomas.weissschuh@linutronix.de; s=20240209; h=from:subject:message-id; bh=L0qtb8FJX1isKiB/PbWpoGiF8bcQshhPPSDSunRZq94=; b=sk38Q59JAJgowvu3C3xg6KwtDmmJnOLXih4uMXCKBJb81SSOrk5zp1kwqrW6PvcMHUpoK1KCM 0G94ScVmH33BUXSi94mo+XEvZWFAbKCXAPQ3f6Brg7FWP4vFK+EOZz1 X-Developer-Key: i=thomas.weissschuh@linutronix.de; a=ed25519; pk=pfvxvpFUDJV2h2nY0FidLUml22uGLSjByFbM6aqQQws= According to kselftest.h ksft_exit_skip() is not meant to be called when a plan has already been printed. Use the recommended function ksft_test_result_skip(). This fixes a bug, where the TAP output would be invalid when skipping: TAP version 13 1..1 ok 2 # SKIP Not implemented on architecture The SKIP line should start with "ok 1" as the plan only contains one test. Fixes: 3b5992eaf730 ("selftests: vDSO: unconditionally build chacha test") Reviewed-by: Muhammad Usama Anjum Signed-off-by: Thomas Wei=C3=9Fschuh --- I'm not sure if this is not a general bug in ksft_exit_skip(). First ksft_xskip is incremented then read back through ksft_test_num() and then that result is incremented again. In any case, using the correct function is better. --- tools/testing/selftests/vDSO/vdso_test_chacha.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/testing/selftests/vDSO/vdso_test_chacha.c b/tools/testin= g/selftests/vDSO/vdso_test_chacha.c index 8757f738b0b1a76a48c83c5e5df79925a30c1bc7..0aad682b12c8836efabb49a65a4= 7cf87466891a3 100644 --- a/tools/testing/selftests/vDSO/vdso_test_chacha.c +++ b/tools/testing/selftests/vDSO/vdso_test_chacha.c @@ -76,7 +76,8 @@ static void reference_chacha20_blocks(uint8_t *dst_bytes,= const uint32_t *key, u =20 void __weak __arch_chacha20_blocks_nostack(uint8_t *dst_bytes, const uint3= 2_t *key, uint32_t *counter, size_t nblocks) { - ksft_exit_skip("Not implemented on architecture\n"); + ksft_test_result_skip("Not implemented on architecture\n"); + ksft_finished(); } =20 int main(int argc, char *argv[]) --=20 2.49.0 From nobody Sat Oct 11 04:17:26 2025 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 6FDCC25A344; Wed, 11 Jun 2025 10:34:02 +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=1749638044; cv=none; b=ligU0JWHCrGlykh80DUmztLpDB8n9ZUUbtAtPKlDBUahy+E8rDMz6oTMcx3QMKsRiB9Ugue3u8f2SPquCxKrP4Q29NfuRvyNLvgWatncJYi4xveCnhBr6G1by+uGjdaytCYwZ+HOxmnvWX8nprqowGLnjJam05mpCBG6iULGatw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1749638044; c=relaxed/simple; bh=J9hKPnnc2A0cweqLzbgQ20+H2ZBdLzJrRKeSWwaEXh8=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=RN0CEwXjwz+mp1JdNELNRQYUbD11ryzNkojYtle1MP3ygACAaFxA0IX1oZpj+XedyQqk/jk5P7aHDfD+82sK/yY37w7RnE9+NOyCOkZerAv3pZ+TKyhmpjHqtxkdqUQSQqpr63o+piV10POeFfNPen34nH9E/68uazRW0tpAkeE= 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=c+H+mxQw; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=N5biRCCU; 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="c+H+mxQw"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="N5biRCCU" From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1749638040; h=from:from: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=Z70zMxE+h3XzbWkN3rpdJuxDTk7yXimHYHKQ9cAetLs=; b=c+H+mxQwkXNadV6IADUyk/QHGqP1VnmC6r+TjlBnlZ9SPfYPRQI84mQzbChgxjyAvQdo1j b1OdgGnKbJklSKkarKTWYfVcMpuHK93untz9PScVgmcePazZDx5Jom4Cwy0Yjj8VBhDWQV gRHMGJoMGUjZzXHMOLTkfu1CRFpko8WJHAdYC/HkADrRit38e+B2Md2i3OU/yP8dk3s0hX njI4ipFrktFcS1SBwudLA4i+QyldUkDakYR502LjGxQYDF9Woes7Z2KlpU/cfHF6zNBl0h dPfeSBCtXRtCJ0YSXpNulkWUpbzmxMXxdNSbuAOq16eB/3RzJhHid2Vt7pkJlg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1749638040; h=from:from: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=Z70zMxE+h3XzbWkN3rpdJuxDTk7yXimHYHKQ9cAetLs=; b=N5biRCCU2jlQe+YQbXJmdSUJCpQMJBDmOyBAt5y7RsqSTZRM3/wAxvG4ZTHQeACin29Jtr pfXaceULBJD0t3AA== Date: Wed, 11 Jun 2025 12:33:52 +0200 Subject: [PATCH v3 2/9] selftests: vDSO: clock_getres: Drop unused include of err.h 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: <20250611-selftests-vdso-fixes-v3-2-e62e37a6bcf5@linutronix.de> References: <20250611-selftests-vdso-fixes-v3-0-e62e37a6bcf5@linutronix.de> In-Reply-To: <20250611-selftests-vdso-fixes-v3-0-e62e37a6bcf5@linutronix.de> To: Andy Lutomirski , Thomas Gleixner , Vincenzo Frascino , Shuah Khan , "Jason A. Donenfeld" Cc: Shuah Khan , linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, Muhammad Usama Anjum , =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Developer-Signature: v=1; a=ed25519-sha256; t=1749638036; l=788; i=thomas.weissschuh@linutronix.de; s=20240209; h=from:subject:message-id; bh=J9hKPnnc2A0cweqLzbgQ20+H2ZBdLzJrRKeSWwaEXh8=; b=y59QH6VOrKYCRbM+cCLHExmUWoZ5H9o2+XZnq1vMJeDgF45OjhmZzACCvSOfHgZAY0JVJ/3PA 4xoqQk99uI8D8nQPWXHJbp75GbIpn/imBIHOZiEk4u8JlJUAcfUoNNo X-Developer-Key: i=thomas.weissschuh@linutronix.de; a=ed25519; pk=pfvxvpFUDJV2h2nY0FidLUml22uGLSjByFbM6aqQQws= Nothing from err.h is used. Drop the include. Signed-off-by: Thomas Wei=C3=9Fschuh Reviewed-by: Muhammad Usama Anjum --- tools/testing/selftests/vDSO/vdso_test_clock_getres.c | 1 - 1 file changed, 1 deletion(-) diff --git a/tools/testing/selftests/vDSO/vdso_test_clock_getres.c b/tools/= testing/selftests/vDSO/vdso_test_clock_getres.c index 38d46a8bf7cba7a9b4a9b13b5eb17aa207972bd0..b5d5f59f725a703c357dfca91bf= e170aaaeb42fa 100644 --- a/tools/testing/selftests/vDSO/vdso_test_clock_getres.c +++ b/tools/testing/selftests/vDSO/vdso_test_clock_getres.c @@ -13,7 +13,6 @@ =20 #define _GNU_SOURCE #include -#include #include #include #include --=20 2.49.0 From nobody Sat Oct 11 04:17:26 2025 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 ABA0B272E57; Wed, 11 Jun 2025 10:34:03 +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=1749638045; cv=none; b=PtVlA9qxppj5W2KyKp8DRLB0f69ufAOrayi1HTy3CKDBFz8B2tIbFuZW3TNVZDW3KiB6/9aesHDXJcdw1xn9HTM6pUta/XL//DuxyNU5rmPXuaf+epz5Bl1xZNUtZfncsXRp48Uh4MBJLMrYtj7/w7zoF0O7Go+c/ZKWb402SQs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1749638045; c=relaxed/simple; bh=Rqf9Ybql9mWv2FDqbi7vecIXl64pB64/atVfT6XP3fg=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=OA6sQ8zTgo0pB+/j7o/C75+VSwA76JqEz8XorV27wRfaJGzGzUaJ3wAA3n5WzVFE6wzDyA75Jh0flM/Upt0qme7i3m4zCoTk0jUtJdrrmpF9f10djmGG3oBiwSVgStjmziDsXV1fGv8H5djgDuOvqDwK8REpvc8oaPTH1EQH3jc= 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=1R1+niYs; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=5mIg0vC8; 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="1R1+niYs"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="5mIg0vC8" From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1749638041; h=from:from: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=qQzNOCNFp/mc7w++e/8s7o1Kxroe/aW5+25iJWwhE3E=; b=1R1+niYsJOpAcmSTL4zwBAeb5vbYhaS3ncEM0bRyPrkfCsFVnJAuUW0Tw3f5nnfMvp7EMm IdERlVOPRTmxqBpzQKpUcPuQ4uuaE3d18QF+e1FER/8iRE7aUhZBg3IZ7fsfXl+qZ9M55q rNiMvpqdfTbknwKAEFosRFr3ZHCKZ3K0XjW0Vr69K/+y8kfcq0DeVm7cpny+uON6WKi64q n2wtdQJON2Cbx3lyv+9lQfEcy9OAeuXjrEJ2+NL/rU2q+OYk5RPiX7pQuSSQ68PV+IlbjA AYzUpy80nnD2l1AWbEtTW0jwXZpOF7sV7wGCDp1d+zdk9kWJuf3ur2RQh7YHCQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1749638041; h=from:from: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=qQzNOCNFp/mc7w++e/8s7o1Kxroe/aW5+25iJWwhE3E=; b=5mIg0vC89Cau+cAzyxsDzA9XUX60QlrppTX+f80qox8opRNpo/K6HaNMxIwYWx2kmhGKb1 jk8+3wtMs3/ptbAg== Date: Wed, 11 Jun 2025 12:33:53 +0200 Subject: [PATCH v3 3/9] selftests: vDSO: vdso_test_getrandom: Drop unused include of linux/compiler.h 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: <20250611-selftests-vdso-fixes-v3-3-e62e37a6bcf5@linutronix.de> References: <20250611-selftests-vdso-fixes-v3-0-e62e37a6bcf5@linutronix.de> In-Reply-To: <20250611-selftests-vdso-fixes-v3-0-e62e37a6bcf5@linutronix.de> To: Andy Lutomirski , Thomas Gleixner , Vincenzo Frascino , Shuah Khan , "Jason A. Donenfeld" Cc: Shuah Khan , linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, Muhammad Usama Anjum , =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Developer-Signature: v=1; a=ed25519-sha256; t=1749638036; l=887; i=thomas.weissschuh@linutronix.de; s=20240209; h=from:subject:message-id; bh=Rqf9Ybql9mWv2FDqbi7vecIXl64pB64/atVfT6XP3fg=; b=BpcwGLKithkwEOVSXJ+vw7OPYpLnnW7eQ3LgQK33tusVaqC6fsCdVBjuKDeQkS8vCbUX1WWch FXc7oIHbUQqAM/w77FFsW7z3uw20IE8Oxy4UYLyPjAc54xyelXZ7lly X-Developer-Key: i=thomas.weissschuh@linutronix.de; a=ed25519; pk=pfvxvpFUDJV2h2nY0FidLUml22uGLSjByFbM6aqQQws= The header is unused. Furthermore this is not a real UAPI header, but only exists in tools/include/. This prevents building the selftest against real UAPI headers. Drop the include. Signed-off-by: Thomas Wei=C3=9Fschuh --- tools/testing/selftests/vDSO/vdso_test_getrandom.c | 1 - 1 file changed, 1 deletion(-) diff --git a/tools/testing/selftests/vDSO/vdso_test_getrandom.c b/tools/tes= ting/selftests/vDSO/vdso_test_getrandom.c index 95057f7567db22226d9cb09a667a56e387a33a46..f36e50f372f935e6d4da3175c81= e210653bdce1d 100644 --- a/tools/testing/selftests/vDSO/vdso_test_getrandom.c +++ b/tools/testing/selftests/vDSO/vdso_test_getrandom.c @@ -21,7 +21,6 @@ #include #include #include -#include #include =20 #include "../kselftest.h" --=20 2.49.0 From nobody Sat Oct 11 04:17:26 2025 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 50FFB2741CE; Wed, 11 Jun 2025 10:34:04 +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=1749638046; cv=none; b=BX25N/MAmQazGc2T3y+izKGOI0D0cfyf50BGMXD/Mb0SaqSG4eolWdudKh1ajRee69ooLs4QgaSagrW9SQbyfaFZCQ2A3FO/lEesTyrvig/KKaRPbqhzr4epfYA6ujCT2PChPeymcmxj3/fzKwANbInqRA1e45wyH1PRgge1N/Y= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1749638046; c=relaxed/simple; bh=mymoHJoPVcVVD7mF7fKJHem0KY9hzc8ODkofDW2o3fY=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=d6QeXh5MLzkPysc5n5JMd9DMi/LwX8DFteiyDfm9W5pQHkI3iY4Xz54qiIJfzrFnjLEsc4qGKNqVa/JWaQFVfNpHNY+nwLj0PX9W4VYSs01X5rwQTh+b1hBBmwPCZUHeN8YetkXHnsoLIWV+P6zDKrHaFUeLLsuDA4QvnGwOYeU= 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=l5IUbJiA; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=Sg6uhSKU; 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="l5IUbJiA"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="Sg6uhSKU" From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1749638042; h=from:from: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=t7K0TRuxWCvqV8xoGYF1N8FkYV8JeM7Cdh0VjhuPvMM=; b=l5IUbJiAsGDQD4Gidf5LL7MBLVLj0VaBNGCEj98dc95sjg6vM0gd8JuER39+pCnJ5++l4p oIZNfRzTtmd0WPlZ5LeTh8sA4pBeR5aHBqsWlcVCjQKFg715q9da/W4b7aD7u81N3tvjUI fQ3Isu0MswiYjw/HaWLx7LKHSycvqq9w9a3nLOYtaZyQrlan+NWY5XgM++PCz7Dm/eDjt+ PHNzqgezAEQLChf7kFhLSiQGICUO90axT49YxeCy9U4xTnobsTX9n1JbJO/Vz0upHIBOh5 ISmvt3zUx4HGv+TF6NNPx93vJiVUjOzwd/yWGl+fEg8xBP+kfZzKQSZrUVoa7Q== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1749638042; h=from:from: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=t7K0TRuxWCvqV8xoGYF1N8FkYV8JeM7Cdh0VjhuPvMM=; b=Sg6uhSKUWTjadFiX+0rxKk/cSjsUfyJM1lQJd2E1y6KDdZO3O05t3UNKfDL5c84Ewm7bDc 2PhIU5+Zh/vaYcDA== Date: Wed, 11 Jun 2025 12:33:54 +0200 Subject: [PATCH v3 4/9] selftests: vDSO: vdso_test_getrandom: Avoid -Wunused 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: <20250611-selftests-vdso-fixes-v3-4-e62e37a6bcf5@linutronix.de> References: <20250611-selftests-vdso-fixes-v3-0-e62e37a6bcf5@linutronix.de> In-Reply-To: <20250611-selftests-vdso-fixes-v3-0-e62e37a6bcf5@linutronix.de> To: Andy Lutomirski , Thomas Gleixner , Vincenzo Frascino , Shuah Khan , "Jason A. Donenfeld" Cc: Shuah Khan , linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, Muhammad Usama Anjum , =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Developer-Signature: v=1; a=ed25519-sha256; t=1749638036; l=1224; i=thomas.weissschuh@linutronix.de; s=20240209; h=from:subject:message-id; bh=mymoHJoPVcVVD7mF7fKJHem0KY9hzc8ODkofDW2o3fY=; b=4pU5CEDlm04PDDqodE8L+KfccbsJ8GIhWrmHxhC55mUsfkLmPpXP2On9D6CvM5IBk9h5oY5tM G1V1FxlB4z+C/POCKrwHp7voku0OLD0FsSLhEaxm5Hjo/SXuZvDthtY X-Developer-Key: i=thomas.weissschuh@linutronix.de; a=ed25519; pk=pfvxvpFUDJV2h2nY0FidLUml22uGLSjByFbM6aqQQws= vgetrandom_put_state() and the variable "ret" in kselftest() are unused. Drop the variable "ret". Suppress the warning for vgetrandom_put_state() as it is meant as an example for libc implementors. Signed-off-by: Thomas Wei=C3=9Fschuh --- tools/testing/selftests/vDSO/vdso_test_getrandom.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/testing/selftests/vDSO/vdso_test_getrandom.c b/tools/tes= ting/selftests/vDSO/vdso_test_getrandom.c index f36e50f372f935e6d4da3175c81e210653bdce1d..389ead4e1fe3761f265f7b589b4= 17b6d9f25c565 100644 --- a/tools/testing/selftests/vDSO/vdso_test_getrandom.c +++ b/tools/testing/selftests/vDSO/vdso_test_getrandom.c @@ -100,6 +100,7 @@ static void *vgetrandom_get_state(void) return state; } =20 +__attribute__((unused)) /* Example for libc implementors */ static void vgetrandom_put_state(void *state) { if (!state) @@ -264,7 +265,7 @@ static void kselftest(void) } for (;;) { struct ptrace_syscall_info info =3D { 0 }; - int status, ret; + int status; ksft_assert(waitpid(child, &status, 0) >=3D 0); if (WIFEXITED(status)) { ksft_assert(WEXITSTATUS(status) =3D=3D 0); --=20 2.49.0 From nobody Sat Oct 11 04:17:26 2025 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 4FA64275871; Wed, 11 Jun 2025 10:34:04 +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=1749638047; cv=none; b=ANob/PaGNqRDj/XSTkUIxJfYUslozYMQlfEw/Y+b11AHRuJHHQ9llSzdZn0rYxJtfzjo90DuWbuTE7O59AnjuA2S9vH5URReaoMFt9X3Ff2tfzWnYXD0N+waF1idn3QVpXgRmPGX+z3OyffhkLlew3YhIScldiSudp3uLVxkpRM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1749638047; c=relaxed/simple; bh=Jd9bN1x0QUY5vumCRf0DJ1rTzHAMY7u+Dc+/Xk5jW5Y=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=jxPv2kgd9AHyeXHFgsLUHJ8M5EufH/rFje/V1JQkdMt2XYlAoGVkCo9wJENF4UfmsYX09ZC0EWrP44MII+ik90rs4WFMi+3WUkJ81+oolW1Wig5B7F1ZljmaNoCr5bwteZC7hdPOgAdXMIU2VExzL9n8aWKVrxy+RZX5TFpj3yk= 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=I71yfH3A; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=4FC2g7Z+; 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="I71yfH3A"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="4FC2g7Z+" From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1749638043; h=from:from: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=W6Qg6NrTIlROWiZjlcUgHvA4YqAO2DpE5nyR3C7rQFQ=; b=I71yfH3ANbOHXgnZ7WaWgYC81MTvC6Y4TUAA2WrTNdH9cqyGuEOlA+DK03syWO45yKuoLq VS4btwQ2BQQCzgUujg6qxvtjRqV5Men2bxot44e376HG6Fw4Sie174l7RjEb7a8l6YOEuD ygaOv1E8qXNOFYL6ehANIdXgMZkrH2ozL/1jPJLnPf1o8AvCyd2R53M+nx5YFKlWqX4aM8 ENs5P8X2ioqY8dAocMyKsPD5mhKSyKQhkJ5s5McmrNyDN4o+RE6UrDzdQEuWSr/7OMAH4z ni+cQZyMQzVQWAIVcpHf47CjS+oAnUbFRaJ1NBv1BTaBzFxwz2oNmDVyBpD6JA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1749638043; h=from:from: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=W6Qg6NrTIlROWiZjlcUgHvA4YqAO2DpE5nyR3C7rQFQ=; b=4FC2g7Z+fsxwc+rtFLA2ZRo81Ouhyvsrmb8oxCAww+mIDOqWeORVSAPnmBu2fQOdEQ5cua 7yDdaOUByvzuHXAA== Date: Wed, 11 Jun 2025 12:33:55 +0200 Subject: [PATCH v3 5/9] selftests: vDSO: vdso_config: Avoid -Wunused-variables 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: <20250611-selftests-vdso-fixes-v3-5-e62e37a6bcf5@linutronix.de> References: <20250611-selftests-vdso-fixes-v3-0-e62e37a6bcf5@linutronix.de> In-Reply-To: <20250611-selftests-vdso-fixes-v3-0-e62e37a6bcf5@linutronix.de> To: Andy Lutomirski , Thomas Gleixner , Vincenzo Frascino , Shuah Khan , "Jason A. Donenfeld" Cc: Shuah Khan , linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, Muhammad Usama Anjum , =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Developer-Signature: v=1; a=ed25519-sha256; t=1749638036; l=1265; i=thomas.weissschuh@linutronix.de; s=20240209; h=from:subject:message-id; bh=Jd9bN1x0QUY5vumCRf0DJ1rTzHAMY7u+Dc+/Xk5jW5Y=; b=dcs51nCEYORy2V/C5S1KGZ4opd6IQLCqDROIu/JKl9ov9W+hqeLN/wKIjMskk6Hs9OdzaGGvz S0Qze2tBoiOBIdvpEp4NjaPEIEqqFDYoaplR75G5dLISE33KsfRg9zx X-Developer-Key: i=thomas.weissschuh@linutronix.de; a=ed25519; pk=pfvxvpFUDJV2h2nY0FidLUml22uGLSjByFbM6aqQQws= Not all users of this header make use of all its variables. For example vdso_test_correctness.c does not use "versions": In file included from vdso_test_correctness.c:22: vdso_config.h:61:20: warning: =E2=80=98versions=E2=80=99 defined but not us= ed [-Wunused-variable] 61 | static const char *versions[7] =3D { | ^~~~~~~~ Avoid those warnings through attribute((unused)). Signed-off-by: Thomas Wei=C3=9Fschuh Reviewed-by: Muhammad Usama Anjum --- tools/testing/selftests/vDSO/vdso_config.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/testing/selftests/vDSO/vdso_config.h b/tools/testing/sel= ftests/vDSO/vdso_config.h index 722260f9756198956f0dfccced907284b6851e76..5fdd0f36233742bc47ae79f23d2= cfae5a0f56dee 100644 --- a/tools/testing/selftests/vDSO/vdso_config.h +++ b/tools/testing/selftests/vDSO/vdso_config.h @@ -58,6 +58,7 @@ #define VDSO_NAMES 1 #endif =20 +__attribute__((unused)) static const char *versions[7] =3D { "LINUX_2.6", "LINUX_2.6.15", @@ -68,6 +69,7 @@ static const char *versions[7] =3D { "LINUX_5.10" }; =20 +__attribute__((unused)) static const char *names[2][7] =3D { { "__kernel_gettimeofday", --=20 2.49.0 From nobody Sat Oct 11 04:17:26 2025 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 39521277006; Wed, 11 Jun 2025 10:34:06 +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=1749638047; cv=none; b=LoSFh1cS7zWozCnEt/1yfS+v0SZ2Mmy85ThGiLT9hG21qztbUTRra3EsUFdz50UORJGled7QS8XpJzSGNk5zZlH6/Zk1fbFZbK7cj0z86i/pTIkuUaik4Mo7C6RwcA3rGYwXHBVYMax13mWJfaZ/RzCNND7A7Rrs7VPnW63KCJk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1749638047; c=relaxed/simple; bh=uD04YrH6eP+MSUFpj7sOWp6lkwXWk2qR0mSs3ZdsWmk=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=bxejXN7yXxzMN/+41VyerDy8qT7c7jg9vWqZeVQ3/8AH//VV4/JJK290ke2sezjlUOTbqRd1G3DuBSentbKwlZj6Kqvdt25iZY8t9Xf76laksef5Nwt5V6sH0QYKq17KHN5aY2eOtJGji1sPr85R/UzYUZnixuDxtYZhDCkYxdE= 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=Epb0xT0t; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=NVWttba6; 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="Epb0xT0t"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="NVWttba6" From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1749638044; h=from:from: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=eWSNBEL32B/DJ88mUkY5bg1Q8T/PlsPV4zRBXnQvYTs=; b=Epb0xT0tPtaETdC9eMxVJB5cABRNGKgz6lw2N7LppqPStENos9Uh1fAz/4vW6OAuFA4brh aN0ayyvnRd0qFyU6ibjzYZgpQon66BLXDw4aHnYym6bSXst1RpjUeFjV9ZOVWlnQMPQDPr +gBeaqsTgSY0sVQRimLQGdR/pur7HCdMwSY7cmPcuHXU8zRb5AEAR1SmWIBvoZa1/eXmla TyBjNnKKAXIlK2FmdaEvcvPoahhUo4FPbZpp/IV5xy2WjgdXhpWlsLcG1gK9Zil7cMAFD9 guL4pkxggywhzpkHsl3KZNmoiLh5VrIOt/25g9eR/b+iW2RQaGTEIwkdtMogmA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1749638044; h=from:from: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=eWSNBEL32B/DJ88mUkY5bg1Q8T/PlsPV4zRBXnQvYTs=; b=NVWttba6MkLiSM2Xtp/ANJOQBaZPSiFw8lXpeqGz6smDLC08pgHODdnQOIAZBpb1BqwDPi O44wqlfyP99IevBQ== Date: Wed, 11 Jun 2025 12:33:56 +0200 Subject: [PATCH v3 6/9] selftests: vDSO: enable -Wall 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: <20250611-selftests-vdso-fixes-v3-6-e62e37a6bcf5@linutronix.de> References: <20250611-selftests-vdso-fixes-v3-0-e62e37a6bcf5@linutronix.de> In-Reply-To: <20250611-selftests-vdso-fixes-v3-0-e62e37a6bcf5@linutronix.de> To: Andy Lutomirski , Thomas Gleixner , Vincenzo Frascino , Shuah Khan , "Jason A. Donenfeld" Cc: Shuah Khan , linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, Muhammad Usama Anjum , =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Developer-Signature: v=1; a=ed25519-sha256; t=1749638036; l=839; i=thomas.weissschuh@linutronix.de; s=20240209; h=from:subject:message-id; bh=uD04YrH6eP+MSUFpj7sOWp6lkwXWk2qR0mSs3ZdsWmk=; b=+GNCkzBmGt55OMSAf1x8ERgKaHuT/bdKsthP8vleBB3dsanRw9nMycxVMXO9jWWy+6nipXVPj k0Z4m0dKwDBA+hnnWDb2p9CG1/bEozddZiwSGRbSj9jvbMXRvemFkro X-Developer-Key: i=thomas.weissschuh@linutronix.de; a=ed25519; pk=pfvxvpFUDJV2h2nY0FidLUml22uGLSjByFbM6aqQQws= Protect against common programming errors through compiler warnings. These warnings are also used for the kernel itself. Signed-off-by: Thomas Wei=C3=9Fschuh --- tools/testing/selftests/vDSO/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/vDSO/Makefile b/tools/testing/selftest= s/vDSO/Makefile index 12a0614b9fd4983deffe5d6a7cfa06ba8d92a516..06d72254ec75dbdcc2b20935534= 199fabc40a9de 100644 --- a/tools/testing/selftests/vDSO/Makefile +++ b/tools/testing/selftests/vDSO/Makefile @@ -12,7 +12,7 @@ TEST_GEN_PROGS +=3D vdso_test_correctness TEST_GEN_PROGS +=3D vdso_test_getrandom TEST_GEN_PROGS +=3D vdso_test_chacha =20 -CFLAGS :=3D -std=3Dgnu99 -O2 +CFLAGS :=3D -std=3Dgnu99 -O2 -Wall =20 ifeq ($(CONFIG_X86_32),y) LDLIBS +=3D -lgcc_s --=20 2.49.0 From nobody Sat Oct 11 04:17:26 2025 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 14C0227702C; Wed, 11 Jun 2025 10:34:06 +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=1749638048; cv=none; b=J2HiMegXjXrAJLxEuD2XaoBAX5var8JTHCxtgIA8NdqLI4ELZN7sO6FfziHyjngk2xI7bskJ9DyYBedULzSYccVfeUmatfovEEFSwCZO89Zht5UN9JW0meuJ9iIDOGp9q0vwPEE27wyTnPUkXpoL5DU/TyGwXDvmNmYL/pl6MIo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1749638048; c=relaxed/simple; bh=NofZC/DmnGUuNGlTi2IqNXpglr+RDL+aFfdurFKJ/WI=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=jZ5fV9KLHFlQTCrcgjDV524mwZopMHxAnGRHidqUezwrYrZc3wKySJRd3figOaSB97eoPW8SYGqG2UEWrzeR9i5HYSIGPO9aw4G763fk4u92KRFrZruQ3AZ+qxmeRTmM5wew1U97IkqIXiXKjaYAmnknfrLnR5QinaFQhmRjgXE= 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=t79twcnv; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=wkBL7R0I; 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="t79twcnv"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="wkBL7R0I" From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1749638045; h=from:from: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=EpSgt7v8Hrv9itXHHVUXHleGLHRYcjyC62pnB8nU680=; b=t79twcnvF9BGreh25Lw3lGsmz3RhPMhT5g/IYCC9bkmIY5dWnEDo/cFX7zt6TyAjRu09Wd 13uJA2pRS2KEKgZEn8V1gBVOZjeZHVwIyf2Z2ITO27KVWwwt15hBCxKgLa47SaCinQKIYH pvwP8z2xe/3OKp42LI+Coeyh316hC4JwYhK3ylUjfgTJy1Rn5bBzxiJiD0Q3KW7mkRiuPY rT3c1k+W5QwLVvaTio0mEae9fyO/fhLIyP16+o7NTLJX9QJh5gRGmzYmuXSsxD2Rj6iQ/3 3hijxwT2iix+puNwY3kBiFSLqKu2UKc4+USDYzYk2TzR/l0ELAY9dffcAYsC+g== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1749638045; h=from:from: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=EpSgt7v8Hrv9itXHHVUXHleGLHRYcjyC62pnB8nU680=; b=wkBL7R0IxvNWuIqnOkNsJ/q47KW65muOiZFlSxkwQ5I0BWHxEet2fWZRiLIBP7BKb5mMqC F/xqQmQ6Uhn53yDw== Date: Wed, 11 Jun 2025 12:33:57 +0200 Subject: [PATCH v3 7/9] selftests: vDSO: vdso_test_correctness: Fix -Wstrict-prototypes 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: <20250611-selftests-vdso-fixes-v3-7-e62e37a6bcf5@linutronix.de> References: <20250611-selftests-vdso-fixes-v3-0-e62e37a6bcf5@linutronix.de> In-Reply-To: <20250611-selftests-vdso-fixes-v3-0-e62e37a6bcf5@linutronix.de> To: Andy Lutomirski , Thomas Gleixner , Vincenzo Frascino , Shuah Khan , "Jason A. Donenfeld" Cc: Shuah Khan , linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, Muhammad Usama Anjum , =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Developer-Signature: v=1; a=ed25519-sha256; t=1749638036; l=1813; i=thomas.weissschuh@linutronix.de; s=20240209; h=from:subject:message-id; bh=NofZC/DmnGUuNGlTi2IqNXpglr+RDL+aFfdurFKJ/WI=; b=RFNWeBgHw1KG+iuiUMsQ/H61i4QFn/qs7FajDA+J4gS4w/nykOM/DRLAQYVP+4AcC61r2XrHW dgiVqbylu58APJmFmGlKihIDMsXqDcbBjwBJ7C6Xn7KdswDWrRseSHJ X-Developer-Key: i=thomas.weissschuh@linutronix.de; a=ed25519; pk=pfvxvpFUDJV2h2nY0FidLUml22uGLSjByFbM6aqQQws= Functions definitions without any argument list produce a warning with -Wstrict-prototypes: vdso_test_correctness.c:111:13: warning: function declaration isn=E2=80=99t= a prototype [-Wstrict-prototypes] 111 | static void fill_function_pointers() | ^~~~~~~~~~~~~~~~~~~~~~ Explicitly use an empty argument list. Now that all selftests a free of this warning, enable it in the Makefile. Signed-off-by: Thomas Wei=C3=9Fschuh --- tools/testing/selftests/vDSO/Makefile | 2 +- tools/testing/selftests/vDSO/vdso_test_correctness.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/testing/selftests/vDSO/Makefile b/tools/testing/selftest= s/vDSO/Makefile index 06d72254ec75dbdcc2b20935534199fabc40a9de..918a2caa070ebc681a9525f0518= afffcf10f5ae3 100644 --- a/tools/testing/selftests/vDSO/Makefile +++ b/tools/testing/selftests/vDSO/Makefile @@ -12,7 +12,7 @@ TEST_GEN_PROGS +=3D vdso_test_correctness TEST_GEN_PROGS +=3D vdso_test_getrandom TEST_GEN_PROGS +=3D vdso_test_chacha =20 -CFLAGS :=3D -std=3Dgnu99 -O2 -Wall +CFLAGS :=3D -std=3Dgnu99 -O2 -Wall -Wstrict-prototypes =20 ifeq ($(CONFIG_X86_32),y) LDLIBS +=3D -lgcc_s diff --git a/tools/testing/selftests/vDSO/vdso_test_correctness.c b/tools/t= esting/selftests/vDSO/vdso_test_correctness.c index 5fb97ad67eeaf17b6cfa4f82783c57894f03e5c5..da651cf53c6ca4242085de109c7= fc57bd807297c 100644 --- a/tools/testing/selftests/vDSO/vdso_test_correctness.c +++ b/tools/testing/selftests/vDSO/vdso_test_correctness.c @@ -108,7 +108,7 @@ static void *vsyscall_getcpu(void) } =20 =20 -static void fill_function_pointers() +static void fill_function_pointers(void) { void *vdso =3D dlopen("linux-vdso.so.1", RTLD_LAZY | RTLD_LOCAL | RTLD_NOLOAD); --=20 2.49.0 From nobody Sat Oct 11 04:17:26 2025 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 A8C1A25A344; Wed, 11 Jun 2025 10:34:08 +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=1749638050; cv=none; b=oqVuhdUq8/6+eddkGu8/PvKLF+PWZwdQms2+pqNqU0bBi5z9W0ZMCiPN/gPqz1PKpeVpfnOMcXUBslFmtdKG9KAFDmO06JEiRCj2ocRyYsBjq4R8z9JUmrS63iRpybBjVHYeGP+DRQGAhgahvsa8Tgm1uBB6U5AuzROWP29oLHc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1749638050; c=relaxed/simple; bh=V01m4shBLAsX/OjVRCn2HdvbjOXNjSAp3eQ+3KwX6is=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=ZmFqvaTzbLY9k9jQK5a7PtVMfM4s57JcqUsgpD7oMx1MOvoaV7xSljOKvtLr+XFqjmRYOYNkrptJuraVcOhO0xTBc+px8OBJZLXhcvQpWZmDrWriJB46mVy1+zFPPicvJHGyJdpsRguYQbEJIvmKOY3kWaLJYK3vSiWEgI5vR8A= 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=DReeW8yt; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=ScZLBlgr; 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="DReeW8yt"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="ScZLBlgr" From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1749638046; h=from:from: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=GrTXAPhkZ9+e0KUJ47HvOra46bzqWMhwXTsxq2IMoaw=; b=DReeW8ytWKxN7kXy7ZGL6P+hGHzoC8W1nUczwZ+PY1KgMRYgA0cbeZrg1SYM4AqGUW4104 rIGpeudYz38tvawDUMn5QSLQS8JkucqD1zVDpCpfK556MqwQibqqZPGWoxOmRB75ctMrp/ jkSQvMHi254Imx4jzZ2s4qnUO7Q/Yxylxn6g7XIdSoR5WDJKwEblu+BUbPXIjldgjw6xmc Hyl5MmHkKLFzNaJKNUOnLXxlDmlm7STzSoEaSJz0SIhtMvJGBuHWZSIORxRZcPcOswmC8g Ii7HwMRs3Bblq+cBeN/OLDLF84yGDY6xOwoSggokx59g4mDoGkYi0ZDTW841Gg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1749638046; h=from:from: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=GrTXAPhkZ9+e0KUJ47HvOra46bzqWMhwXTsxq2IMoaw=; b=ScZLBlgr6sOjHw4rQxvMJcygeWbruWkkbqIM3B5OLW0TLhCiWjhwMWAXVKgAOC0CuBQvee T9It73zaqndyCJCA== Date: Wed, 11 Jun 2025 12:33:58 +0200 Subject: [PATCH v3 8/9] selftests: vDSO: vdso_test_getrandom: Always print TAP header 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: <20250611-selftests-vdso-fixes-v3-8-e62e37a6bcf5@linutronix.de> References: <20250611-selftests-vdso-fixes-v3-0-e62e37a6bcf5@linutronix.de> In-Reply-To: <20250611-selftests-vdso-fixes-v3-0-e62e37a6bcf5@linutronix.de> To: Andy Lutomirski , Thomas Gleixner , Vincenzo Frascino , Shuah Khan , "Jason A. Donenfeld" Cc: Shuah Khan , linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, Muhammad Usama Anjum , =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Developer-Signature: v=1; a=ed25519-sha256; t=1749638036; l=1385; i=thomas.weissschuh@linutronix.de; s=20240209; h=from:subject:message-id; bh=V01m4shBLAsX/OjVRCn2HdvbjOXNjSAp3eQ+3KwX6is=; b=sQ2Q2FsJDoHWze/cAvUyDNkUeJQd+Rcf02SD88++vxw6diOrORKRk5YZ+eK0skZ6EaurlQb+B H9dEbuxFJ3TDGYxZAZ+pRI8SUBoGErSOjyI3uyX0aVrkYfr7Hv96ZLN X-Developer-Key: i=thomas.weissschuh@linutronix.de; a=ed25519; pk=pfvxvpFUDJV2h2nY0FidLUml22uGLSjByFbM6aqQQws= The TAP specification requires that the output begins with a header line. If vgetrandom_init() fails and skips the test, that header line is missing. Call vgetrandom_init() after ksft_print_header(). Signed-off-by: Thomas Wei=C3=9Fschuh Reviewed-by: Muhammad Usama Anjum --- tools/testing/selftests/vDSO/vdso_test_getrandom.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/testing/selftests/vDSO/vdso_test_getrandom.c b/tools/tes= ting/selftests/vDSO/vdso_test_getrandom.c index 389ead4e1fe3761f265f7b589b417b6d9f25c565..dd1132508a0db29a32ec977b30f= 64b20aa43e03d 100644 --- a/tools/testing/selftests/vDSO/vdso_test_getrandom.c +++ b/tools/testing/selftests/vDSO/vdso_test_getrandom.c @@ -242,6 +242,7 @@ static void kselftest(void) pid_t child; =20 ksft_print_header(); + vgetrandom_init(); ksft_set_plan(2); =20 for (size_t i =3D 0; i < 1000; ++i) { @@ -295,8 +296,6 @@ static void usage(const char *argv0) =20 int main(int argc, char *argv[]) { - vgetrandom_init(); - if (argc =3D=3D 1) { kselftest(); return 0; @@ -306,6 +305,9 @@ int main(int argc, char *argv[]) usage(argv[0]); return 1; } + + vgetrandom_init(); + if (!strcmp(argv[1], "bench-single")) bench_single(); else if (!strcmp(argv[1], "bench-multi")) --=20 2.49.0 From nobody Sat Oct 11 04:17:26 2025 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 7568C27875C; Wed, 11 Jun 2025 10:34:09 +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=1749638051; cv=none; b=AWhz9WlL3ShGn9AwDPv2xxEOqt1jiBKfRM4kaQ0NPgjv55zLTYOS8BTfVgOPaPFSS9PlJ0q/uWY12H3p3V64XqipE1wBQ/QWQKoafOlCTnYWQS41II04STxwIwkTcDqK9jueBrEmdZkTyA2rI8QeIXkgEGgnG/FRO7VswooBOgA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1749638051; c=relaxed/simple; bh=owT0IqKZrmXfpFVIFSxWZ8tODMcTTrsVbJpX/11Psvw=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=eEuz1tO+4v5MiNcvVSd2yoRlJW/UWVHpnlI07nI/2MaJ/qybkbEXBBvjTq1h9HVAtJphZcGSr245OwcfX8XeQOBXJWoKN4zwHlxZQPUuVJMPKVFyuizrzR7yPzBJTPi9/US0DuT6OLeov/92MK9t2qGdtqkfs5GpYEZAJtpNTWY= 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=1kFXDPGc; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=pk1wJk3t; 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="1kFXDPGc"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="pk1wJk3t" From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1749638047; h=from:from: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=5neFC7G/s72w2dzYTYdUxPwPnB727dQ0pCaRBuSPo4o=; b=1kFXDPGcXiO9gMKzebm9vEy2P+J7usRKCpe5yokbTxV137YsqxlKnbdX8xdHJE4kzqtCEk Jb62iS48ViJChVLLZ7e8cimgb68ZTaJaTFhlT6O2wZ6Cg2ZLIPWl2ZUSLA6qqAZGXkxmoQ tRS9BeU2Z8P07O2Ptme3HYXEbCoHl88ko32ENDBSQTBG/gCkdmaZxPWe9VD3lEbqOCnr89 Xo8yWB05wV5ivz2De86Pc+mZsIcFZbd33vVC8CphYvRluTfZvrB7WXdtjYo0UMdPEdH/LR yVTaELPbuN+auQBkFxIo74LEFpP3x4BqpS9NF2t7xxuj6vKmSg0qeHP2BnWhXw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1749638047; h=from:from: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=5neFC7G/s72w2dzYTYdUxPwPnB727dQ0pCaRBuSPo4o=; b=pk1wJk3tgfgUK/D51nfRp1IX7jQhfX7SD/FnyIUyLN6O+jrZEev1ecCr2Ahb5D+ZovRMj2 TV8kOONJDQpNKaDQ== Date: Wed, 11 Jun 2025 12:33:59 +0200 Subject: [PATCH v3 9/9] selftests: vDSO: vdso_standalone_test_x86: Replace source file with symlink 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: <20250611-selftests-vdso-fixes-v3-9-e62e37a6bcf5@linutronix.de> References: <20250611-selftests-vdso-fixes-v3-0-e62e37a6bcf5@linutronix.de> In-Reply-To: <20250611-selftests-vdso-fixes-v3-0-e62e37a6bcf5@linutronix.de> To: Andy Lutomirski , Thomas Gleixner , Vincenzo Frascino , Shuah Khan , "Jason A. Donenfeld" Cc: Shuah Khan , linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, Muhammad Usama Anjum , =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Developer-Signature: v=1; a=ed25519-sha256; t=1749638036; l=3234; i=thomas.weissschuh@linutronix.de; s=20240209; h=from:subject:message-id; bh=owT0IqKZrmXfpFVIFSxWZ8tODMcTTrsVbJpX/11Psvw=; b=GbMLYG8jc4AN9Y6bqLTEZGhObiz25zuitOM4zcpWZVzzEjU1Q357B9BQrsyuW3ZtBEON2SX0r HH9Nrx2/mTSDeFdcGalWEA5o6rjYnxa+eAmqmIECU5w/yYhkmbH7k+P X-Developer-Key: i=thomas.weissschuh@linutronix.de; a=ed25519; pk=pfvxvpFUDJV2h2nY0FidLUml22uGLSjByFbM6aqQQws= With the switch over to nolibc the source file vdso_standalone_test_x86.c was intended to be replaced with a symlink to vdso_test_gettimeofday.c. This was the patch that was submitted to LKML, but during application the symlink was replaced by a textual copy of the linked-to file. Having two copies introduces the possibility of divergence and increases maintenance burden, switch back to a symlink. Link: https://lore.kernel.org/lkml/20250226-parse_vdso-nolibc-v2-16-28e14e0= 31ed8@linutronix.de/ Fixes: 8770a9183fe1 ("selftests: vDSO: vdso_standalone_test_x86: Switch to = nolibc") Signed-off-by: Thomas Wei=C3=9Fschuh --- If symlinks are problematic an #include shim would also work. These are not handled really well by the kselftests build system though, as #include dependencies are not tracked by it. --- .../selftests/vDSO/vdso_standalone_test_x86.c | 59 +-----------------= ---- 1 file changed, 1 insertion(+), 58 deletions(-) diff --git a/tools/testing/selftests/vDSO/vdso_standalone_test_x86.c b/tool= s/testing/selftests/vDSO/vdso_standalone_test_x86.c deleted file mode 100644 index 9ce795b806f0992b83cef78c7e16fac0e54750da..000000000000000000000000000= 0000000000000 --- a/tools/testing/selftests/vDSO/vdso_standalone_test_x86.c +++ /dev/null @@ -1,58 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0-only -/* - * vdso_test_gettimeofday.c: Sample code to test parse_vdso.c and - * vDSO gettimeofday() - * Copyright (c) 2014 Andy Lutomirski - * - * Compile with: - * gcc -std=3Dgnu99 vdso_test_gettimeofday.c parse_vdso_gettimeofday.c - * - * Tested on x86, 32-bit and 64-bit. It may work on other architectures, = too. - */ - -#include -#ifndef NOLIBC -#include -#include -#endif - -#include "../kselftest.h" -#include "parse_vdso.h" -#include "vdso_config.h" -#include "vdso_call.h" - -int main(int argc, char **argv) -{ - const char *version =3D versions[VDSO_VERSION]; - const char **name =3D (const char **)&names[VDSO_NAMES]; - - unsigned long sysinfo_ehdr =3D getauxval(AT_SYSINFO_EHDR); - if (!sysinfo_ehdr) { - printf("AT_SYSINFO_EHDR is not present!\n"); - return KSFT_SKIP; - } - - vdso_init_from_sysinfo_ehdr(getauxval(AT_SYSINFO_EHDR)); - - /* Find gettimeofday. */ - typedef long (*gtod_t)(struct timeval *tv, struct timezone *tz); - gtod_t gtod =3D (gtod_t)vdso_sym(version, name[0]); - - if (!gtod) { - printf("Could not find %s\n", name[0]); - return KSFT_SKIP; - } - - struct timeval tv; - long ret =3D VDSO_CALL(gtod, 2, &tv, 0); - - if (ret =3D=3D 0) { - printf("The time is %lld.%06lld\n", - (long long)tv.tv_sec, (long long)tv.tv_usec); - } else { - printf("%s failed\n", name[0]); - return KSFT_FAIL; - } - - return 0; -} diff --git a/tools/testing/selftests/vDSO/vdso_standalone_test_x86.c b/tool= s/testing/selftests/vDSO/vdso_standalone_test_x86.c new file mode 120000 index 0000000000000000000000000000000000000000..4d3d96f1e440c965474681a6f35= 375a60b3921be --- /dev/null +++ b/tools/testing/selftests/vDSO/vdso_standalone_test_x86.c @@ -0,0 +1 @@ +vdso_test_gettimeofday.c \ No newline at end of file --=20 2.49.0