From: Mauro Carvalho Chehab <mauro.chehab@linux.intel.com>
To: igt-dev@lists.freedesktop.org
Subject: [igt-dev] [PATCH i-g-t 0/1] Add a script to document IGT tests
Date: Fri, 3 Feb 2023 09:26:49 +0100 [thread overview]
Message-ID: <20230203082650.2454081-1-mauro.chehab@linux.intel.com> (raw)
From: Mauro Carvalho Chehab <mchehab@kernel.org>
As the IGT and driver's code evolves, the meaning of the tests may
become unclear. The best way to avoid bitrot is to have in-code
documentation explaining what each test and subtest does.
This script adds support for in-code documentation placed on
a style similar to kernel-doc, e. g. it should parse test descriptions
like:
/**
* TEST: Check if new IGT test documentation logic functionality is working
* Category: Software build block
* Sub-category: documentation
* Coverered functionality: test documentation
* Test type: ReST generation
* Run type: IGT kunit test
* Issue: none
* Platforms: all
* Platform requirements: none
* Depends on: @igt@deadbeef@basic
* Requirements: Need at least a script to test it
* Description: Complete description of this test
*
* SUBTEST: foo
* Description: do foo things
* with description continuing on another line
*
* SUBTEST: bar
* Description: do bar things
* with description continuing on another line
*/
/**
* SUBTEST: test-%s-binds-%s-with-%ld-size
* Description: Test arg[2] arg[1] binds with arg[3] size
*
* arg[1]:
*
* @large: large
* something
* @mixed: mixed
* something
* @small: small
* something
*
* arg[2]:
*
* @binds: foo
* @misaligned-binds: misaligned
* @userptr-binds: userptr
* @userptr-misaligned-binds: userptr misaligned
*
* arg[3]: buffer size
* in Kb
*/
Please notice that I'm sending this script in advance, in order to
have some upstream review. Such script currently is capable of
describing igt tests and IGT subtests, with wildcard support.
It is not currently prepared to handle dynamic subtests, nor to
describe Kernel selftest/KUnit. For those, it is probably worth
to have the documentation inside the Kernel, to keep them as close
as possible to the actual code.
The end goal is to use such script to describe the test bench for
the new Xe driver, auto-generating documentation. The Xe IGT upstream
work can be seen at https://patchwork.freedesktop.org/series/112191/.
Mauro Carvalho Chehab (1):
scripts: add a parser to produce documentation from Kernel C file
metatags
scripts/igt-doc | 647 ++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 647 insertions(+)
create mode 100755 scripts/igt-doc
--
2.39.0
next reply other threads:[~2023-02-03 8:26 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-03 8:26 Mauro Carvalho Chehab [this message]
2023-02-03 8:26 ` [igt-dev] [PATCH i-g-t 1/1] scripts: add a parser to produce documentation from Kernel C file metatags Mauro Carvalho Chehab
[not found] ` <Y9ze++qjDfKudq0P@adrinael.net>
2023-02-03 11:13 ` Mauro Carvalho Chehab
[not found] ` <87tu02zxt2.fsf@intel.com>
2023-02-03 14:16 ` Mauro Carvalho Chehab
[not found] ` <874js311zb.fsf@intel.com>
2023-02-03 11:37 ` Mauro Carvalho Chehab
[not found] ` <87r0v6zxki.fsf@intel.com>
2023-02-03 14:45 ` Mauro Carvalho Chehab
[not found] ` <CAKMK7uFRQU2=2h4AD1VfVX4NEQzSrd_nODJF9XCLipzRurbQew@mail.gmail.com>
2023-02-03 11:47 ` Mauro Carvalho Chehab
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230203082650.2454081-1-mauro.chehab@linux.intel.com \
--to=mauro.chehab@linux.intel.com \
--cc=igt-dev@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox