From: Dean Marx <dmarx@iol.unh.edu>
To: Luca Vizzarro <luca.vizzarro@arm.com>
Cc: dev@dpdk.org, Paul Szczepanek <paul.szczepanek@arm.com>,
Patrick Robb <probb@iol.unh.edu>
Subject: Re: [PATCH v3 3/4] dts: add per-test-suite configuration
Date: Wed, 13 Nov 2024 16:44:28 -0500 [thread overview]
Message-ID: <CABD7UXOtVOtCbhXtPq5OXbuvcP5RjFR1OVMdcoBDKt0+qwuh=w@mail.gmail.com> (raw)
In-Reply-To: <20241108134532.130681-4-luca.vizzarro@arm.com>
[-- Attachment #1: Type: text/plain, Size: 2735 bytes --]
>
>
> On Fri, Nov 8, 2024 at 8:38 AM Luca Vizzarro <luca.vizzarro@arm.com>
> wrote:
>
>> Allow test suites to be configured individually. Moreover enable them to
>> implement their own custom configuration.
>>
>> This solution adds some new complexity to DTS, which is generated source
>> code. In order to ensure strong typing, the test suites and their custom
>> configurations need to be linked in the main configuration class.
>> Unfortunately, this is not feasible during runtime as it will incur in
>> circular dependencies. Generating the links appear to be the most
>> straightforward approach.
>>
>> This commit also brings a new major change to the configuration schema.
>> Test suites are no longer defined as a list of strings, like:
>>
>> test_suites:
>> - hello_world
>> - pmd_buffer_scatter
>>
>> but as mapping of mappings or strings:
>>
>> test_suites:
>> hello_world: {} # any custom fields or test cases can be set here
>> pmd_buffer_scatter: all # "all" defines all the test cases, or
>> # they can individually be set separated
>> # by a space
>>
>> Not defining the `test_cases` field in the configuration is equivalent
>> to `all`, therefore the definitions for either test suite above are
>> also equivalent.
>>
>> Creating the __init__.py file under the tests folder, allows it to be
>> picked up as a package. This is a mypy requirement to import the tests
>> from within the framework.
>>
>> Bugzilla ID: 1375
>>
>> Signed-off-by: Luca Vizzarro <luca.vizzarro@arm.com>
>> Reviewed-by: Paul Szczepanek <paul.szczepanek@arm.com>
>>
>
> I like the idea of mapping the suite to specific test cases, and for the
> most part the custom configuration option as well. The only thing that I
> feel should be different is the way the code generation is documented, I
> think it might be worth providing an example within conf.yaml through a
> comment near the suites section, rather than just in the dts.rst file. It
> might be a little more clear where to create the custom config class as
> well.
>
> <snip>
>
>> +class HelloWorldConfig(TestSuiteConfig):
>> + """Example custom configuration for the `TestHelloWorld` test
>> suite."""
>> +
>> + #: Timeout for the DPDK apps.
>> + timeout: int = 50
>> --
>> 2.43.0
>>
>>
> Additionally, I was a bit confused by the custom config examples, do these
> fields (timeout, my_custom_field) actually affect the suite in any way as
> of this patch? Or is this just so that we can potentially add configuration
> options through this method in the future?
>
> Reviewed-by: Dean Marx <dmarx@iol.unh.edu>
>
[-- Attachment #2: Type: text/html, Size: 3577 bytes --]
next prev parent reply other threads:[~2024-11-13 21:44 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-06 16:13 [PATCH] " Luca Vizzarro
2024-09-27 17:45 ` Jeremy Spewock
2024-11-08 13:38 ` [PATCH v2 0/4] " Luca Vizzarro
2024-11-08 13:38 ` [PATCH v2 1/4] dts: add tests package to API docs Luca Vizzarro
2024-11-08 13:38 ` [PATCH v2 2/4] dts: fix smoke tests docstring Luca Vizzarro
2024-11-12 20:03 ` Dean Marx
2024-11-08 13:38 ` [PATCH v2 3/4] dts: add per-test-suite configuration Luca Vizzarro
2024-11-08 13:38 ` [PATCH v2 4/4] dts: update autodoc sorting order Luca Vizzarro
2024-11-08 13:45 ` [PATCH v3 0/4] dts: add per-test-suite configuration Luca Vizzarro
2024-11-08 13:45 ` [PATCH v3 1/4] dts: add tests package to API docs Luca Vizzarro
2024-11-12 19:55 ` Dean Marx
2024-11-08 13:45 ` [PATCH v3 2/4] dts: fix smoke tests docstring Luca Vizzarro
2024-11-08 13:45 ` [PATCH v3 3/4] dts: add per-test-suite configuration Luca Vizzarro
2024-11-13 21:44 ` Dean Marx [this message]
2024-11-14 12:39 ` Luca Vizzarro
2024-11-08 13:45 ` [PATCH v3 4/4] dts: update autodoc sorting order Luca Vizzarro
2024-11-12 20:04 ` Dean Marx
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='CABD7UXOtVOtCbhXtPq5OXbuvcP5RjFR1OVMdcoBDKt0+qwuh=w@mail.gmail.com' \
--to=dmarx@iol.unh.edu \
--cc=dev@dpdk.org \
--cc=luca.vizzarro@arm.com \
--cc=paul.szczepanek@arm.com \
--cc=probb@iol.unh.edu \
/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;
as well as URLs for NNTP newsgroup(s).