Commits on Source (3)
-
Adds a simple library for interacting with kmemleak and add unit testing for the library. There are two modes intended to integrate with igt_runner: - once: collect kmemleaks after all test completed - each: collect kmemleaks after eachb test completes Cc: vitaly.prosyak@amd.com Cc: christian.koenig@amd.com Cc: alexander.deucher@amd.com Cc: jesse.zhang@amd.com Cc: harry.wentland@amd.com Cc: zbigniew.kempczynski@intel.com Cc: kamil.konieczny@linux.intel.com Cc: ryszard.knop@intel.com Cc: lucas.demarchi@intel.com Cc: katarzyna.piecielska@intel.com Reviewed-by:
Zbigniew Kempczyński <zbigniew.kempczynski@intel.com> Reviewed-by:
Jonathan Cavitt <jonathan.cavitt@intel.com> Reviewed-by:
Vitaly Prosyak <vitaly.prosyak@amd.com> Signed-off-by:
Peter Senna Tschudin <peter.senna@linux.intel.com> Reviewed-by:
Kamil Konieczny <kamil.konieczny@linux.intel.com>
-
This patch modifies igt_runner to support runner_kmemleak() calls. By default, kmemleak scanning is disabled, so new command-line options are introduced to enable it: * -k, -k<option>, --kmemleak, --kmemleak=<option> The available options are: * once: Do single kmemleak scan after last test in the test list * each: Perform a kmemleak scan after each test completes By default, kmemleak scanning is disabled. If any kmemleaks are detected, they will be saved in the igt_runner results directory under kmemleak.txt. Additionally, this patch updates serialize_settings() and read_settings_from_file() to persist igt_runner settings across runs. This allows settings to be saved when running igt_runner --dry-run and later restored when executing igt_resume. The unit tests for igt_runner have been extended to verify: * Kmemleak scans are disabled by default * Kmemleak scans can be enabled via command-line arguments * The kmemleak setting is correctly saved to and restored from disk To test the new -k command-line option, this patch appends "--overwrite" to *argv[] in runner_test.c to expand the argument array. This approach avoids a major refactor of how *argv[] is defined across the file while keeping the changes isolated to unit testing. Since this only affects tests, there is no downstream impact. Cc: vitaly.prosyak@amd.com Cc: christian.koenig@amd.com Cc: alexander.deucher@amd.com Cc: jesse.zhang@amd.com Cc: harry.wentland@amd.com Cc: zbigniew.kempczynski@intel.com Cc: kamil.konieczny@linux.intel.com Cc: ryszard.knop@intel.com Cc: lucas.demarchi@intel.com Cc: katarzyna.piecielska@intel.com Reviewed-by:
Zbigniew Kempczyński <zbigniew.kempczynski@intel.com> Reviewed-by:
Jonathan Cavitt <jonathan.cavitt@intel.com> Reviewed-by:
Vitaly Prosyak <vitaly.prosyak@amd.com> Signed-off-by:
Peter Senna Tschudin <peter.senna@linux.intel.com>
-
Updates scripts/run-tests.sh to include the following options: -f: enable igt_facts on igt_runner -K <mode>: Linux Kernel kmemleak reports - once: run a kmemleak scan after all tests - each: run a kmemleak scan after each test These options are simply relayed to igt_runner. Cc: vitaly.prosyak@amd.com Cc: christian.koenig@amd.com Cc: alexander.deucher@amd.com Cc: jesse.zhang@amd.com Cc: harry.wentland@amd.com Cc: zbigniew.kempczynski@intel.com Cc: kamil.konieczny@linux.intel.com Cc: ryszard.knop@intel.com Cc: lucas.demarchi@intel.com Cc: katarzyna.piecielska@intel.com Reviewed-by:
Vitaly Prosyak <vitaly.prosyak@amd.com> Signed-off-by:
Peter Senna Tschudin <peter.senna@linux.intel.com>
Showing
- runner/executor.c 24 additions, 2 deletionsrunner/executor.c
- runner/kmemleak.c 277 additions, 0 deletionsrunner/kmemleak.c
- runner/kmemleak.h 16 additions, 0 deletionsrunner/kmemleak.h
- runner/meson.build 9 additions, 0 deletionsrunner/meson.build
- runner/runner_kmemleak_test.c 267 additions, 0 deletionsrunner/runner_kmemleak_test.c
- runner/runner_tests.c 12 additions, 1 deletionrunner/runner_tests.c
- runner/settings.c 30 additions, 1 deletionrunner/settings.c
- runner/settings.h 2 additions, 0 deletionsrunner/settings.h
- scripts/run-tests.sh 8 additions, 2 deletionsscripts/run-tests.sh
runner/kmemleak.c
0 → 100644
runner/kmemleak.h
0 → 100644
runner/runner_kmemleak_test.c
0 → 100644