Re: [PATCH v2 2/2] selftests: Replace relative includes with non-relative for kselftest.h and kselftest_harness.h

2025-08-31 Thread Bala-Vignesh-Reddy
Hi Andrew, Sorry for the trouble caused by this patch. No problem on dropping the conflicting hunks. I'll send a follow up patch after 6.17 to cover the missed conversion sites. Thanks for your review. Bala Vignesh

[PATCH v2 1/2] selftests: Centralize include path for kselftest.h and kselftest_harness.h

2025-08-30 Thread Bala-Vignesh-Reddy
Add compile flag in lib.mk, to include the selftest/ directory while building. Suggested-by: Wei Yang Signed-off-by: Bala-Vignesh-Reddy --- tools/testing/selftests/lib.mk | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/testing/selftests/lib.mk b/tools/testing/selftests/lib.mk

[PATCH v2 0/2] selftests: Centralize kselftest headers to avoid relative includes

2025-08-30 Thread Bala-Vignesh-Reddy
/20250820143954.33d95635e504e94df0193...@linux-foundation.org/ Signed-off-by: Bala-Vignesh-Reddy --- Changes in v2: Patch 1: Move include path into lib.mk using top_srcdir; drop Makefile change; Patch 2 unchanged. Suggested-by: Wei Yang --- Bala-Vignesh-Reddy (2): selftests: Centralize include path for kselftest.h

Re: [PATCH 2/2] selftests: Replace relative includes with non-relative for kselftest.h and kselftest_harness.h

2025-08-29 Thread Bala-Vignesh-Reddy
>+ifeq ($(KSFT_INCLUDES),) >+KSFT_INCLUDES := -I../ >+endif >+ This makes sense, but if we do it for mm/ then we have to follow this for all subdirectories in selftests.. that might cause problems if subdirectories are nested ones likes filesystems/. Duplicating this across all subdir Makefile a

Re: [PATCH 2/2] selftests: Replace relative includes with non-relative for kselftest.h and kselftest_harness.h

2025-08-28 Thread Bala-Vignesh-Reddy
Hi Wei, Thanks for testing and for your feedback. Yeah, if you try to build inside a subdirectory, the top level export may not apply, so CFLAGS don't get updated, and even if they did, the path could be pointing to wrong location. As the docs recommend, building selftest using TARGETS, either f

[PATCH 1/2] selftests: Centralize include path for kselftest.h and kselftest_harness.h

2025-08-27 Thread Bala-Vignesh-Reddy
Add compile flag in Makefile and export it in lib.mk Also add CFLAGS in sync/Makefile's rules to fix include path error for kselftest.h. Signed-off-by: Bala-Vignesh-Reddy --- tools/testing/selftests/Makefile | 4 tools/testing/selftests/lib.mk | 2 ++ 2 files changed, 6 inser

[PATCH 0/2] selftests: Centralize kselftest headers to avoid relative includes

2025-08-27 Thread Bala-Vignesh-Reddy
-2 applies bulk source change (Patch 2 is large but it is replaced automatically) Checked the changes with gcc-13.32 and clang 18.1 Suggested-by: Andrew Morton Link: https://lore.kernel.org/lkml/20250820143954.33d95635e504e94df0193...@linux-foundation.org/ Bala-Vignesh-Reddy (2): selftests

[PATCH] selftests: filesystems: mount-notify: remove kernel_fsid_t

2025-08-27 Thread Bala-Vignesh-Reddy
-by: Bala-Vignesh-Reddy --- .../filesystems/mount-notify/mount-notify_test.c | 8 .../filesystems/mount-notify/mount-notify_test_ns.c | 8 2 files changed, 16 deletions(-) diff --git a/tools/testing/selftests/filesystems/mount-notify/mount-notify_test.c b/tools

Re: [PATCH] selftests: proc: mark vsyscall strings maybe-unused

2025-08-21 Thread Bala-Vignesh-Reddy
Hi Andrew, Thanks for your feedback, I didn't notice that __maybe_unused is defined repeatedly in selftests directory. Following your suggestions, I've submitted a cleanup patch that centralise the __maybe_unused definition in tools/testing/selftests/kselftest.h and removed the redundant copies a

[PATCH] selftests: proc: mark vsyscall strings maybe-unused

2025-08-20 Thread Bala-Vignesh-Reddy
-variable] Signed-off-by: Bala-Vignesh-Reddy --- tools/testing/selftests/proc/proc-pid-vm.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/tools/testing/selftests/proc/proc-pid-vm.c b/tools/testing/selftests/proc/proc-pid-vm.c index d04685771952..978cbcb3eb11 100644

[PATCH] selftests: riscv: Add README for RISC-V KSelfTest

2025-08-15 Thread Bala-Vignesh-Reddy
, running and installing the tests, along with a reference to general kselftest documentation. Signed-off-by: Bala-Vignesh-Reddy --- tools/testing/selftests/riscv/README | 24 1 file changed, 24 insertions(+) create mode 100644 tools/testing/selftests/riscv/README diff --git a

[PATCH v2] selftests: arm64: Check fread return value in exec_target

2025-08-08 Thread Bala-Vignesh-Reddy
7;warn_unused_result' [-Wunused-result] Fixes: 806a15b2545e ("kselftests/arm64: add PAuth test for whether exec() changes keys") Signed-off-by: Bala-Vignesh-Reddy --- Changes in v2: Use EXIT_FAILURE instead of -1. --- tools/testing/selftests/arm64/pauth/exec_target.c | 7 ++-

[PATCH] selftests: arm64: Check fread return value in exec_target

2025-08-07 Thread Bala-Vignesh-Reddy
7;warn_unused_result' [-Wunused-result] Fixes: 806a15b2545e ("kselftests/arm64: add PAuth test for whether exec() changes keys") Signed-off-by: Bala-Vignesh-Reddy --- tools/testing/selftests/arm64/pauth/exec_target.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --

[PATCH v2] selftests: arm64: Fix -Waddress warning in tpidr2 test

2025-08-07 Thread Bala-Vignesh-Reddy
valuate as 'true' [-Waddress] Fixes: 6d80cb73131d ("kselftest/arm64: Convert tpidr2 test to use kselftest.h") Signed-off-by: Bala-Vignesh-Reddy --- tools/testing/selftests/arm64/abi/tpidr2.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/testin

[no subject]

2025-08-07 Thread Bala-Vignesh-Reddy
Hi Anshuman, Thanks for the feedback. I've added the warning text to the commit message and included the Fixes tag as suggested. Patch v2 attached. Best Regards, Bala Vignesh Reddy

[PATCH] selftests: arm64: Fix -Waddress warning in tpidr2 test

2025-08-06 Thread Bala-Vignesh-Reddy
Resolve compiler warning about always true condition in ksft_test_result in tpidr2, passing actual function. This silences -Waddress warning while maintaining test functionality. Signed-off-by: Bala-Vignesh-Reddy --- tools/testing/selftests/arm64/abi/tpidr2.c | 8 1 file changed, 4