[Intel-gfx] [PATCH i-g-t 0/4 v7] Convert sh scripts to C variants.
Marius Vlad
marius.c.vlad at intel.com
Thu Dec 1 12:23:54 UTC 2016
Latest changes include addressing comments from previous version and include
some notes about driver loading/unloading when using in combination to
drm_open_driver().
This series adds some library support to help converting sh scripts to C
version. Based on that I've converted drv_module_reload_basic and
kms_sysfs_edid_timing. Other tests should follow. drv_module_reload requires
the most boilerplate code.
The reason for so many changes is the fact that some code got moved so other
users can use it. Secondly wrappers around libkmod in lib/igt_kmod and procps
in lib/igt_aux. Thirdly drv_module_reload has embedded tools/gem_info and
tests/gem_exec_store in it, with minor modifications to allow running them as
subtests. Finally, C is more verbose than sh.
Changes since v6:
- addressed comments (Chris Wilson)
- document the fact that driver loading/unloading used in combination with
drm_open_driver() would fail
- print also opened fd from /dev/dri in case driver unloading fails
- minor changes to igt_lsof()
Changes since v5:
- new helper in lib/igt_aux to display info about opened files by processes
and a new function to show a list of loaded modules (Petri Latvala)
Changes since v4:
- rebased to include unbinding snd_hda_intel
- added igt_i915_driver_load/unload so it can used in lib/igt_gvt
and tests/drv_module_reload (Cris Wilson)
- do not hard fail when loading/reloading in lib/igt_gvt (Chris Wilson)
- remove subgroups in tests/drv_module_reload (Chris Wilson)
- make tests/kms_sysfs_edid_timing intel-agnostic when searching
for connectors and use igt_mean (Chris Wilson)
Changes since v3:
- lib/igt_kmod: added libkmod helpers into their own file. There seems to be
another user for it: lib/igt_gvt. Fixed a issue with lib/igt_gvt while at
it and converted to make use of lib/igt_kmod.
- lib/{igt_kmod, igt_aux}: Fixed gtk-doc documentation formatting (Daniel Vetter)
- tests/drv_module_reload: Re-worked reload() method by splitting into
load() and unload() and asserting more.
- replaced SW_FINISH with SET_CACHEING in tests/drv_module_reload (Chris Wilson)
Changes since v2:
- lib/igt_aux: Addressed comments from Chris Wilson
- tests/drv_module_reload: Passed incorrectly boolean instead of uint as flags to
igt_kmod_unload().
Changes since v1:
- lib/igt_aux: Addressed comments from Chris Wilson
- tests/drv_module_reload: Addressed comments from Chris Wilson and Petri Latvala
- tests/kms_sysfs_edid_timing: Addressed comments from Chris Wilson
- (Hopefully): Addressed comments from Jani Nikula.
Marius Vlad (4):
lib/igt_kmod: New library to support driver loading/unloading and
additional helpers.
lib/igt_gvt: Make use of libkmod helpers and fix reading gvt
parameter.
tests/drv_module_reload: Convert sh script to C version.
tests/kms_sysfs_edid_timing: Convert sh to C version.
configure.ac | 2 +
.../intel-gpu-tools/intel-gpu-tools-docs.xml | 1 +
lib/Makefile.am | 5 +-
lib/Makefile.sources | 2 +
lib/igt_aux.c | 260 ++++++++++++++++
lib/igt_aux.h | 3 +
lib/igt_gvt.c | 78 ++---
lib/igt_kmod.c | 328 ++++++++++++++++++++
lib/igt_kmod.h | 39 +++
lib/igt_sysfs.c | 106 +++++++
lib/igt_sysfs.h | 3 +
tests/Makefile.am | 1 -
tests/Makefile.sources | 4 +-
tests/drv_module_reload.c | 332 +++++++++++++++++++++
tests/drv_module_reload_basic | 111 -------
tests/gem_alive.c | 35 ---
tests/gvt_basic.c | 2 +-
tests/intel-ci/fast-feedback.testlist | 4 +-
tests/kms_sysfs_edid_timing | 25 --
tests/kms_sysfs_edid_timing.c | 97 ++++++
tools/Makefile.sources | 1 +
tools/intel_gem_info.c | 35 +++
22 files changed, 1238 insertions(+), 236 deletions(-)
create mode 100644 lib/igt_kmod.c
create mode 100644 lib/igt_kmod.h
create mode 100644 tests/drv_module_reload.c
delete mode 100755 tests/drv_module_reload_basic
delete mode 100644 tests/gem_alive.c
delete mode 100755 tests/kms_sysfs_edid_timing
create mode 100644 tests/kms_sysfs_edid_timing.c
create mode 100644 tools/intel_gem_info.c
--
2.7.4
More information about the Intel-gfx
mailing list