xe/xe_module_load: add a test to load/unload Xe driver
Subsystems (2)
v2 cover xe/xe_module_load: add a test to load/unload Xe driver
From: Mauro Carvalho Chehab <[email protected]>
It is interesting to let IGT to unload/reload the Xe driver, as it can help CI to track track troubles.
Add support for it.
Test documentation:
==================
igt@xe_module_load
==================
:Category: Sofware building block
:File: tests/xe/xe_module_load.c
:Sub-category: driver
:Summary: Tests the xe module loading
:Test category: functionality test
igt@xe_module_load@force-load
=============================
:Description: Load the Xe driver passing ``force_probe=*`` parameter :Run type: BAT
igt@xe_module_load@load
=======================
:Description: Load the Xe driver
:Run type: FULL
igt@xe_module_load@unload
=========================
:Description: Unload the Xe driver
:Run type: FULL
igt@xe_module_load@reload
=========================
:Description: Reload the Xe driver
:Run type: FULL
igt@xe_module_load@reload-no-display
====================================
:Description: Reload the Xe driver passing ``enable_display=0`` parameter :Run type: FULL
igt@xe_module_load@many-reload
==============================
:Description: Reload the Xe driver many times :Run type: FULL
---
v2:
- added a patch (already submitted) to shut-up i915 trybot to try to run those tests when i915 driver is loaded;
- removed duplication of the unwanted drivers array and declare it as const with const strings;
- reordered includes and removed a duplication;
- did some cosmetic changes.
Mauro Carvalho Chehab (3):
intel-ci: update blacklists to work with the Xe driver lib/igt_kmod: add support for Xe driver xe/xe_module_load: add a test to load/unload Xe driver
lib/igt_kmod.c | 34 ++--- lib/igt_kmod.h | 32 ++++- tests/intel-ci/blacklist.txt | 130 +------------------ tests/intel-ci/i915-blacklist.txt | 133 +++++++++++++++++++ tests/intel-ci/xe-blacklist.txt | 21 +++ tests/intel-ci/xe-fast-feedback.testlist | 3 + tests/meson.build | 1 + tests/xe/xe_module_load.c | 158 +++++++++++++++++++++++ 8 files changed, 363 insertions(+), 149 deletions(-) mode change 100644 => 120000 tests/intel-ci/blacklist.txt create mode 100644 tests/intel-ci/i915-blacklist.txt create mode 100644 tests/intel-ci/xe-blacklist.txt create mode 100644 tests/xe/xe_module_load.c
Signature · 1 line
2.39.2
PATCH v2 1/3 intel-ci: update blacklists to work with the Xe driver
From: Mauro Carvalho Chehab <[email protected]>
It doesn't make sense to run i915 tests with Xe driver and vice-versa. Update testlists to make it clear.
In order to avoid disrupts at exiting intel-ci tests, keep a symlink:
i915-blacklist.txt -> blacklist.txt
--- tests/intel-ci/blacklist.txt | 130 +---------------------------- tests/intel-ci/i915-blacklist.txt | 133 ++++++++++++++++++++++++++++++ tests/intel-ci/xe-blacklist.txt | 21 +++++ 3 files changed, 155 insertions(+), 129 deletions(-) mode change 100644 => 120000 tests/intel-ci/blacklist.txt create mode 100644 tests/intel-ci/i915-blacklist.txt create mode 100644 tests/intel-ci/xe-blacklist.txt
tests/intel-ci/blacklist.txt deleted +0 -129
@@ -1,129 +0,0 @@ -igt@meta_test(@.*)? -############################################### -# Handle module reloads with great care! -# -# Reloading a module is more likely to leave -# the machine in an unexpected state than other -# self-contained tests, leading to random -# failures in tests run afterwards. -############################################### -#igt@i915_module_load(@.*)? # danger, danger; hope for taints! -igt@i915_pm_rpm@module-reload -igt@i915_pm_rpm@gem-execbuf-stress-extra-wait -############################################### -# GEM -############################################### -igt@gem_busy@hang.* -igt@gem_close_race@(?!.*basic).* -igt@gem_concurrent_blit(@.*)? -igt@gem_ctx_create@(?!.*basic).* -igt@gem_ctx_exec@(?!.*basic).* -igt@gem_ctx_shared@*exhaust* -igt@gem_ctx_switch(@.*)? -igt@gem_evict_alignment(@.*)? -igt@gem_evict_everything(@.*)? -igt@gem_exec_big@(?!.*single).* -igt@gem_exec_capture@many-(?!4K-).* -igt@gem_exec_fair@(?!.*basic).* -igt@gem_exec_fence@.*hang.* -igt@gem_exec_flush@(?!.*basic).* -igt@gem_exec_latency(@.*)? -igt@gem_exec_lut_handle(@.*)? -igt@gem_exec_nop@(?!.*basic).* -igt@gem_exec_reloc@(?!.*basic).* -igt@gem_exec_suspend@(?!.*basic).* -igt@gem_exec_whisper@(?!basic).* -igt@gem_fd_exhaustion(@.*)? -igt@gem_fence_upload(@.*)? -igt@gem_gtt_hog(@.*)? -igt@gem_gtt_speed(@.*)? -igt@gem_lut_handle(@.*)? -igt@gem_mmap_gtt@.*(huge|swap|clflush|forked).* -igt@gem_mmap@.*(swap|huge).* -igt@gem_pread_after_blit(@.*)? -igt@gem_pwrite@(?!.*basic).* -igt@gem_read_read_speed(@.*)? -igt@gem_render_linear_blits@(?!.*basic).* -igt@gem_render_tiled_blits@(?!.*basic).* -igt@gem_reset_stats(@.*)? -igt@gem_ringfill@(?!.*basic).* -igt@gem_shrink@(?!reclaim$).* -igt@gem_softpin@.*(hang|S4).* -igt@gem_streaming_writes(@.*)? -igt@gem_sync@(?!.*basic).* -igt@gem_tiled_swapping@(?!non-threaded).* -igt@gem_userptr_blits@(major|minor|forked|mlocked|swapping).* -igt@gem_wait@hang.* -igt@gem_watchdog@far-fence -igt@sysfs_heartbeat_interval@(long|off) -igt@sysfs_preempt_timeout@off -igt@sysfs_timeslice_duration@off -############################################### -# GEM: Not worth fixing -############################################### -igt@gen7_exec_parse@.*lri.* -igt@gem_exec_alignment@pi-shared -############################################### -# There are no DRRS capable displays in CI lab -############################################### -igt@kms_frontbuffer_tracking@.*drrs.* -############################################### -# Tends to generate invalid configurations -# using CCS planes or configurations that -# exceed HW capabilities resulting in sporadic -# failure with -EINVAL. -# -# Maintaining extra constraints for Intel's HW -# is too costly in comparison to the value -# provided. -############################################### -igt@kms_chamelium_frames@hdmi-.*-planes-random -############################################### -# Broadcom -############################################### -igt@vc4_.* -igt@v3d_.* -############################################### -# AMD -############################################### -igt@amdgpu/.* -############################################### -# Panfrost -############################################### -igt@panfrost_.* -############################################### -# Qualcomm -############################################### -igt@msm_.* -############################################### -# Hibernate: not configured correctly on CI -############################################### -igt@.*@.*-hibernate -igt@gem_softpin@noreloc-s4 -igt@gem_workarounds@hibernate-.* -igt@gem_exec_suspend@basic-s4$ -igt@gem_ctx_isolation@.*-s4 -############################################### -# Out-of-memory: spammy and often broken -############################################### -igt@i915_suspend@shrink -############################################### -# pipe-e, pipe-f no current HW support -############################################### -igt@.*@.*pipe-e($|-.*) -igt@.*@.*pipe-f($|-.*) - -############################################### -# Temporary workarounds for CI-impacting bugs -############################################### - -# Currently fails and leaves the machine in a very bad state, and -# causes coverage loss for other tests. IOMMU related. -# https://gitlab.freedesktop.org/drm/intel/-/issues/2644 -igt@core_hotunplug@.*(hot|plug).* - -# hangs several gens of hosts, and has no immediate fix -igt@device_reset@reset-bound - -# not working for i915 -igt@kms_bw@.*
tests/intel-ci/blacklist.txt new file +1 -0
@@ -0,0 +1 @@ +i915-blacklist.txt
tests/intel-ci/i915-blacklist.txt new file +133 -0
133 lines not on this page · raw message
tests/intel-ci/xe-blacklist.txt new file +21 -0
@@ -0,0 +1,21 @@ +############################################### +# Broadcom +############################################### +igt@vc4_.* +igt@v3d_.* +############################################### +# Intel i915 +############################################### +igt@i915/.* +############################################### +# AMD +############################################### +igt@amdgpu/.* +############################################### +# Panfrost +############################################### +igt@panfrost_.* +############################################### +# Qualcomm +############################################### +igt@msm_.*
Signature · 1 line
2.39.2
PATCH v2 2/3 lib/igt_kmod: add support for Xe driver
In reply to Mauro Carvalho ChehabFrom: Mauro Carvalho Chehab <[email protected]>
Change the kmod logic to also work with the Xe driver.
--- lib/igt_kmod.c | 34 +++++++++++++++++----------------- lib/igt_kmod.h | 32 +++++++++++++++++++++++++++++--- 2 files changed, 46 insertions(+), 20 deletions(-)
lib/igt_kmod.c +17 -17
@@ -404,23 +404,23 @@ static void *strdup_realloc(char *origptr, const char *strdata) }/** -* igt_i915_driver_load: -* @opts: options to pass to i915 driver +* igt_intel_driver_load: +* @opts: options to pass to Intel driver * -* Loads the i915 driver and its dependencies. +* Loads an Intel driver and its dependencies. * */ int -igt_i915_driver_load (const char *opts) +igt_intel_driver_load (const char *opts,const char *driver) {int ret;if (opts) -igt_info ("Reloading i915 with %s\n\n" , opts); +igt_info ("Reloading %s with %s\n\n" , driver, opts); - ret =igt_kmod_load ("i915" , opts); + ret =igt_kmod_load (driver, opts);if (ret) { -igt_debug ("Could not load i915\n" ); +igt_debug ("Could not load %s\n" , driver);return ret; }
@@ -496,7 +496,7 @@ int igt_audio_driver_unload(char **who)return igt_always_unload_audio_driver (who); } -int __igt_i915_driver_unload (char **who) +int __igt_intel_driver_unload (char **who,const char *driver) {int ret;
@@ -530,11 +530,11 @@ int __igt_i915_driver_unload(char **who) } } -if (igt_kmod_is_loaded ("i915" )) { - ret =igt_kmod_unload ("i915" ,0 ); +if (igt_kmod_is_loaded (driver)) { + ret =igt_kmod_unload (driver,0 );if (ret) {if (who) - *who =strdup_realloc (*who,"i915" ); + *who =strdup_realloc (*who, driver);return ret; }
@@ -544,18 +544,18 @@ int __igt_i915_driver_unload(char **who) }/** -* igt_i915_driver_unload: +* igt_intel_driver_unload: * -* Unloads the i915 driver and its dependencies. +* Unloads an Intel driver and its dependencies. * */ int -igt_i915_driver_unload (void ) +igt_intel_driver_unload (const char *driver) {char *who =NULL ;int ret; - ret =__igt_i915_driver_unload (&who); + ret =__igt_intel_driver_unload (&who, driver);if (ret) {igt_warn ("Could not unload %s\n" , who);igt_kmod_list_loaded ();
@@ -572,8 +572,8 @@ igt_i915_driver_unload(void)igt_kmod_unload ("drm_kms_helper" ,0 );igt_kmod_unload ("drm" ,0 ); -if (igt_kmod_is_loaded ("i915" )) { -igt_warn ("i915.ko still loaded!\n" ); +if (igt_kmod_is_loaded ("driver" )) { +igt_warn ("%s.ko still loaded!\n" , driver);return -EBUSY ; }
lib/igt_kmod.h +29 -3
@@ -38,9 +38,35 @@ int igt_kmod_unload(const char *mod_name, unsigned int flags);int igt_audio_driver_unload (char **whom); -int igt_i915_driver_load (const char *opts); -int igt_i915_driver_unload (void ); -int __igt_i915_driver_unload (char **whom); +int igt_intel_driver_load (const char *opts,const char *driver); +int igt_intel_driver_unload (const char *driver); +int __igt_intel_driver_unload (char **who,const char *driver); + +static inline int igt_i915_driver_load (const char *opts) +{ +return igt_intel_driver_load (opts,"i915" ); +} + +static inline int igt_i915_driver_unload (void ) +{ +return igt_intel_driver_unload ("i915" ); +} + +static inline int __igt_i915_driver_unload (char **whom) +{ +return __igt_intel_driver_unload (whom,"i915" ); +}; + +static inline int igt_xe_driver_load (const char *opts) +{ +return igt_intel_driver_load (opts,"xe" ); +} + + +static inline int igt_xe_driver_unload (void ) +{ +return igt_intel_driver_unload ("xe" ); +}int igt_amdgpu_driver_load (const char *opts);int igt_amdgpu_driver_unload (void );
Signature · 1 line
2.39.2
PATCH v2 3/3 xe/xe_module_load: add a test to load/unload Xe driver
In reply to Mauro Carvalho ChehabFrom: Mauro Carvalho Chehab <[email protected]>
This is helpful to allow IGT to check if there are issues during module load/unload.
--- tests/intel-ci/xe-fast-feedback.testlist | 3 + tests/meson.build | 1 + tests/xe/xe_module_load.c | 158 +++++++++++++++++++++++ 3 files changed, 162 insertions(+) create mode 100644 tests/xe/xe_module_load.c
tests/intel-ci/xe-fast-feedback.testlist +3 -0
@@ -1,3 +1,6 @@ +# Should be the first test +igt@xe_module_load@force-load + igt@xe_compute@compute-square igt@xe_debugfs@base igt@xe_debugfs@gt
tests/meson.build +1 -0
@@ -256,6 +256,7 @@ xe_progs = [ 'xe_huc_copy', 'xe_mmap', 'xe_mmio', + 'xe_module_load', 'xe_pm', 'xe_prime_self_import', 'xe_query',
tests/xe/xe_module_load.c new file +158 -0
158 lines not on this page · raw message
Signature · 1 line
2.39.2
Patchwork
CI[igt-dev] ✗ Fi.CI.BUILD: failure for xe/xe_module_load: add a test to load/unload Xe driver
In reply to Mauro Carvalho Chehab== Series Details ==
== Series Details ==
Series: xe/xe_module_load: add a test to load/unload Xe driver
URL : https://patchwork.freedesktop.org/series/115511/
State : failure
== Summary ==
Applying: intel-ci: update blacklists to work with the Xe driver
Applying: lib/igt_kmod: add support for Xe driver
Applying: xe/xe_module_load: add a test to load/unload Xe driver Using index info to reconstruct a base tree...
M tests/meson.build
Falling back to patching base and 3-way merge...
Auto-merging tests/meson.build
CONFLICT (content): Merge conflict in tests/meson.build
Patch failed at 0003 xe/xe_module_load: add a test to load/unload Xe driver When you have resolved this problem, run "git am --continue". If you prefer to skip this patch, run "git am --skip" instead. To restore the original branch and stop patching, run "git am --abort".