[Devel] [PATCH RHEL10 COMMIT] selftests: vDSO: vdso_test_getrandom: Avoid -Wunused
Konstantin Khorenko
khorenko at virtuozzo.com
Tue Jun 16 12:20:20 MSK 2026
The commit is pushed to "branch-rh10-6.12.0-211.16.1.12.x.vz10-ovz" and will appear at git at bitbucket.org:openvz/vzkernel.git
after rh10-6.12.0-211.16.1.12.1.vz10
------>
commit 62d815cfb5e05cabf3a443142cc19be8faf2731b
Author: Thomas WeiÃschuh <thomas.weissschuh at linutronix.de>
Date: Mon Jun 15 23:42:04 2026 +0300
selftests: vDSO: vdso_test_getrandom: Avoid -Wunused
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Ãschuh <thomas.weissschuh at linutronix.de>
Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
Link: https://lore.kernel.org/all/20250611-selftests-vdso-fixes-v3-4-e62e37a6bcf5@linutronix.de
(cherry picked from commit b8ae430871254f95dd81dcff01828be3f6b24a57)
Signed-off-by: Eva Kurchatova <eva.kurchatova at virtuozzo.com>
https://virtuozzo.atlassian.net/browse/VSTOR-134200
Feature: fix selftests
---
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/testing/selftests/vDSO/vdso_test_getrandom.c
index 95057f7567db2..7246b0a4bbd41 100644
--- a/tools/testing/selftests/vDSO/vdso_test_getrandom.c
+++ b/tools/testing/selftests/vDSO/vdso_test_getrandom.c
@@ -101,6 +101,7 @@ static void *vgetrandom_get_state(void)
return state;
}
+__attribute__((unused)) /* Example for libc implementors */
static void vgetrandom_put_state(void *state)
{
if (!state)
@@ -265,7 +266,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);
More information about the Devel
mailing list