[PATCH v7 0/4] test/intel/xe_sysfs: Restore sysfs params correctly

Jonathan Cavitt jonathan.cavitt at intel.com
Mon Nov 18 18:05:07 UTC 2024


The xe_sysfs_timeslice_duration, xe_sysfs_preempt_timeout, and
xe_sysfs_scheduler tests do not correctly restore modified sysfs params on
test failure.
Additionally, xe_sysfs_timeslice_duration modifies but does not restore
preempt_timeout_us.
Finally, while xe_sysfs_scheduler does attempt to restore all modified
sysfs params at the end of the tests, no guarantee is made that the
restorations are successful.
Repair these issues.

v3: Fix several formatting issues (Kamil)

v4: Do not compare possibly unassigned variable (Kamil)
    Whitespace and commit name fixes (Kamil)

v5: Add new helper funciton, igt_sysfs_get_next_engine
    Fix igt_sysfs_scanf/printf usage in tests (Kamil)

v6: Replace helper function igt_sysfs_get_next_engine with new helper
    functions that return and destroy engine lists (Kamil)

v7: Also fix xe_sysfs_scheduler

Jonathan Cavitt (4):
  lib/igt_sysfs: Add engine list helpers
  tests/intel/xe_sysfs*: Restore values on test failure
  tests/intel/xe_sysfs_timeslice_duration: Restore preempt timeout
  tests/intel/xe_sysfs_scheduler: Assert sysfs params are restored

 lib/igt_sysfs.c                           | 54 +++++++++++++++
 lib/igt_sysfs.h                           |  3 +
 tests/intel/xe_sysfs_preempt_timeout.c    | 58 +++++++++++++---
 tests/intel/xe_sysfs_scheduler.c          | 82 ++++++++++++++++++++---
 tests/intel/xe_sysfs_timeslice_duration.c | 74 +++++++++++++++++---
 5 files changed, 241 insertions(+), 30 deletions(-)

-- 
2.43.0



More information about the igt-dev mailing list