[Intel-gfx] [PATCH i-g-t 0/4 v4] Convert sh scripts to C variants.

Marius Vlad marius.c.vlad at intel.com
Fri Oct 28 09:31:25 UTC 2016


TL;DR changes since last version: Use lib/igt_kmod so other users can
make use of it (specifically found that lib/igt_gvt, and covert it).

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 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_sysfs,igt_aux}: Make available to other users kick_fbcon()   
     (unbind_fbcon()), and added helpers to lib/igt_aux, lib/igt_kmod.
  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 +
 lib/Makefile.am                       |   2 +
 lib/Makefile.sources                  |   2 +
 lib/igt_aux.c                         |  40 ++++
 lib/igt_aux.h                         |   2 +
 lib/igt_gvt.c                         |  79 +++----
 lib/igt_kmod.c                        | 164 ++++++++++++++
 lib/igt_kmod.h                        |  35 +++
 lib/igt_sysfs.c                       |  54 +++++
 lib/igt_sysfs.h                       |   2 +
 tests/Makefile.am                     |   1 -
 tests/Makefile.sources                |   4 +-
 tests/drv_module_reload.c             | 415 ++++++++++++++++++++++++++++++++++
 tests/drv_module_reload_basic         | 105 ---------
 tests/gem_alive.c                     |  35 ---
 tests/gvt_basic.c                     |   2 +-
 tests/intel-ci/fast-feedback.testlist |  13 +-
 tests/kms_sysfs_edid_timing           |  25 --
 tests/kms_sysfs_edid_timing.c         | 107 +++++++++
 tools/Makefile.sources                |   1 +
 tools/intel_gem_info.c                |  35 +++
 21 files changed, 910 insertions(+), 215 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