Skip to content
Snippets Groups Projects
  • Peter Senna Tschudin's avatar
    f42d48f1
    runner/executor: Integrate igt_kmemleak scans · f42d48f1
    Peter Senna Tschudin authored and Kamil Konieczny's avatar Kamil Konieczny committed
    
    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: default avatarZbigniew Kempczyński <zbigniew.kempczynski@intel.com>
    Reviewed-by: default avatarJonathan Cavitt <jonathan.cavitt@intel.com>
    Reviewed-by: default avatarVitaly Prosyak <vitaly.prosyak@amd.com>
    Signed-off-by: default avatarPeter Senna Tschudin <peter.senna@linux.intel.com>
    f42d48f1
    History
    runner/executor: Integrate igt_kmemleak scans
    Peter Senna Tschudin authored and Kamil Konieczny's avatar Kamil Konieczny committed
    
    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: default avatarZbigniew Kempczyński <zbigniew.kempczynski@intel.com>
    Reviewed-by: default avatarJonathan Cavitt <jonathan.cavitt@intel.com>
    Reviewed-by: default avatarVitaly Prosyak <vitaly.prosyak@amd.com>
    Signed-off-by: default avatarPeter Senna Tschudin <peter.senna@linux.intel.com>
settings.h 3.76 KiB