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

Marius Vlad marius.c.vlad at intel.com
Wed Oct 26 13:54:38 UTC 2016


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 and procps in 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 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 (3):
  lib/{igt_sysfs,igt_aux}: Make available to other users kick_fbcon()
    (unbind_fbcon()), and added helpers to igt_aux
(module loading/unloading, pkill)
  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/igt_aux.c                         | 185 ++++++++++++++++
 lib/igt_aux.h                         |   6 +
 lib/igt_gvt.c                         |  43 +---
 lib/igt_sysfs.c                       |  54 +++++
 lib/igt_sysfs.h                       |   2 +
 tests/Makefile.am                     |   1 -
 tests/Makefile.sources                |   4 +-
 tests/drv_module_reload.c             | 394 ++++++++++++++++++++++++++++++++++
 tests/drv_module_reload_basic         | 105 ---------
 tests/gem_alive.c                     |  35 ---
 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 +++
 17 files changed, 804 insertions(+), 210 deletions(-)
 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