Skip to content
Snippets Groups Projects
  1. Mar 10, 2025
    • Kamil Konieczny's avatar
      runner: Parse results harder · a7465d37
      Kamil Konieczny authored
      Sometimes an error happens in kernel or in test that leaves
      output files in corrupted or incorrect state. While runner or
      resume will just move on to executing next test, when generating
      results it could end up with no results.json
      
        Try processing outputs a little more persistently and use any
      output file left there, even if only dmesg.txt. Also, when no
      useful output files were present, instead of breaking out add
      notrun.
      
        Inform about processing results for each test so a problem
      could be spotted more easily.
      
      v2: removed ')' from 'notrun\n)' (Kamil)
       using bool var, added more prints about errors (Ryszard)
      v3: reused open_for_reading, removed bool var (Krzysztof)
       closing only positive fds[] in close_outputs(), checking
       file sizes also if all opens succeeded (Kamil)
      v4: reverting to v2 and addresing review comments (Krzysztof)
       closing only already opened file, drop early return when empty
       output files as this changes run status (Kamil)
      v5: reverting to returning fals...
      a7465d37
    • Peter Senna Tschudin's avatar
      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
    • Peter Senna Tschudin's avatar
      runner/kmemleak: library to interact with kmemleak · 8cbefa9f
      Peter Senna Tschudin authored and Kamil Konieczny's avatar Kamil Konieczny committed
      
      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: 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>
      Reviewed-by: default avatarKamil Konieczny <kamil.konieczny@linux.intel.com>
      8cbefa9f
  2. Feb 20, 2025
    • Peter Senna Tschudin's avatar
      runner: Bump network ping deadline to 40 seconds · 5b7b3fb7
      Peter Senna Tschudin authored and Kamil Konieczny's avatar Kamil Konieczny committed
      
      Commit ddfde25f ("runner: Add support for aborting on
      network failure") introduced a 20 second deadline for the DUTs
      network to recover after a suspend/resume cycle. If the network
      isn't back up within that time, igt_runner aborts the test run
      to save logs and prevent potential log loss from an imminent
      power cycle.
      
      External monitoring machine checks DUTs health and if it cannot
      reach it over network for 60 seconds it will reboot DUT.
      
      Although our CI system can be configured with a longer wait
      time, extending it further would unnecessarily prolong tests in
      cases of DUT hangs.
      
      Bump the deadline to 40 seconds to prevent a premature igt_runner
      abort.
      
      Cc: Katarzyna Piecielska <katarzyna.piecielska@intel.com>
      Cc: Ewelina Musial <ewelina.musial@intel.com>
      Cc: Mateusz Grabski <mateusz.grabski@intel.com>
      Cc: Konrad Brodzik <konrad.b.brodzik@intel.com>
      Cc: Kamil Konieczny <kamil.konieczny@linux.intel.com>
      Signed-off-by: default avatarPeter Senna Tschudin <peter.senna@linux.intel.com>
      Acked-by: default avatarRyszard Knop <ryszard.knop@intel.com>
      5b7b3fb7
  3. Feb 10, 2025
  4. Dec 20, 2024
    • Peter Senna Tschudin's avatar
      runner/executor: Integrate igt_facts functionality · ecb43515
      Peter Senna Tschudin authored and Kamil Konieczny's avatar Kamil Konieczny committed
      
      Modifies igt_runner to include calls to igt_facts() before the
      execution of each test and after the final test concludes. Facts are
      disabled by default, so add command line options to igt_runner to
      enable facts:  -f, --facts
      
      Updates serialize_settings() and read_settings_from_file() to save
      and restore igt_runner settings to and from disk. This is used when
      calling igt_runner with '--dry-run' and then by calling igt_resume
      instead of igt_runner.
      
      Updates unit testing for igt_runner to test that:
       - Facts are disabled by default
       - Facts can be enabled by command line arguments
       - The choice about facts being enabled or not is saved to disk
         and restored from disk
      
      CC: Helen Koike <helen.koike@collabora.com>
      CC: Jani Nikula <jani.nikula@linux.intel.com>
      CC: Jani Saarinen <jani.saarinen@intel.com>
      CC: Janusz Krzysztofik <janusz.krzysztofik@linux.intel.com>
      CC: Juha-Pekka Heikkila <juha-pekka.heikkila@intel.com>
      CC: Kamil Konieczny <kamil.konieczny@linux.intel.com>
      CC: Lucas De Marchi <lucas.demarchi@intel.com>
      CC: Maíra Canal <mcanal@igalia.com>
      CC: Melissa Wen <mwen@igalia.com>
      CC: Petri Latvala <adrinael@adrinael.net>
      CC: Rob Clark <robdclark@chromium.org>
      CC: Ryszard Knop <ryszard.knop@intel.com>
      CC: Swati Sharma <swati2.sharma@intel.com>
      CC: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
      CC: dominik.karol.piatkowski@intel.com
      CC: himal.prasad.ghimiray@intel.com
      CC: katarzyna.piecielska@intel.com
      CC: luciano.coelho@intel.com
      CC: nirmoy.das@intel.com
      CC: stuart.summers@intel.com
      Reviewed-by: default avatarZbigniew Kempczyński <zbigniew.kempczynski@intel.com>
      Reviewed-by: default avatarRyszard Knop <ryszard.knop@intel.com>
      Reviewed-by: default avatarDominik Karol Piątkowski <dominik.karol.piatkowski@intel.com>
      Signed-off-by: default avatarPeter Senna Tschudin <peter.senna@linux.intel.com>
      ecb43515
  5. Dec 05, 2024
  6. Sep 05, 2024
  7. Aug 21, 2024
  8. May 17, 2024
    • Gustavo Sousa's avatar
      runner: Remove useless null check for delim in job_list_from_test_list · 29b73dda
      Gustavo Sousa authored and Matt Roper's avatar Matt Roper committed
      
      The function job_list_from_test_list() uses a while loop to read entries
      from the testlist.
      
      The condition ((delim = strchr(binary, '@')) != NULL) checks if the
      current entry specifies a subtest. When no subtest is specified, the
      else clause will cause a jump to the next iteration. That means that we
      are certain any statement executed after that if block has (delim !=
      NULL). As such, all null checks on that variable after that point are
      pointless.
      
      In fact, certain unnecessary null checks might even cause confusion to
      readers. One example is the block meant to display the "Unexpected test
      without subtests ..." message: it would never happen, since that
      condition is handled earlier in the iteration (i.e. the full set of
      subtests is expanded for that entry in the else clause previously
      mentioned). The following execution (done before this change)
      illustrates that:
      
          $ cat <<EOF > /tmp/foo.testlist
          igt@xe_pm@s2idle-basic
          igt@xe_pm
          igt@xe_pm@s2idle-exec-after
          EOF
      
          $ ./build/runner/igt_runner -d -m --test-list /tmp/foo.testlist build/tests /tmp/results
          [36408.109043] Dry run, not executing. Invoke igt_resume if you want to execute.
          Done.
      
          $ cat /tmp/results/joblist.txt | sed 's/^\(.\{50\}\).\+/\1.../'
          xe_pm s2idle-basic
          xe_pm s2idle-basic,s2idle-basic-exec,s2idle-exec-a...
          xe_pm s2idle-exec-after
      
      Let's remove those unnecessary checks.
      
      Signed-off-by: default avatarGustavo Sousa <gustavo.sousa@intel.com>
      Reviewed-by: default avatarNgai-Mint Kwan <ngai-mint.kwan@linux.intel.com>
      Link: https://lore.kernel.org/r/20240430211934.349775-2-gustavo.sousa@intel.com
      
      
      Signed-off-by: default avatarMatt Roper <matthew.d.roper@intel.com>
      29b73dda
  9. May 07, 2024
  10. Dec 06, 2023
  11. Oct 30, 2023
  12. Jun 09, 2023
  13. Apr 28, 2023
  14. Apr 25, 2023
  15. Apr 03, 2023
  16. Mar 09, 2023
  17. Mar 08, 2023
  18. Jan 27, 2023
    • Petri Latvala's avatar
      runner: Use 'abort' as result if a test caused an abort · deb0f27c
      Petri Latvala authored
      
      If a test caused an abort condition to trigger, a pseudoresult
      "igt@runner@aborted" would be generated, detailing which test caused
      the condition. That was implemented in a simpler world where there
      were no dynamic subtests and CI systems (i915-CI in particular) didn't
      have much test resuming happening.
      
      The generated pseudoresult was completely unable to point to a
      particular dynamic subtest if the executed subtest had any, and there
      could inherently be only one of them. When combined with the fact that
      the pseudoresult doesn't have logs that could be used to automatically
      point to particular bug reports, that made results filtering by
      CIBugLog difficult.
      
      With socket communications it's easier to inject information "in
      between" test's logs and result overriding is designed into the
      system. Thus, when using socket communications, this patch series will
      make the abort-condition-causing test's result 'abort' instead of
      using that pseudoresult.
      
      The flow becomes a little bit messier with monitor_output() gaining
      more and more out-parameters but those can be cleaned later.
      
      v2: Handle abort conditions between dynamic subtests
      
      Signed-off-by: default avatarPetri Latvala <petri.latvala@intel.com>
      Cc: Arkadiusz Hiler <arek@hiler.eu>
      Cc: Kamil Konieczny <kamil.konieczny@linux.intel.com>
      Acked-by: default avatarKamil Konieczny <kamil.konieczny@linux.intel.com>
      deb0f27c
Loading