Skip to content
Snippets Groups Projects
  1. Nov 13, 2024
  2. Aug 21, 2024
    • Gustavo Sousa's avatar
      igt_hook: Add feature · bc35cf56
      Gustavo Sousa authored and Matt Roper's avatar Matt Roper committed
      
      For development purposes, sometimes it is useful to have a way of
      running custom scripts at certain points of test executions. A
      real-world example I bumped into recently is to collect information from
      sysfs before and after running each entry of a testlist.
      
      While it is possible for the user to handcraft a script that calls each
      test with the correct actions before and after execution, we can provide
      a better experience by adding built-in support for running hooks during
      test execution.
      
      That would be even better when adding the same kind of support for
      igt_runner (which is done in an upcoming change), since the user can
      also nicely resume with igt_resume with the hook already setup in case a
      crash happens during execution of the test list.
      
      As such provide implement support for hooks, integrate it into
      igt_core and expose the functionality via --hook CLI option on test
      executables.
      
      v2:
        - s/igt_hook_init/igt_hook_create/ (Lucas)
        - Use SPDX License Identifier instead of license text. (Lucas)
        - Do not rely on hard-coded length 3 when generating full test name.
          (Lucas)
        - Do not pollute current environment variables when running hooks.
          (Lucas)
        - Change hook string in run_tests_and_match_env() to use "printf"
          instead of "echo" to be compatible with CI environment.
      
      v3:
        - igt_hook_create() only errors out for invalid input.
        - Use igt_hook_free() instead of simply free() in the error path for
          common_init().
        - Go back to the simpler logic for calling hooks instead of using
          fork: setenv() calls followed by system().
        - Change igt_hook_create() to return error number and receive
          reference to destination pointer instead of the opposite. (Lucas)
        - Remove checks for non-existing negative return of igt_hook_create().
          (Lucas)
        - s/igt_hook_push_evt/igt_hook_event_notify/. (Lucas)
        - Simplify call sites for igt_hook_event_notify() by allowing argument
          to igt_hook to be NULL and using compount literals for the event
          struct. (Lucas)
        - Fix style for igt_hook_calc_test_fullname_size(). (Lucas)
      
      v4:
        - Remove needless parentheses. (Lucas)
      
      Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com> # v3
      Signed-off-by: default avatarGustavo Sousa <gustavo.sousa@intel.com>
      Link: https://lore.kernel.org/r/20240814204822.95283-2-gustavo.sousa@intel.com
      
      
      Signed-off-by: default avatarMatt Roper <matthew.d.roper@intel.com>
      bc35cf56
  3. Jul 03, 2024
  4. Jan 29, 2024
  5. Oct 10, 2023
  6. Sep 25, 2023
  7. Sep 15, 2023
  8. Sep 05, 2023
  9. Sep 01, 2023
  10. Aug 29, 2023
  11. Aug 18, 2023
  12. Aug 16, 2023
  13. Jul 11, 2023
  14. Jun 26, 2023
  15. May 26, 2023
  16. May 17, 2023
  17. May 15, 2023
  18. May 08, 2023
  19. Apr 27, 2023
  20. Apr 13, 2023
  21. Apr 04, 2023
  22. Apr 03, 2023
  23. Mar 29, 2023
  24. Mar 24, 2023
  25. Mar 13, 2023
  26. Jan 09, 2023
    • Mark Yacoub's avatar
      Chamelium: Split kms_chamelium into multiple kms_chamelium tests · 15562e12
      Mark Yacoub authored and Mark Yacoub's avatar Mark Yacoub committed
      
      [Why]
      kms_chamelium tests file has grown so much and became a bit big to
      manage.
      Splitting specific tests like we do for kms_ tests into separate files
      puts logically related functionalities into the same place so tests are
      more clear.
      
      [How]
      Split kms_chamelium into 4 different tests, each testing something
      specific. The tests are:
      1. kms_chamelium_audio
      2. kms_chamelium_edid
      3. kms_chamelium_frames
      4. kms_chamelium_hpd
      5. kms_chamelium_color which used to be kms_color_chamelium but renamed
         for consistency.
      
      All common code lives in kms_chamelium_helper and the function names
      have a chamelium_ prefix.
      
      Signed-off-by: default avatarMark Yacoub <markyacoub@chromium.org>
      Acked-by: default avatarPetri Latvala <petri.latvala@intel.com>
      15562e12
  27. Dec 09, 2022
Loading