[igt-dev] [PATCH i-g-t v2 0/4] add kselftest runner documentation

Tales Aparecida tales.aparecida at gmail.com
Fri Aug 12 16:18:22 UTC 2022


In the interest of making the code more accessible, add documentation
on structs and functions related to the kselftest.
As an extra, add instructions about writing documentation and fixes
igt_kselftest_begin() always returning zero.

Sorry about the resend, I missed the mailing list address earlier.

Changes from v1 (https://patchwork.freedesktop.org/series/106921/):

- Added R-b in the first patch

- Moved gtkdoc link above igt_require to match occurrence in text in
the 2nd patch

- Fix code style issues reported by Petri Latvala
<petri.latvala at intel.com> in the last patch

- In the third patch, instead of returning non-zero in the function
igt_kselftest_begin() from errors while opening /dev/kmsg, assert a
success and skip the whole kselftest on failures.
Suggested by Kamil Konieczny <kamil.konieczny at linux.intel.com>.

The expected output when failing to open kmsg is something like:
  igt_kmod-CRITICAL: Test assertion failure function igt_kselftest_begin, file ../lib/igt_kmod.c:936:
  igt_kmod-CRITICAL: Failed assertion: tst->kmsg >= 0
  igt_kmod-CRITICAL: Last errno: 2, No such file or directory
  igt_kmod-CRITICAL: file descriptor tst->kmsg failed

Tales Aparecida (4):
  lib/igt_kmod: fix trivial typos
  CONTRIBUTING: Add reference for GTKDoc
  lib/kselftests: Skip kselftest when opening kmsg fails
  lib/igt_kmod: add igt_kselftests documentation

 CONTRIBUTING.md |   7 +++
 lib/igt_kmod.c  | 120 +++++++++++++++++++++++++++++++++++++++++++++---
 lib/igt_kmod.h  |  20 +++++++-
 3 files changed, 140 insertions(+), 7 deletions(-)

-- 
2.37.1



More information about the igt-dev mailing list