Bala-Vignesh-Reddy
e6fbd1759c
selftests: complete kselftest include centralization
...
This follow-up patch completes centralization of kselftest.h and
ksefltest_harness.h includes in remaining seltests files, replacing all
relative paths with a non-relative paths using shared -I include path in
lib.mk
Tested with gcc-13.3 and clang-18.1, and cross-compiled successfully on
riscv, arm64, x86_64 and powerpc arch.
[[email protected] : add selftests include path for kselftest.h]
Link: https://lkml.kernel.org/r/[email protected]
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Bala-Vignesh-Reddy <[email protected] >
Suggested-by: Andrew Morton <[email protected] >
Link: https://lore.kernel.org/lkml/[email protected] /
Reviewed-by: Wei Yang <[email protected] >
Cc: David Hildenbrand <[email protected] >
Cc: David S. Miller <[email protected] >
Cc: Eric Dumazet <[email protected] >
Cc: Günther Noack <[email protected] >
Cc: Jakub Kacinski <[email protected] >
Cc: Liam Howlett <[email protected] >
Cc: Lorenzo Stoakes <[email protected] >
Cc: Michal Hocko <[email protected] >
Cc: Mickael Salaun <[email protected] >
Cc: Ming Lei <[email protected] >
Cc: Paolo Abeni <[email protected] >
Cc: Shuah Khan <[email protected] >
Cc: Simon Horman <[email protected] >
Cc: Suren Baghdasaryan <[email protected] >
Cc: Vlastimil Babka <[email protected] >
Signed-off-by: Andrew Morton <[email protected] >
2025-11-27 14:24:31 -08:00
Vincent Donnefort
b6f9cd83c6
selftests/ring-buffer: Add test for out-of-bound pgoff mapping
...
Extend the ring-buffer mapping test coverage by checking an out-of-bound
pgoff which has proven to be problematic in the past.
Link: https://lore.kernel.org/r/[email protected]
Cc: Shuah Khan <[email protected] >
Cc: [email protected]
Signed-off-by: Vincent Donnefort <[email protected] >
Signed-off-by: Shuah Khan <[email protected] >
2025-01-14 17:06:32 -07:00
Vincent Donnefort
75d7ff9aa0
selftests/ring-buffer: Handle meta-page bigger than the system
...
Handle the case where the meta-page content is bigger than the system
page-size. This prepares the ground for extending features covered by
the meta-page.
Cc: Shuah Khan <[email protected] >
Cc: [email protected]
Link: https://lore.kernel.org/[email protected]
Acked-by: Shuah Khan <[email protected] >
Signed-off-by: Vincent Donnefort <[email protected] >
Signed-off-by: Steven Rostedt (Google) <[email protected] >
2024-09-11 12:25:12 -04:00
Vincent Donnefort
21ff365b5c
selftests/ring-buffer: Verify the entire meta-page padding
...
Improve the ring-buffer meta-page test coverage by checking for the
entire padding region to be 0 instead of just looking at the first 4
bytes.
Cc: [email protected]
Link: https://lore.kernel.org/[email protected]
Acked-by: Shuah Khan <[email protected] >
Signed-off-by: Vincent Donnefort <[email protected] >
Signed-off-by: Steven Rostedt (Google) <[email protected] >
2024-09-11 12:25:02 -04:00
Vincent Donnefort
eb2dcde9f9
ring-buffer: Align meta-page to sub-buffers for improved TLB usage
...
Previously, the mapped ring-buffer layout caused misalignment between
the meta-page and sub-buffers when the sub-buffer size was not a
multiple of PAGE_SIZE. This prevented hardware with larger TLB entries
from utilizing them effectively.
Add a padding with the zero-page between the meta-page and sub-buffers.
Also update the ring-buffer map_test to verify that padding.
Link: https://lore.kernel.org/[email protected]
Signed-off-by: Vincent Donnefort <[email protected] >
Signed-off-by: Steven Rostedt (Google) <[email protected] >
2024-08-26 13:42:23 -04:00
Edward Liaw
cc937dad85
selftests: centralize -D_GNU_SOURCE= to CFLAGS in lib.mk
...
Centralize the _GNU_SOURCE definition to CFLAGS in lib.mk. Remove
redundant defines from Makefiles that import lib.mk. Convert any usage of
"#define _GNU_SOURCE 1" to "#define _GNU_SOURCE".
This uses the form "-D_GNU_SOURCE=", which is equivalent to
"#define _GNU_SOURCE".
Otherwise using "-D_GNU_SOURCE" is equivalent to "-D_GNU_SOURCE=1" and
"#define _GNU_SOURCE 1", which is less commonly seen in source code and
would require many changes in selftests to avoid redefinition warnings.
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Edward Liaw <[email protected] >
Suggested-by: John Hubbard <[email protected] >
Acked-by: Shuah Khan <[email protected] >
Reviewed-by: Muhammad Usama Anjum <[email protected] >
Cc: Albert Ou <[email protected] >
Cc: André Almeida <[email protected] >
Cc: Darren Hart <[email protected] >
Cc: Dave Hansen <[email protected] >
Cc: Davidlohr Bueso <[email protected] >
Cc: David S. Miller <[email protected] >
Cc: Eric Dumazet <[email protected] >
Cc: Eric W. Biederman <[email protected] >
Cc: Fenghua Yu <[email protected] >
Cc: Ingo Molnar <[email protected] >
Cc: Jakub Kicinski <[email protected] >
Cc: Jarkko Sakkinen <[email protected] >
Cc: Jason Gunthorpe <[email protected] >
Cc: Kees Cook <[email protected] >
Cc: Kevin Tian <[email protected] >
Cc: Palmer Dabbelt <[email protected] >
Cc: Paolo Abeni <[email protected] >
Cc: Paolo Bonzini <[email protected] >
Cc: Paul Walmsley <[email protected] >
Cc: Peter Zijlstra <[email protected] >
Cc: Reinette Chatre <[email protected] >
Cc: Sean Christopherson <[email protected] >
Cc: Thomas Gleixner <[email protected] >
Signed-off-by: Andrew Morton <[email protected] >
2024-07-10 12:14:51 -07:00
Vincent Donnefort
75961e5541
ring-buffer/selftest: Add ring-buffer mapping test
...
Map a ring-buffer, validate the meta-page before and after emitting few
events. Also check ring-buffer mapping boundaries and finally ensure the
tracing snapshot is mutually exclusive.
Link: https://lore.kernel.org/linux-trace-kernel/[email protected]
Cc: Shuah Khan <[email protected] >
Cc: Shuah Khan <[email protected] >
Cc: [email protected]
Acked-by: Muhammad Usama Anjum <[email protected] >
Signed-off-by: Vincent Donnefort <[email protected] >
Signed-off-by: Steven Rostedt (Google) <[email protected] >
2024-05-13 18:09:56 -04:00