Return-Path: Received: from mail-ua1-x92b.google.com (mail-ua1-x92b.google.com [IPv6:2607:f8b0:4864:20::92b]) by gabe.freedesktop.org (Postfix) with ESMTPS id F02872BF9C for ; Fri, 12 Aug 2022 16:18:32 +0000 (UTC) Received: by mail-ua1-x92b.google.com with SMTP id 5so492227uay.5 for ; Fri, 12 Aug 2022 09:18:32 -0700 (PDT) From: Tales Aparecida To: Petri Latvala , igt-dev@lists.freedesktop.org, Chris Wilson Date: Fri, 12 Aug 2022 13:18:22 -0300 Message-Id: <20220812161826.4074-1-tales.aparecida@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [igt-dev] [PATCH i-g-t v2 0/4] add kselftest runner documentation List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: siqueirajordao@riseup.net, magalilemes00@gmail.com, tales.aparecida@gmail.com, Isabella Basso , andrealmeid@riseup.net, Trevor Woerner Errors-To: igt-dev-bounces@lists.freedesktop.org Sender: "igt-dev" List-ID: 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 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 . 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