From patchwork Fri May 2 12:40:13 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Patchwork-Id: 887325 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 76261252904; Fri, 2 May 2025 12:40:24 +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=1746189626; cv=none; b=uG4hmbGxIXgrGMyfv4HRfzPAJ57J6/ReA4mNPsSYHd8+dgj8kRJyNQx+1oJO3SIM6ciPaFAMke58uEhEOaBojxWuEVS+anYg5MEIkBEYMeh005CJ7a0vUp7tkqmuGrflnyfrQSdqv0uHQbJlqONebM2F/9YDvy2+9Ye8OQuOc84= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746189626; c=relaxed/simple; bh=a2u6ldDIJJRlQc6S4JF37e3cdZ/6pGHUGAoaL6wXdkM=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=UfyeJfDKBdnJJ++/rYtM7ADehK0P9z29M7JG6Rkgp7up9GCdI/GpglfYuKYHmrcxL8xr9mzUR0egAuvB96+dLAmPzlu1EsKso5XZk2b+3FHD7mGDpt1tm13ASKmSCh+TONHbQDn6dDBjrFgRRry+07Yv4yxVQ92UsoDz0Z26bRE= 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=b0Sh8LE1; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=X0GcpFz8; 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="b0Sh8LE1"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="X0GcpFz8" From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1746189622; 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=PYL8XT5C/K0QuW45nIsP/rM0RYTKpeNtOsJCvPm97s8=; b=b0Sh8LE1IHZIRmo1PJ+ZNzozjo96z2Tt40vuupx1OWfc6Y6+mPbB76ws3XaiHu5XWRfLkp TMO/Pe5XXqEXnRyx3tHYhzkXvhzwv1GfL16CAbtjWkp53FEYMumW8ZGmvYWW0pHOHExcCJ l6txCoeDh0i0CHor+60HH4ucAdHD65RdD/oYNtpRu/qL/xYFPv8jSpoLIXq0fHq2tvANIo ebaLKuJ6bleFe76u/vL8t1LD8ECy1L/Hafy8ELiu2qcj2ub9kN7d25MqT5WP01HNvOSLJl 9EvTm1UNyP2+vmSDO1wOsJkRoxjBRyRLPuTtHkHfYY+6b+7RViRht/GgUGU0eQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1746189622; 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=PYL8XT5C/K0QuW45nIsP/rM0RYTKpeNtOsJCvPm97s8=; b=X0GcpFz8pQpvys9MXgT5eSrVVREMPbbUa5EpPkgQDSwHK1I8kdSyPMwFE8Z/j7qcKTx42g TdocPtctGkkaIuDw== Date: Fri, 02 May 2025 14:40:13 +0200 Subject: [PATCH 1/7] selftests: vDSO: chacha: Correctly skip test if necessary Precedence: bulk X-Mailing-List: linux-kselftest@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20250502-selftests-vdso-fixes-v1-1-fb5d640a4f78@linutronix.de> References: <20250502-selftests-vdso-fixes-v1-0-fb5d640a4f78@linutronix.de> In-Reply-To: <20250502-selftests-vdso-fixes-v1-0-fb5d640a4f78@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?= =?utf-8?q?=C3=9Fschuh?= X-Developer-Signature: v=1; a=ed25519-sha256; t=1746189620; l=1633; i=thomas.weissschuh@linutronix.de; s=20240209; h=from:subject:message-id; bh=a2u6ldDIJJRlQc6S4JF37e3cdZ/6pGHUGAoaL6wXdkM=; b=Qw4LjFn9DgHq6+hWN7uakM5REj+wGSp+NDGGnTBMIUfWPvc5Lhy/br8y7MyEdWblPm8Q4ZnDe tlz83AKlmUOARCJJi4jNP9ZNb81ryxVjFP8p+JRVbNGld4cOLUavDlh 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") Signed-off-by: Thomas Weißschuh --- 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/testing/selftests/vDSO/vdso_test_chacha.c index 8757f738b0b1a76a48c83c5e5df79925a30c1bc7..0aad682b12c8836efabb49a65a47cf87466891a3 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 void __weak __arch_chacha20_blocks_nostack(uint8_t *dst_bytes, const uint32_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(); } int main(int argc, char *argv[]) From patchwork Fri May 2 12:40:14 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Patchwork-Id: 886778 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 DF6C4252914; Fri, 2 May 2025 12:40:24 +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=1746189626; cv=none; b=dFwbhCmvb69beMW0N2L4fV22Sa0BEkLtZWvrqEf0FhdCCG11Z8ic82AF6PaXv55S/jNTCLZfnuLS4K/+Wj65Cp/W774RDeJJt4czvt6G6ZeZ5UalnlbWb5/tIu2n+Ruw9RWpGO0uSJY2qfcACE1suRqBSBBs03qp/TJtNKTulU4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746189626; c=relaxed/simple; bh=RzpzpcH8lMGoa8l/hmWhs/3Tg1kxHgkzpUmRXeGCMGM=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Xr10X4XzZrYfskvjHT2Ca4N29uaBr31K/hj6BsABdLNowzVspr1k8bRbqfHvXjBKZcRom9NFJVF7ivm2FYTfcJ0vjC3TO4d0dlR7XBfxlN/GhOxRkPTIKzh6iY2Xaq+ug9ypIXjrP5mE9l4DEOTw2/3782gy4oPB2PbFW6mEB48= 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=vvQMwo4/; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=rc4wcqgI; 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="vvQMwo4/"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="rc4wcqgI" From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1746189623; 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=TFnVoUa9JUVJmX/esXUe9lcBfyp+FOEohB9uLRfqc5U=; b=vvQMwo4/Zpl0BJQDRDYHhTz4ESh34P+iRl7iYU8mwX/uxrvPPeJJFHa/cWfULXgs4Pb3xR RE6J1e2i1D9hAeNHoyQgLkygZ6UAtKJRQLsLf8agLwBNA7alr/BBc1hDIedx1FBeRGfwsQ ljm7H/8eSl8BlyPhgzFA95n6ldW0FGbSkEAS8x+C88SpqkGnrQxgzam87WaTRo/C4TmkuS hcdlewkTH63iCjJ5e0EQuKEc8R+7oxlE9WuvQEPT7ZRlZMhzk3a67y137CvkvzpFHdKoQd A+6SO/yHOqAON9IsvSz4/EzlBR88onorIf73lnweJ19jCwadRBavU1rQ1vbepA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1746189623; 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=TFnVoUa9JUVJmX/esXUe9lcBfyp+FOEohB9uLRfqc5U=; b=rc4wcqgITaxWavhjmgf0CkC7sCOGuHbzLyw7fKxofGlAELQ2dV5NASXVRRSC0PLSZn/Kyw nzqMBVonXwxihyAg== Date: Fri, 02 May 2025 14:40:14 +0200 Subject: [PATCH 2/7] selftests: vDSO: clock_getres: Drop unused include of err.h Precedence: bulk X-Mailing-List: linux-kselftest@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20250502-selftests-vdso-fixes-v1-2-fb5d640a4f78@linutronix.de> References: <20250502-selftests-vdso-fixes-v1-0-fb5d640a4f78@linutronix.de> In-Reply-To: <20250502-selftests-vdso-fixes-v1-0-fb5d640a4f78@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?= =?utf-8?q?=C3=9Fschuh?= X-Developer-Signature: v=1; a=ed25519-sha256; t=1746189620; l=725; i=thomas.weissschuh@linutronix.de; s=20240209; h=from:subject:message-id; bh=RzpzpcH8lMGoa8l/hmWhs/3Tg1kxHgkzpUmRXeGCMGM=; b=HpnSm9hCXbUPbzxahKsAjnU3XSF+nXighm7KZoQA4vPi8lp/na+NIWSxrrEN6HVOxF5x223kP LXR8KmdKlvBBQ19rc+cjya1uknOo73z3ADDwDy5m1KG3a78/7fgRSEi 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ßschuh --- 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..b5d5f59f725a703c357dfca91bfe170aaaeb42fa 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 @@ #define _GNU_SOURCE #include -#include #include #include #include From patchwork Fri May 2 12:40:15 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Patchwork-Id: 887324 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 87D48253321; Fri, 2 May 2025 12:40:25 +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=1746189627; cv=none; b=PMbzqzu+rETKyOWck1Tc54Y3Zde5EHBFbWXj7rUVuJOJVLs5MxL6yXlyFbVrc/jTScfBFyp8dQ4IQ09Rg3XTZ8qft9Mm1js7KKRIwj55Nuq7pF5n3y0MCX6hCC2fFX8icmY0NecA5xbBgiDGTfG4CyU28gwAOeBCXrzQpfyS4fA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746189627; c=relaxed/simple; bh=F1VPin51/c8tL+RwBatuzhSjXpfpBBx8e3tlIFAFFH4=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=uSXn2NOz7b+5uzp8jXD7MVzbPLWDBQ8K9T/EVN0P4d3iH/4AOelp473dCUaR/hbdJOKebTv9atxXrOt10zRtFfegV2tBR8BRpOjRX9/6mo9kpXRR/uCJOiyHBPY1TNKE0G3+J3Pg42agFEi3t36xzXtutE9nRK8upyEROhWS/0Q= 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=0J83EK1j; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=Oxmf8MQ0; 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="0J83EK1j"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="Oxmf8MQ0" From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1746189623; 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=GpAOEyrW1tKfRUyC63KD8h1yHXc0GXf/eXA3VoTp8e8=; b=0J83EK1j85pIzjnIHCE/yuW2GACeehn8CxBcyOFBCZ+kDOpxfabJhyrbVRjBi+ucbk3+OD IdvYUp4wzlhuj3A6okSmYKElRgeY/zFnbPF5sxwy2PAdggoowYlAKHUceAibz/2sRU72s1 OEFd7roM2Osp8sjTPt6ETmeXaN/4tne4z1TM6K/3FL4oDDo/pwsxl2rL3U91JJnjfEuvtK w/O1sWYh+sjMmlqzzrXAJr+ImMWm6M0v6EDgukvdQNSIYCxdBl7RTr2btGt6gaygaagNih YLGrIsB0Nx7CGql218Hfq15B04g5/tUJqFoK/Yf7TAo1gzc4cCkeuJJd5ddVXA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1746189623; 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=GpAOEyrW1tKfRUyC63KD8h1yHXc0GXf/eXA3VoTp8e8=; b=Oxmf8MQ0tqKWsURKIHZqy8pjHVes+Fjoycd6ij2bnqwF6PQE1uvWVOhuSj7CTqJW89Kmce rDbBkAdPpSn+dWCA== Date: Fri, 02 May 2025 14:40:15 +0200 Subject: [PATCH 3/7] selftests: vDSO: vdso_test_correctness: Fix -Wold-style-definitions Precedence: bulk X-Mailing-List: linux-kselftest@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20250502-selftests-vdso-fixes-v1-3-fb5d640a4f78@linutronix.de> References: <20250502-selftests-vdso-fixes-v1-0-fb5d640a4f78@linutronix.de> In-Reply-To: <20250502-selftests-vdso-fixes-v1-0-fb5d640a4f78@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?= =?utf-8?q?=C3=9Fschuh?= X-Developer-Signature: v=1; a=ed25519-sha256; t=1746189620; l=1111; i=thomas.weissschuh@linutronix.de; s=20240209; h=from:subject:message-id; bh=F1VPin51/c8tL+RwBatuzhSjXpfpBBx8e3tlIFAFFH4=; b=bcupxLcTxSsNEv/4tF7aIzFh9GLR2+jD1+h4GayVdebJpCCti6ZDJRH9iv9yuvhbvYXBC89Rh drfC6zRIfohDBFKLMYbUmx5dgMREDJxLFMLf1r6J+DqukuA+851zfIA X-Developer-Key: i=thomas.weissschuh@linutronix.de; a=ed25519; pk=pfvxvpFUDJV2h2nY0FidLUml22uGLSjByFbM6aqQQws= Functions definitions without any argument list produce a warning with -Wold-style-definition: vdso_test_correctness.c:111:13: warning: old-style function definition [-Wold-style-definition] 111 | static void fill_function_pointers() | ^~~~~~~~~~~~~~~~~~~~~~ Explicitly use an empty argument list. Signed-off-by: Thomas Weißschuh --- tools/testing/selftests/vDSO/vdso_test_correctness.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/vDSO/vdso_test_correctness.c b/tools/testing/selftests/vDSO/vdso_test_correctness.c index 5fb97ad67eeaf17b6cfa4f82783c57894f03e5c5..da651cf53c6ca4242085de109c7fc57bd807297c 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) } -static void fill_function_pointers() +static void fill_function_pointers(void) { void *vdso = dlopen("linux-vdso.so.1", RTLD_LAZY | RTLD_LOCAL | RTLD_NOLOAD); From patchwork Fri May 2 12:40:16 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Patchwork-Id: 886777 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 00EFA254B01; Fri, 2 May 2025 12:40:25 +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=1746189627; cv=none; b=fohZPapEK8xb4zh1BDUTjiHpBCKHEiwKW5KP2BFTfOZCNpbEuA89cX/Trc3wspqTA4eJKayGq2ksEtqQdGCLbNwLhudFmZoqlVb5y8UoLiUzqv4Md7Ucf2njYGCfTKZLZNs6fABaH+tloHJwnllGnQTa44HRhBvkT1P8tFrqgWs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746189627; c=relaxed/simple; bh=Rqf9Ybql9mWv2FDqbi7vecIXl64pB64/atVfT6XP3fg=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=sacoPzFRDooGQ3dwuBH89XCP1raC6tb/ylGi1FxC6wtzfFbkwmInf1KKsxFKtROATG1NcmIwXe8KWfKIKO8wfNPvr+XyZNJQX454yKAKmW33ZHUvajXOujWzvjnWodF22PO+ybkiev29+Utcq5SuNoG7Z2T4+M2ZhCf4gDeh2GQ= 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=vxcB5FPb; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=Z7gGEHJy; 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="vxcB5FPb"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="Z7gGEHJy" From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1746189624; 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=vxcB5FPb6FIIELJ+mypUCnbg43pTODm54CtWTuKq3zeIiqoJUfU+zaxbasPxHATiuTwViE Tf2eSwcQmd0vkHyvwkjSYc0IwhT9NY2cGa26kAQgIQybhuR1mfP8Edc/mDelSJHoj87nj9 X2oNvopl5SsDbx+ADpU47QmnOOntlaynUDV8gbci01f3pt1gKCYReBTT62w2M0vPCnkJ5Y z+pHKV2iwQRxcw3O5IvwVSlvP+0qxhbhdBdNtwRMqyWP9gtM/0fHoys5RAsYMdznhUYpWx AFlXY7vidTrQ+xUDX3U8cqZxLSPRvPkwyzWFDkvJ6iqCvF2jcYqXRbB5qriOwg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1746189624; 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=Z7gGEHJyYdHFwONfzvffrwmhG/AsUvUmk16o5GtQwxPnzyC3vYbgFFRkcKPfHjhe0ltSgl ZxsGvwhjI0tmxXDA== Date: Fri, 02 May 2025 14:40:16 +0200 Subject: [PATCH 4/7] selftests: vDSO: vdso_test_getrandom: Drop unused include of linux/compiler.h Precedence: bulk X-Mailing-List: linux-kselftest@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20250502-selftests-vdso-fixes-v1-4-fb5d640a4f78@linutronix.de> References: <20250502-selftests-vdso-fixes-v1-0-fb5d640a4f78@linutronix.de> In-Reply-To: <20250502-selftests-vdso-fixes-v1-0-fb5d640a4f78@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?= =?utf-8?q?=C3=9Fschuh?= X-Developer-Signature: v=1; a=ed25519-sha256; t=1746189620; l=887; i=thomas.weissschuh@linutronix.de; s=20240209; h=from:subject:message-id; bh=Rqf9Ybql9mWv2FDqbi7vecIXl64pB64/atVfT6XP3fg=; b=ProtjfH2x3FGS6C4KoEv+s812KTiGnrCt/YxkgmN5F5XJ2E9QGofSyukkpis32AU8RshTji1b TfCk+TB+c9MBw0aNFMlyLHNrJnKyR252uAJVLtGzERWKvLph+oYutx0 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ßschuh --- 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/testing/selftests/vDSO/vdso_test_getrandom.c index 95057f7567db22226d9cb09a667a56e387a33a46..f36e50f372f935e6d4da3175c81e210653bdce1d 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 #include "../kselftest.h" From patchwork Fri May 2 12:40:17 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Patchwork-Id: 886776 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 3056F255224; Fri, 2 May 2025 12:40:26 +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=1746189628; cv=none; b=QkTG913yQIoHk7NzVn5Ce9v3WnztXm8o0oxaNX1roTK8mnfYBCMCyeDw+whHIC7J20rRj56dw2tYneH50PHrCCvKQ/9wFDFeX7hJRtgRvCZFwXlVNnMdHBUU4Pqjl5dqsjrXyDk57MXqx1W7BivpYcHw0tiRZmVz5tVf2zl6RF0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746189628; c=relaxed/simple; bh=k0Rw54EHU32O44Nm9USpxLtDZulKmyiApa7hB+du7l0=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=TlREAuCkWZKxeJp6WICE4dmKYE1PlODFT0BPeRmFId/rRT10dVylga0AxF06T1Gb1r4zBnTAvSy3i2PPl0hUOS93U926CcJtl9cI7Y1nYLusLGF8Ic1XxxM98xWbxGhrzn3FTQwId9OYqYgA4ar/dG60tr2a+pxnDueSTWBFP/w= 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=mQNhKyca; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=KM8aT++g; 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="mQNhKyca"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="KM8aT++g" From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1746189624; 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=YQ5Wc7VoEeEFEXKY8GCFaOg4jL5AqEiDYCz7K/eX36k=; b=mQNhKycaTN0QliPO8GzC47HsmbA0y1XGTUZKjuSnIom+B6oGAxZI+VsV5clcKt4S+03C/4 mnY/+m3UC+7wC5jB1UDRIvniBpWliGnbcPqSaT7gIIQNNQEkpIHNueAlIrFFNqLsgiIeuv 0hf2CRRFLEwy7SWKkEz4dXztJskFEPnRa+aNfkttUhRfDgB5teIfEj8/0BsiP6+fyfIdBm uutClewqWgf5Mpd4nyK/oS8eI80FlGq9JgS4SynCQ7DaXwGzfWl+Pd9/BAyTnp5e81RiTK i4v60gBEDsF612dbDA7WVgT5vxldiDI8jMuNYPmuJwMjZMjpZLKFdf9j/dh2ew== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1746189624; 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=YQ5Wc7VoEeEFEXKY8GCFaOg4jL5AqEiDYCz7K/eX36k=; b=KM8aT++ga8rygHXvBktcCjFNIpffzJ1wldXVbMS9oRi9+BiltMg7vYGTl0+gSzk6cl6kn1 ulNayHjH9gcDG1Aw== Date: Fri, 02 May 2025 14:40:17 +0200 Subject: [PATCH 5/7] selftests: vDSO: vdso_test_getrandom: Drop some dead code Precedence: bulk X-Mailing-List: linux-kselftest@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20250502-selftests-vdso-fixes-v1-5-fb5d640a4f78@linutronix.de> References: <20250502-selftests-vdso-fixes-v1-0-fb5d640a4f78@linutronix.de> In-Reply-To: <20250502-selftests-vdso-fixes-v1-0-fb5d640a4f78@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?= =?utf-8?q?=C3=9Fschuh?= X-Developer-Signature: v=1; a=ed25519-sha256; t=1746189620; l=1288; i=thomas.weissschuh@linutronix.de; s=20240209; h=from:subject:message-id; bh=k0Rw54EHU32O44Nm9USpxLtDZulKmyiApa7hB+du7l0=; b=YKncfNZsJGp0Clfd/fp6DGhh1q6/+YNbhnGGp9Rbh5s0wqGvPWdPtnll8yBbt5W2SbqI8kr2j YVy6BvokCqaBkoTPsEnoUZ5wsK7cqWMLEen2Ox4smKeg5i2dN3cpW1r X-Developer-Key: i=thomas.weissschuh@linutronix.de; a=ed25519; pk=pfvxvpFUDJV2h2nY0FidLUml22uGLSjByFbM6aqQQws= vgetrandom_put_state() and the variable ret in kselftest() are never used. Drop the dead code. Signed-off-by: Thomas Weißschuh --- tools/testing/selftests/vDSO/vdso_test_getrandom.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/tools/testing/selftests/vDSO/vdso_test_getrandom.c b/tools/testing/selftests/vDSO/vdso_test_getrandom.c index f36e50f372f935e6d4da3175c81e210653bdce1d..b0e0d664508a38d6dde9df0a61ec8198ee928a17 100644 --- a/tools/testing/selftests/vDSO/vdso_test_getrandom.c +++ b/tools/testing/selftests/vDSO/vdso_test_getrandom.c @@ -100,15 +100,6 @@ static void *vgetrandom_get_state(void) return state; } -static void vgetrandom_put_state(void *state) -{ - if (!state) - return; - pthread_mutex_lock(&vgrnd.lock); - vgrnd.states[vgrnd.len++] = state; - pthread_mutex_unlock(&vgrnd.lock); -} - static void vgetrandom_init(void) { const char *version = versions[VDSO_VERSION]; @@ -264,7 +255,7 @@ static void kselftest(void) } for (;;) { struct ptrace_syscall_info info = { 0 }; - int status, ret; + int status; ksft_assert(waitpid(child, &status, 0) >= 0); if (WIFEXITED(status)) { ksft_assert(WEXITSTATUS(status) == 0); From patchwork Fri May 2 12:40:18 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Patchwork-Id: 887323 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 CC7C62550C4; Fri, 2 May 2025 12:40:26 +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=1746189628; cv=none; b=CbVUw0FB6dwIdFQ+Tg+RmlLES7bTTa/0aVsEuckmwObqMiK66S3iGOw+hfgcZnznce3PmSn8RUzCWbuVfJY2x2qpshYlrqPhzZftbXhzLdKHmt66iNuYIHVle5mqM3mZ17YfawOrJ99qRBU3ff5FKif7ctX6BwBOf6zOYvIzS6I= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746189628; c=relaxed/simple; bh=UyHvFVVFIQaACX+qJSkumHzAA5s8RoR7qJuwMjG3Jn4=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=agFKRpTvetqjnJpASHf6teq8WP6yKc/C8PpfEMmrxkmGTOPxFr1aXNyH7yDrUpjukhUtbWRsbJoF4Snp4sTy1QxyT4CXc5IABOBkaS1F4LPxwtodzgHFIn21o7M0iK0+55HfKyCo5ij+fs0maGs0cZwZMIZhk/GoA4yBU2Ufie4= 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=ZOXeZhed; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=W/1vO61B; 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="ZOXeZhed"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="W/1vO61B" From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1746189625; 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=5gTyejjiOXqZR1KvHS5h4rCHXHVNbRv5z/P+yXY/7bY=; b=ZOXeZhed5Zo8wfRXuSMheY2XSWA2ytELUXQANep9FI6idCdV4GdttXNBHrXDIlmZFPGNa0 HCfIJa1pzuXlJvHJR0PwCD9Ms54cw/7ErMbE0VaIzwiXerDWJCmzUbKIQPCWiiJ3J4Vmlc Kf4GYoFrouJ/HEDZ2Coy0yPU7c23wa4Bgs2e/z4mU6MZtMQBjiQSfDaEED/jBpnbXiuAoS tJ39i0jNTjibjy8uJbXNb/o+K98uTIVnrLwFv48PZDieztq3jyHJipJqRfc8k/K8T/bdTP tbXEX7Fw+CLo9mo9GFd/RBev/dPnMow5iHihfw9tZ9HAjIt9tYVsv9m8R+JwUQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1746189625; 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=5gTyejjiOXqZR1KvHS5h4rCHXHVNbRv5z/P+yXY/7bY=; b=W/1vO61BhCo18iGV3Q22efdHoGWJC5Abc3nNm0QLFnKxq1WfCcLfZxl2Ze8LbmQ0Rvd12J m3FQvQF56ex3iLAA== Date: Fri, 02 May 2025 14:40:18 +0200 Subject: [PATCH 6/7] selftests: vDSO: vdso_test_getrandom: Always print TAP header Precedence: bulk X-Mailing-List: linux-kselftest@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20250502-selftests-vdso-fixes-v1-6-fb5d640a4f78@linutronix.de> References: <20250502-selftests-vdso-fixes-v1-0-fb5d640a4f78@linutronix.de> In-Reply-To: <20250502-selftests-vdso-fixes-v1-0-fb5d640a4f78@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?= =?utf-8?q?=C3=9Fschuh?= X-Developer-Signature: v=1; a=ed25519-sha256; t=1746189620; l=1322; i=thomas.weissschuh@linutronix.de; s=20240209; h=from:subject:message-id; bh=UyHvFVVFIQaACX+qJSkumHzAA5s8RoR7qJuwMjG3Jn4=; b=9qT/Futo28wFjs7mdtWWrEGbOMb+sP+5BuR3Shv2iYLdxm3Nr5cLuAEoiHdJFu9aF8M/7IqG3 s731c2UNdcXBvztxsiftC53lHoBoqPEWug5q8kKmLgSfZ3/a6QpPRIE 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ßschuh --- 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/testing/selftests/vDSO/vdso_test_getrandom.c index b0e0d664508a38d6dde9df0a61ec8198ee928a17..01892d8e65d754d0353f7df2b63910d5be8cd1bc 100644 --- a/tools/testing/selftests/vDSO/vdso_test_getrandom.c +++ b/tools/testing/selftests/vDSO/vdso_test_getrandom.c @@ -232,6 +232,7 @@ static void kselftest(void) pid_t child; ksft_print_header(); + vgetrandom_init(); ksft_set_plan(2); for (size_t i = 0; i < 1000; ++i) { @@ -285,8 +286,6 @@ static void usage(const char *argv0) int main(int argc, char *argv[]) { - vgetrandom_init(); - if (argc == 1) { kselftest(); return 0; @@ -296,6 +295,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")) From patchwork Fri May 2 12:40:19 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Patchwork-Id: 887322 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 9B6BB255250; Fri, 2 May 2025 12:40:27 +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=1746189629; cv=none; b=mpNVS5uhSHUO0kA1FVbrn84yLv0jmQR68BEE2u0059mAI1PhO/9tC47BBNjKtgH1DGE0KLPJgYY+jDNvM/LmtwxhJqaRKiTe9FjLfZtNPCQelAsEXVLCcp2SE+6STqV4xG4d4wV2oyef3fvXkZdbk0V0rdTvC8fBQhpY92qnV+U= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746189629; c=relaxed/simple; bh=br7krp9+8M4zKe0RpPB+/gmM+jV6iMTWKPSaZ5x3GfU=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=f1EqYlHXmLbfLxcwM4k2IuKVmpAyQ82YhMOteXnf3Hue9jFZffsQrxx+/sWvFIKWV18ZXAP+P8r4t1VbuR8SsIf7j3QlHwbdBfuDZSZg/NM+hTZ+4xRaQ+eMhwtHfnBiT4/jyevuCeWOmsjoKZCriDMHKG85Rb0RbkhFxrHavqY= 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=V+KrgAOw; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=wXiVl8Yk; 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="V+KrgAOw"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="wXiVl8Yk" From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1746189625; 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=fsLvWnvAGPHW8cTdtBfQSCkuvBKWmDlkApA1kk8SamY=; b=V+KrgAOw5PuLH8GdVzlBYkYvcH/FDHekDCyb6MKdd2gEPhsd46iMSJosMp/i2yKOkbApb6 iR+U/H9e2SBMX8diFCkvl5ppO3Sv3Ovv1L1Qeuxi+/kmrM8BgJua55ukXDvMUP6C2tEm5F 40RjmUjeb+jNNLZZRkEYLYRHPyQny9WxxqsMqlxgj+JmavnGTvRxGDefs9XW/vWg/gZMY7 HlpkcvmhOsgYlXuUuHB066OCfBZYSNC3oreK/+KD7FlSb42XSCghEQvMMp7yvHq/80yeD2 dAYL9Y5yVX9mW5dwaH7YGCJCugPwHRJpoKtVDAJrxhxiOk4oAiA1lHbpvcDzYw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1746189625; 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=fsLvWnvAGPHW8cTdtBfQSCkuvBKWmDlkApA1kk8SamY=; b=wXiVl8YkuBpFTjbUra7q0bBu0jnw5OGh3rmSWgrp9MFi8Q+2IE5sxApZw2eJWNzJaodIEm hoxn5nq2Qk/S/GAQ== Date: Fri, 02 May 2025 14:40:19 +0200 Subject: [PATCH 7/7] selftests: vDSO: vdso_config: Avoid -Wunused-variables Precedence: bulk X-Mailing-List: linux-kselftest@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20250502-selftests-vdso-fixes-v1-7-fb5d640a4f78@linutronix.de> References: <20250502-selftests-vdso-fixes-v1-0-fb5d640a4f78@linutronix.de> In-Reply-To: <20250502-selftests-vdso-fixes-v1-0-fb5d640a4f78@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?= =?utf-8?q?=C3=9Fschuh?= X-Developer-Signature: v=1; a=ed25519-sha256; t=1746189620; l=1202; i=thomas.weissschuh@linutronix.de; s=20240209; h=from:subject:message-id; bh=br7krp9+8M4zKe0RpPB+/gmM+jV6iMTWKPSaZ5x3GfU=; b=TLpzHI9LeTS/mEEkxMznV8DaDu2giwQ86jopSAfLqJ32Lzr5PASkH2kIfAb5++g5gbqUyLytS 6pUtIXuAky8BC4tgzry1A86GVLijk+J8HHJ99Yx6GdaPB82pgwi9VZz 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: ‘versions’ defined but not used [-Wunused-variable] 61 | static const char *versions[7] = { | ^~~~~~~~ Avoid those warnings through attribute((unused)). Signed-off-by: Thomas Weißschuh --- 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/selftests/vDSO/vdso_config.h index 722260f9756198956f0dfccced907284b6851e76..5fdd0f36233742bc47ae79f23d2cfae5a0f56dee 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 +__attribute__((unused)) static const char *versions[7] = { "LINUX_2.6", "LINUX_2.6.15", @@ -68,6 +69,7 @@ static const char *versions[7] = { "LINUX_5.10" }; +__attribute__((unused)) static const char *names[2][7] = { { "__kernel_gettimeofday",