|
Revision tags: v6.15, v6.15-rc7, v6.15-rc6, v6.15-rc5, v6.15-rc4, v6.15-rc3, v6.15-rc2, v6.15-rc1, v6.14, v6.14-rc7, v6.14-rc6, v6.14-rc5 |
|
| #
1a59f5d3 |
| 26-Feb-2025 |
Thomas Weißschuh <[email protected]> |
selftests: Add headers target
Some selftests need access to a full UAPI headers tree, for example when building with nolibc which heavily relies on UAPI headers. A reference to such a tree is availa
selftests: Add headers target
Some selftests need access to a full UAPI headers tree, for example when building with nolibc which heavily relies on UAPI headers. A reference to such a tree is available in the KHDR_INCLUDES variable, but there is currently no way to populate such a tree automatically.
Provide a target that the tests can depend on to get access to usable UAPI headers.
Signed-off-by: Thomas Weißschuh <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Reviewed-by: Vincenzo Frascino <[email protected]> Acked-by: Shuah Khan <[email protected]> Link: https://lore.kernel.org/all/[email protected]
show more ...
|
|
Revision tags: v6.14-rc4, v6.14-rc3, v6.14-rc2, v6.14-rc1, v6.13, v6.13-rc7, v6.13-rc6, v6.13-rc5, v6.13-rc4, v6.13-rc3, v6.13-rc2, v6.13-rc1, v6.12, v6.12-rc7, v6.12-rc6, v6.12-rc5, v6.12-rc4, v6.12-rc3, v6.12-rc2, v6.12-rc1, v6.11, v6.11-rc7, v6.11-rc6, v6.11-rc5, v6.11-rc4, v6.11-rc3, v6.11-rc2, v6.11-rc1, v6.10, v6.10-rc7, v6.10-rc6, v6.10-rc5, v6.10-rc4, v6.10-rc3, v6.10-rc2 |
|
| #
a84a0c6a |
| 31-May-2024 |
John Hubbard <[email protected]> |
selftests/lib.mk: silence some clang warnings that gcc already ignores
gcc defaults to silence (off) for the following warnings, but clang defaults to the opposite. The warnings are not useful for t
selftests/lib.mk: silence some clang warnings that gcc already ignores
gcc defaults to silence (off) for the following warnings, but clang defaults to the opposite. The warnings are not useful for the kernel itself, which is why they have remained disabled in gcc for the main kernel build. And it is only due to including kernel data structures in the selftests, that we get the warnings from clang.
-Waddress-of-packed-member -Wgnu-variable-sized-type-not-at-end
In other words, the warnings are not unique to the selftests: there is nothing that the selftests' code does that triggers these warnings, other than the act of including the kernel's data structures. Therefore, silence them for the clang builds as well.
This eliminates warnings for the net/ and user_events/ kselftest subsystems, in these files:
./net/af_unix/scm_rights.c ./net/timestamping.c ./net/ipsec.c ./user_events/perf_test.c
Cc: Nathan Chancellor <[email protected]> Signed-off-by: John Hubbard <[email protected]> Acked-by: Nathan Chancellor <[email protected]> Signed-off-by: Shuah Khan <[email protected]>
show more ...
|
| #
cc937dad |
| 25-Jun-2024 |
Edward Liaw <[email protected]> |
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
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]>
show more ...
|
|
Revision tags: v6.10-rc1 |
|
| #
cee27ae5 |
| 17-May-2024 |
Shuah Khan <[email protected]> |
Revert "selftests: Compile kselftest headers with -D_GNU_SOURCE"
This reverts commit daef47b89efd0b745e8478d69a3ad724bd8b4dc6.
This framework change to add D_GNU_SOURCE to KHDR_INCLUDES to Makefile
Revert "selftests: Compile kselftest headers with -D_GNU_SOURCE"
This reverts commit daef47b89efd0b745e8478d69a3ad724bd8b4dc6.
This framework change to add D_GNU_SOURCE to KHDR_INCLUDES to Makefile, lib.mk, and kselftest_harness.h is causing build failures and warnings.
Revert this change.
Reported-by: Mark Brown <[email protected]> Signed-off-by: Shuah Khan <[email protected]>
show more ...
|
|
Revision tags: v6.9 |
|
| #
daef47b8 |
| 07-May-2024 |
Edward Liaw <[email protected]> |
selftests: Compile kselftest headers with -D_GNU_SOURCE
Add the -D_GNU_SOURCE flag to KHDR_INCLUDES so that it is defined in a central location.
Commit 809216233555 ("selftests/harness: remove use
selftests: Compile kselftest headers with -D_GNU_SOURCE
Add the -D_GNU_SOURCE flag to KHDR_INCLUDES so that it is defined in a central location.
Commit 809216233555 ("selftests/harness: remove use of LINE_MAX") introduced asprintf into kselftest_harness.h, which is a GNU extension and needs _GNU_SOURCE to either be defined prior to including headers or with the -D_GNU_SOURCE flag passed to the compiler.
Fixed up commit log: Shuah Khan <[email protected]>
Fixes: 809216233555 ("selftests/harness: remove use of LINE_MAX") Reported-by: kernel test robot <[email protected]> Closes: https://lore.kernel.org/oe-lkp/[email protected] Signed-off-by: Edward Liaw <[email protected]> Reviewed-by: Muhammad Usama Anjum <[email protected]> Reviewed-by: Mark Brown <[email protected]> Reviewed-by: John Hubbard <[email protected]> Signed-off-by: Shuah Khan <[email protected]>
show more ...
|
|
Revision tags: v6.9-rc7, v6.9-rc6, v6.9-rc5, v6.9-rc4, v6.9-rc3, v6.9-rc2 |
|
| #
d4e6fbd2 |
| 29-Mar-2024 |
Valentin Obst <[email protected]> |
selftests: default to host arch for LLVM builds
Align the behavior for gcc and clang builds by interpreting unset `ARCH` and `CROSS_COMPILE` variables in `LLVM` builds as a sign that the user wants
selftests: default to host arch for LLVM builds
Align the behavior for gcc and clang builds by interpreting unset `ARCH` and `CROSS_COMPILE` variables in `LLVM` builds as a sign that the user wants to build for the host architecture.
This patch preserves the properties that setting the `ARCH` variable to an unknown value will trigger an error that complains about insufficient information, and that a set `CROSS_COMPILE` variable will override the target triple that is determined based on presence/absence of `ARCH`.
When compiling with clang, i.e., `LLVM` is set, an unset `ARCH` variable in combination with an unset `CROSS_COMPILE` variable, i.e., compiling for the host architecture, leads to compilation failures since `lib.mk` can not determine the clang target triple. In this case, the following error message is displayed for each subsystem that does not set `ARCH` in its own Makefile before including `lib.mk` (lines wrapped at 75 chrs):
make[1]: Entering directory '/mnt/build/linux/tools/testing/selftests/ sysctl' ../lib.mk:33: *** Specify CROSS_COMPILE or add '--target=' option to lib.mk. Stop. make[1]: Leaving directory '/mnt/build/linux/tools/testing/selftests/ sysctl'
In the same scenario a gcc build would default to the host architecture, i.e., it would use plain `gcc`.
Fixes: 795285ef2425 ("selftests: Fix clang cross compilation") Reviewed-by: Mark Brown <[email protected]> Signed-off-by: Valentin Obst <[email protected]> Reviewed-by: John Hubbard <[email protected]> Signed-off-by: Shuah Khan <[email protected]>
show more ...
|
| #
e076eaca |
| 28-Mar-2024 |
John Hubbard <[email protected]> |
selftests: break the dependency upon local header files
Patch series "Fix selftests/mm build without requiring "make headers"".
As mentioned in each patch, this implements the solution that we disc
selftests: break the dependency upon local header files
Patch series "Fix selftests/mm build without requiring "make headers"".
As mentioned in each patch, this implements the solution that we discussed in December 2023, in [1]. This turned out to be very clean and easy. It should also be quite easy to maintain.
This should also make Peter Zijlstra happy, because it directly addresses the root cause of his "NAK NAK NAK" reply [2]. :)
[1] https://lore.kernel.org/all/[email protected]/ [2] https://lore.kernel.org/lkml/[email protected]/
This patch (of 2):
Use tools/include/uapi/ files instead. These are obtained by taking a snapshot: run "make headers" at the top level, then copy the desired header file into the appropriate subdir in tools/uapi/.
This was discussed and solved in [1].
However, even before copying any additional files there, there are already quite a few in tools/include/uapi already. And these will immediately fix a number of selftests/mm build failures.
So this patch:
a) Adds TOOLS_INCLUDES to selftests/lib.mk, so that all selftests can immediately and easily include the snapshotted header files.
b) Uses $(TOOLS_INCLUDES) in the selftests/mm build. On today's Arch Linux, this already fixes all build errors except for a few userfaultfd.h (those will be addressed in a subsequent patch).
[1] https://lore.kernel.org/all/[email protected]/
Link: https://lkml.kernel.org/r/[email protected] Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: John Hubbard <[email protected]> Acked-by: David Hildenbrand <[email protected]> Cc: Mark Brown <[email protected]> Cc: Muhammad Usama Anjum <[email protected]> Cc: Suren Baghdasaryan <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Andrea Arcangeli <[email protected]> Cc: Axel Rasmussen <[email protected]> Cc: Peter Xu <[email protected]> Cc: Shuah Khan <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
show more ...
|
| #
6fc6d7f5 |
| 11-Apr-2024 |
Jakub Kicinski <[email protected]> |
selftests: adopt BPF's approach to quieter builds
selftest build is fairly noisy, it's easy to miss warnings. It's standard practice to add alternative messages in the Makefile. I was grepping for e
selftests: adopt BPF's approach to quieter builds
selftest build is fairly noisy, it's easy to miss warnings. It's standard practice to add alternative messages in the Makefile. I was grepping for existing solutions, and found that bpf already has the right knobs.
Move them to lib.mk and adopt in net. Convert the basic rules in lib.mk.
Acked-by: Daniel Borkmann <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
show more ...
|
|
Revision tags: v6.9-rc1, v6.8, v6.8-rc7, v6.8-rc6 |
|
| #
539cd3f4 |
| 21-Feb-2024 |
Marcos Paulo de Souza <[email protected]> |
selftests: lib.mk: Do not process TEST_GEN_MODS_DIR
The directory itself doesn't need have path handling, since it's only to mean where is the directory that contains modules to be built.
Signed-of
selftests: lib.mk: Do not process TEST_GEN_MODS_DIR
The directory itself doesn't need have path handling, since it's only to mean where is the directory that contains modules to be built.
Signed-off-by: Marcos Paulo de Souza <[email protected]> Signed-off-by: Shuah Khan <[email protected]>
show more ...
|
|
Revision tags: v6.8-rc5, v6.8-rc4, v6.8-rc3, v6.8-rc2 |
|
| #
2a0683be |
| 26-Jan-2024 |
Benjamin Poirier <[email protected]> |
selftests: Introduce Makefile variable to list shared bash scripts
Some tests written in bash source other files in a parent directory. For example, drivers/net/bonding/dev_addr_lists.sh sources net
selftests: Introduce Makefile variable to list shared bash scripts
Some tests written in bash source other files in a parent directory. For example, drivers/net/bonding/dev_addr_lists.sh sources net/forwarding/lib.sh. If a subset of tests is exported and run outside the source tree (for example by using `make -C tools/testing/selftests gen_tar TARGETS="drivers/net/bonding"`), these other files must be made available as well.
Commit ae108c48b5d2 ("selftests: net: Fix cross-tree inclusion of scripts") addressed this problem by symlinking and copying the sourced files but this only works for direct dependencies. Commit 25ae948b4478 ("selftests/net: add lib.sh") changed net/forwarding/lib.sh to source net/lib.sh. As a result, that latter file must be included as well when the former is exported. This was not handled and was reverted in commit 2114e83381d3 ("selftests: forwarding: Avoid failures to source net/lib.sh"). In order to allow reinstating the inclusion of net/lib.sh from net/forwarding/lib.sh, add a mechanism to list dependent files in a new Makefile variable and export them. This allows sourcing those files using the same expression whether tests are run in-tree or exported.
Dependencies are not resolved recursively so transitive dependencies must be listed in TEST_INCLUDES. For example, if net/forwarding/lib.sh sources net/lib.sh; the Makefile related to a test that sources net/forwarding/lib.sh from a parent directory must list: TEST_INCLUDES := \ ../../../net/forwarding/lib.sh \ ../../../net/lib.sh
v2: Fix rst syntax in Documentation/dev-tools/kselftest.rst (Jakub Kicinski)
v1 (from RFC): * changed TEST_INCLUDES to take relative paths, like other TEST_* variables (Vladimir Oltean) * preserved common "$(MAKE) OUTPUT=... -C ... target" ordering in Makefile (Petr Machata)
Signed-off-by: Benjamin Poirier <[email protected]> Signed-off-by: David S. Miller <[email protected]>
show more ...
|
|
Revision tags: v6.8-rc1 |
|
| #
6727980b |
| 12-Jan-2024 |
Marcos Paulo de Souza <[email protected]> |
kselftests: lib.mk: Add TEST_GEN_MODS_DIR variable
Add TEST_GEN_MODS_DIR variable for kselftests. It can point to a directory containing kernel modules that will be used by selftest scripts.
The mo
kselftests: lib.mk: Add TEST_GEN_MODS_DIR variable
Add TEST_GEN_MODS_DIR variable for kselftests. It can point to a directory containing kernel modules that will be used by selftest scripts.
The modules are built as external modules for the running kernel. As a result they are always binary compatible and the same tests can be used for older or newer kernels.
The build requires "kernel-devel" package to be installed. For example, in the upstream sources, the rpm devel package is produced by "make rpm-pkg"
The modules can be built independently by
make -C tools/testing/selftests/livepatch/
or they will be automatically built before running the tests via
make -C tools/testing/selftests/livepatch/ run_tests
Note that they are _not_ built when running the standalone tests by calling, for example, ./test-state.sh.
Along with TEST_GEN_MODS_DIR, it was necessary to create a new install rule. INSTALL_MODS_RULE is needed because INSTALL_SINGLE_RULE would copy the entire TEST_GEN_MODS_DIR directory to the destination, even the files created by Kbuild to compile the modules. The new install rule copies only the .ko files, as we would expect the gen_tar to work.
Reviewed-by: Joe Lawrence <[email protected]> Reviewed-by: Petr Mladek <[email protected]> Signed-off-by: Marcos Paulo de Souza <[email protected]> Signed-off-by: Shuah Khan <[email protected]>
show more ...
|
|
Revision tags: v6.7, v6.7-rc8, v6.7-rc7, v6.7-rc6, v6.7-rc5 |
|
| #
43e8832f |
| 09-Dec-2023 |
John Hubbard <[email protected]> |
Revert "selftests: error out if kernel header files are not yet built"
This reverts commit 9fc96c7c19df ("selftests: error out if kernel header files are not yet built").
It turns out that requirin
Revert "selftests: error out if kernel header files are not yet built"
This reverts commit 9fc96c7c19df ("selftests: error out if kernel header files are not yet built").
It turns out that requiring the kernel headers to be built as a prerequisite to building selftests, does not work in many cases. For example, Peter Zijlstra writes:
"My biggest beef with the whole thing is that I simply do not want to use 'make headers', it doesn't work for me.
I have a ton of output directories and I don't care to build tools into the output dirs, in fact some of them flat out refuse to work that way (bpf comes to mind)." [1]
Therefore, stop erroring out on the selftests build. Additional patches will be required in order to change over to not requiring the kernel headers.
[1] https://lore.kernel.org/[email protected]
Link: https://lkml.kernel.org/r/[email protected] Fixes: 9fc96c7c19df ("selftests: error out if kernel header files are not yet built") Signed-off-by: John Hubbard <[email protected]> Cc: Anders Roxell <[email protected]> Cc: Muhammad Usama Anjum <[email protected]> Cc: David Hildenbrand <[email protected]> Cc: Peter Xu <[email protected]> Cc: Jonathan Corbet <[email protected]> Cc: Nathan Chancellor <[email protected]> Cc: Shuah Khan <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Marcos Paulo de Souza <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
show more ...
|
|
Revision tags: v6.7-rc4, v6.7-rc3, v6.7-rc2, v6.7-rc1, v6.6, v6.6-rc7, v6.6-rc6, v6.6-rc5, v6.6-rc4, v6.6-rc3, v6.6-rc2, v6.6-rc1, v6.5 |
|
| #
3f3f3841 |
| 22-Aug-2023 |
Björn Töpel <[email protected]> |
selftests: Keep symlinks, when possible
When kselftest is built/installed with the 'gen_tar' target, rsync is used for the installation step to copy files. Extra care is needed for tests that have s
selftests: Keep symlinks, when possible
When kselftest is built/installed with the 'gen_tar' target, rsync is used for the installation step to copy files. Extra care is needed for tests that have symlinks. Commit ae108c48b5d2 ("selftests: net: Fix cross-tree inclusion of scripts") added '-L' (transform symlink into referent file/dir) to rsync, to fix dangling links. However, that broke some tests where the symlink (being a symlink) is part of the test (e.g. exec:execveat).
Use rsync's '--copy-unsafe-links' that does right thing.
Fixes: ae108c48b5d2 ("selftests: net: Fix cross-tree inclusion of scripts") Signed-off-by: Björn Töpel <[email protected]> Reviewed-by: Benjamin Poirier <[email protected]> Signed-off-by: Shuah Khan <[email protected]>
show more ...
|
|
Revision tags: v6.5-rc7, v6.5-rc6, v6.5-rc5, v6.5-rc4, v6.5-rc3, v6.5-rc2, v6.5-rc1, v6.4, v6.4-rc7, v6.4-rc6 |
|
| #
9fc96c7c |
| 06-Jun-2023 |
John Hubbard <[email protected]> |
selftests: error out if kernel header files are not yet built
As per a discussion with Muhammad Usama Anjum [1], the following is how one is supposed to build selftests:
make headers && make -C
selftests: error out if kernel header files are not yet built
As per a discussion with Muhammad Usama Anjum [1], the following is how one is supposed to build selftests:
make headers && make -C tools/testing/selftests/mm
Change the selftest build system's lib.mk to fail out with a helpful message if that prerequisite "make headers" has not been done yet.
[1] https://lore.kernel.org/all/[email protected]/
[[email protected]: abort the make process the first time headers aren't detected] Link: https://lkml.kernel.org/r/[email protected] [[email protected]: fix out-of-tree builds] Link: https://lkml.kernel.org/r/[email protected] Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: John Hubbard <[email protected]> Signed-off-by: Anders Roxell <[email protected]> Reviewed-by: Muhammad Usama Anjum <[email protected]> Tested-by: Muhammad Usama Anjum <[email protected]> Cc: David Hildenbrand <[email protected]> Cc: Peter Xu <[email protected]> Cc: Jonathan Corbet <[email protected]> Cc: Nathan Chancellor <[email protected]> Cc: Shuah Khan <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
show more ...
|
|
Revision tags: v6.4-rc5, v6.4-rc4, v6.4-rc3, v6.4-rc2, v6.4-rc1, v6.3, v6.3-rc7, v6.3-rc6, v6.3-rc5, v6.3-rc4, v6.3-rc3, v6.3-rc2, v6.3-rc1, v6.2, v6.2-rc8, v6.2-rc7, v6.2-rc6, v6.2-rc5, v6.2-rc4, v6.2-rc3, v6.2-rc2, v6.2-rc1, v6.1, v6.1-rc8, v6.1-rc7, v6.1-rc6, v6.1-rc5, v6.1-rc4, v6.1-rc3, v6.1-rc2, v6.1-rc1, v6.0, v6.0-rc7, v6.0-rc6, v6.0-rc5, v6.0-rc4, v6.0-rc3, v6.0-rc2, v6.0-rc1 |
|
| #
624c60f3 |
| 09-Aug-2022 |
Guillaume Tucker <[email protected]> |
selftests: fix LLVM build for i386 and x86_64
Add missing cases for the i386 and x86_64 architectures when determining the LLVM target for building kselftest.
Fixes: 795285ef2425 ("selftests: Fix c
selftests: fix LLVM build for i386 and x86_64
Add missing cases for the i386 and x86_64 architectures when determining the LLVM target for building kselftest.
Fixes: 795285ef2425 ("selftests: Fix clang cross compilation") Signed-off-by: Guillaume Tucker <[email protected]> Reviewed-by: Nathan Chancellor <[email protected]> Signed-off-by: Shuah Khan <[email protected]>
show more ...
|
| #
9fdaca2c |
| 11-Jan-2023 |
Mark Brown <[email protected]> |
kselftest: Fix error message for unconfigured LLVM builds
We are missing a ) when we attempt to complain about not having enough configuration for clang, resulting in the rather inscrutable error:
kselftest: Fix error message for unconfigured LLVM builds
We are missing a ) when we attempt to complain about not having enough configuration for clang, resulting in the rather inscrutable error:
../lib.mk:23: *** unterminated call to function 'error': missing ')'. Stop.
Add the required ) so we print the message we were trying to print.
Signed-off-by: Mark Brown <[email protected]> Signed-off-by: Shuah Khan <[email protected]>
show more ...
|
| #
ae108c48 |
| 19-Oct-2022 |
Benjamin Poirier <[email protected]> |
selftests: net: Fix cross-tree inclusion of scripts
When exporting and running a subset of selftests via kselftest, files from parts of the source tree which were not exported are not available. A f
selftests: net: Fix cross-tree inclusion of scripts
When exporting and running a subset of selftests via kselftest, files from parts of the source tree which were not exported are not available. A few tests are trying to source such files. Address the problem by using symlinks.
The problem can be reproduced by running: make -C tools/testing/selftests gen_tar TARGETS="drivers/net/bonding" [... extract archive ...] ./run_kselftest.sh
or: make kselftest KBUILD_OUTPUT=/tmp/kselftests TARGETS="drivers/net/bonding"
Fixes: bbb774d921e2 ("net: Add tests for bonding and team address list management") Fixes: eccd0a80dc7f ("selftests: net: dsa: add a stress test for unlocked FDB operations") Link: https://lore.kernel.org/netdev/[email protected]/ Reported-by: Jonathan Toppins <[email protected]> Signed-off-by: Benjamin Poirier <[email protected]> Reviewed-by: Jonathan Toppins <[email protected]> Signed-off-by: Jakub Kicinski <[email protected]>
show more ...
|
| #
de3ee3f6 |
| 09-Sep-2022 |
Mickaël Salaün <[email protected]> |
selftests: Use optional USERCFLAGS and USERLDFLAGS
This change enables to extend CFLAGS and LDFLAGS from command line, e.g. to extend compiler checks: make USERCFLAGS=-Werror USERLDFLAGS=-static
US
selftests: Use optional USERCFLAGS and USERLDFLAGS
This change enables to extend CFLAGS and LDFLAGS from command line, e.g. to extend compiler checks: make USERCFLAGS=-Werror USERLDFLAGS=-static
USERCFLAGS and USERLDFLAGS are documented in Documentation/kbuild/makefiles.rst and Documentation/kbuild/kbuild.rst
This should be backported (down to 5.10) to improve previous kernel versions testing as well.
Cc: Shuah Khan <[email protected]> Cc: [email protected] Signed-off-by: Mickaël Salaün <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Shuah Khan <[email protected]>
show more ...
|
| #
a5254052 |
| 09-Sep-2022 |
Mickaël Salaün <[email protected]> |
selftests/landlock: Fix out-of-tree builds
These changes simplify the Makefile and handle these 5 ways to build Landlock tests: - make -C tools/testing/selftests/landlock - make -C tools/testing/sel
selftests/landlock: Fix out-of-tree builds
These changes simplify the Makefile and handle these 5 ways to build Landlock tests: - make -C tools/testing/selftests/landlock - make -C tools/testing/selftests TARGETS=landlock gen_tar - make TARGETS=landlock kselftest-gen_tar - make TARGETS=landlock O=build kselftest-gen_tar - make -C /tmp/linux TARGETS=landlock O=/tmp/build kselftest-gen_tar
This also makes $(KHDR_INCLUDES) available to other test collections when building in their directory.
Fixes: f1227dc7d041 ("selftests/landlock: fix broken include of linux/landlock.h") Fixes: 3bb267a36185 ("selftests: drop khdr make target") Cc: Anders Roxell <[email protected]> Cc: Guillaume Tucker <[email protected]> Cc: Mark Brown <[email protected]> Cc: Shuah Khan <[email protected]> Signed-off-by: Mickaël Salaün <[email protected]> Link: https://lore.kernel.org/r/[email protected]
show more ...
|
| #
bdbf0617 |
| 19-Aug-2022 |
Axel Rasmussen <[email protected]> |
selftests/vm: fix inability to build any vm tests
When we stopped using KSFT_KHDR_INSTALL, a side effect is we also changed the value of `top_srcdir`. This can be seen by looking at the code removed
selftests/vm: fix inability to build any vm tests
When we stopped using KSFT_KHDR_INSTALL, a side effect is we also changed the value of `top_srcdir`. This can be seen by looking at the code removed by commit 49de12ba06ef ("selftests: drop KSFT_KHDR_INSTALL make target").
(Note though that this commit didn't break this, technically the one before it did since that's the one that stopped KSFT_KHDR_INSTALL from being used, even though the code was still there.)
Previously lib.mk reconfigured `top_srcdir` when KSFT_KHDR_INSTALL was being used. Now, that's no longer the case.
As a result, the path to gup_test.h in vm/Makefile was wrong, and since it's a dependency of all of the vm binaries none of them could be built. Instead, we'd get an "error" like:
make[1]: *** No rule to make target '/[...]/tools/testing/selftests/vm/compaction_test', needed by 'all'. Stop.
So, modify lib.mk so it once again sets top_srcdir to the root of the kernel tree.
Fixes: f2745dc0ba3d ("selftests: stop using KSFT_KHDR_INSTALL") Signed-off-by: Axel Rasmussen <[email protected]> Signed-off-by: Shuah Khan <[email protected]>
show more ...
|
|
Revision tags: v5.19, v5.19-rc8, v5.19-rc7, v5.19-rc6 |
|
| #
49de12ba |
| 08-Jul-2022 |
Guillaume Tucker <[email protected]> |
selftests: drop KSFT_KHDR_INSTALL make target
Drop the KSFT_KHDR_INSTALL make target now that all use-cases have been removed from the other kselftest Makefiles.
Signed-off-by: Guillaume Tucker <gu
selftests: drop KSFT_KHDR_INSTALL make target
Drop the KSFT_KHDR_INSTALL make target now that all use-cases have been removed from the other kselftest Makefiles.
Signed-off-by: Guillaume Tucker <[email protected]> Tested-by: Anders Roxell <[email protected]> Signed-off-by: Shuah Khan <[email protected]>
show more ...
|
|
Revision tags: v5.19-rc5, v5.19-rc4, v5.19-rc3 |
|
| #
795285ef |
| 14-Jun-2022 |
Mark Brown <[email protected]> |
selftests: Fix clang cross compilation
Unlike GCC clang uses a single compiler image to support multiple target architectures meaning that we can't simply rely on CROSS_COMPILE to select the output
selftests: Fix clang cross compilation
Unlike GCC clang uses a single compiler image to support multiple target architectures meaning that we can't simply rely on CROSS_COMPILE to select the output architecture. Instead we must pass --target to the compiler to tell it what to output, kselftest was not doing this so cross compilation of kselftest using clang resulted in kselftest being built for the host architecture.
More work is required to fix tests using custom rules but this gets the bulk of things building.
Signed-off-by: Mark Brown <[email protected]> Signed-off-by: Shuah Khan <[email protected]>
show more ...
|
|
Revision tags: v5.19-rc2, v5.19-rc1, v5.18, v5.18-rc7, v5.18-rc6, v5.18-rc5, v5.18-rc4, v5.18-rc3, v5.18-rc2, v5.18-rc1, v5.17, v5.17-rc8, v5.17-rc7 |
|
| #
e9c28192 |
| 04-Mar-2022 |
Nathan Chancellor <[email protected]> |
kbuild: Make $(LLVM) more flexible
The LLVM make variable allows a developer to quickly switch between the GNU and LLVM tools. However, it does not handle versioned binaries, such as the ones shippe
kbuild: Make $(LLVM) more flexible
The LLVM make variable allows a developer to quickly switch between the GNU and LLVM tools. However, it does not handle versioned binaries, such as the ones shipped by Debian, as LLVM=1 just defines the tool variables with the unversioned binaries.
There was some discussion during the review of the patch that introduces LLVM=1 around versioned binaries, ultimately coming to the conclusion that developers can just add the folder that contains the unversioned binaries to their PATH, as Debian's versioned suffixed binaries are really just symlinks to the unversioned binaries in /usr/lib/llvm-#/bin:
$ realpath /usr/bin/clang-14 /usr/lib/llvm-14/bin/clang
$ PATH=/usr/lib/llvm-14/bin:$PATH make ... LLVM=1
However, that can be cumbersome to developers who are constantly testing series with different toolchains and versions. It is simple enough to support these versioned binaries directly in the Kbuild system by allowing the developer to specify the version suffix with LLVM=, which is shorter than the above suggestion:
$ make ... LLVM=-14
It does not change the meaning of LLVM=1 (which will continue to use unversioned binaries) and it does not add too much additional complexity to the existing $(LLVM) code, while allowing developers to quickly test their series with different versions of the whole LLVM suite of tools.
Some developers may build LLVM from source but not add the binaries to their PATH, as they may not want to use that toolchain systemwide. Support those developers by allowing them to supply the directory that the LLVM tools are available in, as it is no more complex to support than the version suffix change above.
$ make ... LLVM=/path/to/llvm/
Update and reorder the documentation to reflect these new additions. At the same time, notate that LLVM=0 is not the same as just omitting it altogether, which has confused people in the past.
Link: https://lore.kernel.org/r/[email protected]/ Link: https://lore.kernel.org/r/[email protected]/ Suggested-by: Masahiro Yamada <[email protected]> Suggested-by: Peter Zijlstra <[email protected]> Signed-off-by: Nathan Chancellor <[email protected]> Reviewed-by: Kees Cook <[email protected]> Reviewed-by: Nick Desaulniers <[email protected]> Signed-off-by: Masahiro Yamada <[email protected]>
show more ...
|
|
Revision tags: v5.17-rc6, v5.17-rc5, v5.17-rc4, v5.17-rc3, v5.17-rc2, v5.17-rc1, v5.16, v5.16-rc8, v5.16-rc7, v5.16-rc6, v5.16-rc5, v5.16-rc4, v5.16-rc3, v5.16-rc2, v5.16-rc1 |
|
| #
a738a4ce |
| 05-Nov-2021 |
Anders Roxell <[email protected]> |
selftests: cgroup: build error multiple outpt files
When building selftests/cgroup: with clang the following error are seen:
clang -Wall -pthread test_memcontrol.c cgroup_util.c ../clone3/clone3
selftests: cgroup: build error multiple outpt files
When building selftests/cgroup: with clang the following error are seen:
clang -Wall -pthread test_memcontrol.c cgroup_util.c ../clone3/clone3_selftests.h -o .../builds/current/kselftest/cgroup/test_memcontrol clang: error: cannot specify -o when generating multiple output files make[3]: *** [../lib.mk:146: .../builds/current/kselftest/cgroup/test_memcontrol] Error 1
Rework to add the header files to LOCAL_HDRS before including ../lib.mk, since the dependency is evaluated in '$(OUTPUT)/%:%.c $(LOCAL_HDRS)' in file lib.mk.
Suggested-by: Arnd Bergmann <[email protected]> Signed-off-by: Anders Roxell <[email protected]> Acked-by: Christian Brauner <[email protected]> Signed-off-by: Shuah Khan <[email protected]>
show more ...
|
|
Revision tags: v5.15, v5.15-rc7, v5.15-rc6, v5.15-rc5, v5.15-rc4, v5.15-rc3, v5.15-rc2 |
|
| #
8914a7a2 |
| 15-Sep-2021 |
Li Zhijian <[email protected]> |
selftests: be sure to make khdr before other targets
LKP/0Day reported some building errors about kvm, and errors message are not always same: - lib/x86_64/processor.c:1083:31: error: ‘KVM_CAP_NESTE
selftests: be sure to make khdr before other targets
LKP/0Day reported some building errors about kvm, and errors message are not always same: - lib/x86_64/processor.c:1083:31: error: ‘KVM_CAP_NESTED_STATE’ undeclared (first use in this function); did you mean ‘KVM_CAP_PIT_STATE2’? - lib/test_util.c:189:30: error: ‘MAP_HUGE_16KB’ undeclared (first use in this function); did you mean ‘MAP_HUGE_16GB’?
Although kvm relies on the khdr, they still be built in parallel when -j is specified. In this case, it will cause compiling errors.
Here we mark target khdr as NOTPARALLEL to make it be always built first.
CC: Philip Li <[email protected]> Reported-by: kernel test robot <[email protected]> Signed-off-by: Li Zhijian <[email protected]> Signed-off-by: Shuah Khan <[email protected]>
show more ...
|