linux/Documentation/dev-tools
Marcos Paulo de Souza 6727980b67 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 <joe.lawrence@redhat.com>
Reviewed-by: Petr Mladek <pmladek@suse.com>
Signed-off-by: Marcos Paulo de Souza <mpdesouza@suse.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
2024-01-22 10:29:41 -07:00
..
kunit This pull request contains the following changes for UML: 2024-01-17 10:44:34 -08:00
checkpatch.rst checkpatch: warn for non-standard fixes tag style 2022-10-03 14:21:44 -07:00
checkuapi.rst docs: dev-tools: Add UAPI checker documentation 2023-12-29 22:25:21 +09:00
coccinelle.rst Documentation: coccinelle: Escape --options to fix Sphinx output 2023-01-31 13:55:44 -07:00
gcov.rst docs/gcov: Convert two tags to ref in dev-tools/gov.rst 2021-04-08 11:19:43 -06:00
gdb-kernel-debugging.rst docs/scripts/gdb: add necessary make scripts_gdb step 2023-01-26 11:21:05 -07:00
index.rst Kbuild updates for v6.8 2024-01-18 17:57:07 -08:00
kasan.rst Documentation: *san: drop "the" from article titles 2023-10-18 14:34:15 -07:00
kcov.rst kcov: improve documentation 2023-04-08 13:45:36 -07:00
kcsan.rst Documentation: *san: drop "the" from article titles 2023-10-18 14:34:15 -07:00
kfence.rst kfence: allow use of a deferrable timer 2022-03-22 15:57:11 -07:00
kgdb.rst Documentation: kgdb: Replace deprecated remotebaud 2022-01-07 09:33:13 -07:00
kmemleak.rst docs: kmemleak: adjust to config renaming 2023-04-20 17:53:38 -06:00
kmsan.rst Documentation: *san: drop "the" from article titles 2023-10-18 14:34:15 -07:00
kselftest.rst kselftests: lib.mk: Add TEST_GEN_MODS_DIR variable 2024-01-22 10:29:41 -07:00
ktap.rst Documentation: dev-tools: Clarify requirements for result description 2022-12-12 14:13:48 -07:00
sparse.rst Documentation/sparse: add hints about __CHECKER__ 2022-03-23 19:00:33 -07:00
testing-overview.rst Documentation: dev-tools: Enhance static analysis section with discussion 2022-04-05 09:48:25 -06:00
ubsan.rst Documentation: ubsan: drop "the" from article title 2023-11-01 12:38:35 -07:00