2022-09-01 12:58:36

by Maxime Ripard

[permalink] [raw]
Subject: Re: [PATCH v2 2/2] drm/tests: Change "igt_" prefix to "test_drm_"

Hi,

On Thu, Sep 01, 2022 at 09:42:10AM -0300, Ma?ra Canal wrote:
> With the introduction of KUnit, IGT is no longer the only option to run
> the DRM unit tests, as the tests can be run through kunit-tool or on
> real hardware with CONFIG_KUNIT.
>
> Therefore, remove the "igt_" prefix from the tests and replace it with
> the "test_drm_" prefix, making the tests' names independent from the tool
> used.
>
> Signed-off-by: Ma?ra Canal <[email protected]>
>
> ---
> v1 -> v2: https://lore.kernel.org/dri-devel/[email protected]/
> - Change "drm_" prefix to "test_drm_", as "drm_" can be a bit confusing (Jani Nikula).

I appreciate it's a bit of a bikeshed but I disagree with this. The
majority of the kunit tests already out there start with the framework
name, including *all* the examples in the kunit doc. Plus, it's fairly
obvious that it's a test, kunit is only about running tests in the first
place.

Maxime


2022-09-01 13:34:40

by Javier Martinez Canillas

[permalink] [raw]
Subject: Re: [PATCH v2 2/2] drm/tests: Change "igt_" prefix to "test_drm_"

On 9/1/22 14:55, Maxime Ripard wrote:
> Hi,
>
> On Thu, Sep 01, 2022 at 09:42:10AM -0300, Maíra Canal wrote:
>> With the introduction of KUnit, IGT is no longer the only option to run
>> the DRM unit tests, as the tests can be run through kunit-tool or on
>> real hardware with CONFIG_KUNIT.
>>
>> Therefore, remove the "igt_" prefix from the tests and replace it with
>> the "test_drm_" prefix, making the tests' names independent from the tool
>> used.
>>
>> Signed-off-by: Maíra Canal <[email protected]>
>>
>> ---
>> v1 -> v2: https://lore.kernel.org/dri-devel/[email protected]/
>> - Change "drm_" prefix to "test_drm_", as "drm_" can be a bit confusing (Jani Nikula).
>
> I appreciate it's a bit of a bikeshed but I disagree with this. The
> majority of the kunit tests already out there start with the framework
> name, including *all* the examples in the kunit doc. Plus, it's fairly
> obvious that it's a test, kunit is only about running tests in the first
> place.
>

Agree with Maxime on this.

--
Best regards,

Javier Martinez Canillas
Core Platforms
Red Hat

2022-09-01 23:41:32

by Maira Canal

[permalink] [raw]
Subject: Re: [PATCH v2 2/2] drm/tests: Change "igt_" prefix to "test_drm_"

Hi Maxime,

On 9/1/22 09:55, Maxime Ripard wrote:
> Hi,
>
> On Thu, Sep 01, 2022 at 09:42:10AM -0300, Maíra Canal wrote:
>> With the introduction of KUnit, IGT is no longer the only option to run
>> the DRM unit tests, as the tests can be run through kunit-tool or on
>> real hardware with CONFIG_KUNIT.
>>
>> Therefore, remove the "igt_" prefix from the tests and replace it with
>> the "test_drm_" prefix, making the tests' names independent from the tool
>> used.
>>
>> Signed-off-by: Maíra Canal <[email protected]>
>>
>> ---
>> v1 -> v2: https://lore.kernel.org/dri-devel/[email protected]/
>> - Change "drm_" prefix to "test_drm_", as "drm_" can be a bit confusing (Jani Nikula).
>
> I appreciate it's a bit of a bikeshed but I disagree with this. The
> majority of the kunit tests already out there start with the framework
> name, including *all* the examples in the kunit doc. Plus, it's fairly
> obvious that it's a test, kunit is only about running tests in the first
> place.

Would it be better to keep it as "drm_"?

Currently, I don't think it is appropriate to hold the "igt_" prefix, as
the tests are not IGT exclusive, but I don't have a strong opinion on
using the "drm_" or the "test_drm" prefixes.

Best Regards,
- Maíra Canal

>
> Maxime
>

2022-09-02 08:12:08

by Jani Nikula

[permalink] [raw]
Subject: Re: [PATCH v2 2/2] drm/tests: Change "igt_" prefix to "test_drm_"

On Thu, 01 Sep 2022, Maíra Canal <[email protected]> wrote:
> Hi Maxime,
>
> On 9/1/22 09:55, Maxime Ripard wrote:
>> Hi,
>>
>> On Thu, Sep 01, 2022 at 09:42:10AM -0300, Maíra Canal wrote:
>>> With the introduction of KUnit, IGT is no longer the only option to run
>>> the DRM unit tests, as the tests can be run through kunit-tool or on
>>> real hardware with CONFIG_KUNIT.
>>>
>>> Therefore, remove the "igt_" prefix from the tests and replace it with
>>> the "test_drm_" prefix, making the tests' names independent from the tool
>>> used.
>>>
>>> Signed-off-by: Maíra Canal <[email protected]>
>>>
>>> ---
>>> v1 -> v2: https://lore.kernel.org/dri-devel/[email protected]/
>>> - Change "drm_" prefix to "test_drm_", as "drm_" can be a bit confusing (Jani Nikula).
>>
>> I appreciate it's a bit of a bikeshed but I disagree with this. The
>> majority of the kunit tests already out there start with the framework
>> name, including *all* the examples in the kunit doc. Plus, it's fairly
>> obvious that it's a test, kunit is only about running tests in the first
>> place.
>
> Would it be better to keep it as "drm_"?

That's not "keeping". That's renaming igt to drm.

> Currently, I don't think it is appropriate to hold the "igt_" prefix, as
> the tests are not IGT exclusive, but I don't have a strong opinion on
> using the "drm_" or the "test_drm" prefixes.

I repeat my stance that "drm_" alone is confusing. For the reason alone
that it pollutes the code tagging tools, mixing actual drm_ types and
functions with unit test functions.

BR,
Jani.



>
> Best Regards,
> - Maíra Canal
>
>>
>> Maxime
>>

--
Jani Nikula, Intel Open Source Graphics Center

2022-09-02 09:05:23

by Maxime Ripard

[permalink] [raw]
Subject: Re: [PATCH v2 2/2] drm/tests: Change "igt_" prefix to "test_drm_"

On Thu, Sep 01, 2022 at 07:33:18PM -0300, Ma?ra Canal wrote:
> Hi Maxime,
>
> On 9/1/22 09:55, Maxime Ripard wrote:
> > Hi,
> >
> > On Thu, Sep 01, 2022 at 09:42:10AM -0300, Ma?ra Canal wrote:
> >> With the introduction of KUnit, IGT is no longer the only option to run
> >> the DRM unit tests, as the tests can be run through kunit-tool or on
> >> real hardware with CONFIG_KUNIT.
> >>
> >> Therefore, remove the "igt_" prefix from the tests and replace it with
> >> the "test_drm_" prefix, making the tests' names independent from the tool
> >> used.
> >>
> >> Signed-off-by: Ma?ra Canal <[email protected]>
> >>
> >> ---
> >> v1 -> v2: https://lore.kernel.org/dri-devel/[email protected]/
> >> - Change "drm_" prefix to "test_drm_", as "drm_" can be a bit confusing (Jani Nikula).
> >
> > I appreciate it's a bit of a bikeshed but I disagree with this. The
> > majority of the kunit tests already out there start with the framework
> > name, including *all* the examples in the kunit doc. Plus, it's fairly
> > obvious that it's a test, kunit is only about running tests in the first
> > place.
>
> Would it be better to keep it as "drm_"?
>
> Currently, I don't think it is appropriate to hold the "igt_" prefix, as
> the tests are not IGT exclusive, but I don't have a strong opinion on
> using the "drm_" or the "test_drm" prefixes.

Yes, using drm as our prefix everywhere seems like a good idea :)

Maxime


Attachments:
(No filename) (1.45 kB)
signature.asc (235.00 B)
Download all attachments

2022-09-02 13:55:51

by Maxime Ripard

[permalink] [raw]
Subject: Re: [PATCH v2 2/2] drm/tests: Change "igt_" prefix to "test_drm_"

On Fri, Sep 02, 2022 at 11:04:14AM +0300, Jani Nikula wrote:
> On Thu, 01 Sep 2022, Ma?ra Canal <[email protected]> wrote:
> > Hi Maxime,
> >
> > On 9/1/22 09:55, Maxime Ripard wrote:
> >> Hi,
> >>
> >> On Thu, Sep 01, 2022 at 09:42:10AM -0300, Ma?ra Canal wrote:
> >>> With the introduction of KUnit, IGT is no longer the only option to run
> >>> the DRM unit tests, as the tests can be run through kunit-tool or on
> >>> real hardware with CONFIG_KUNIT.
> >>>
> >>> Therefore, remove the "igt_" prefix from the tests and replace it with
> >>> the "test_drm_" prefix, making the tests' names independent from the tool
> >>> used.
> >>>
> >>> Signed-off-by: Ma?ra Canal <[email protected]>
> >>>
> >>> ---
> >>> v1 -> v2: https://lore.kernel.org/dri-devel/[email protected]/
> >>> - Change "drm_" prefix to "test_drm_", as "drm_" can be a bit confusing (Jani Nikula).
> >>
> >> I appreciate it's a bit of a bikeshed but I disagree with this. The
> >> majority of the kunit tests already out there start with the framework
> >> name, including *all* the examples in the kunit doc. Plus, it's fairly
> >> obvious that it's a test, kunit is only about running tests in the first
> >> place.
> >
> > Would it be better to keep it as "drm_"?
>
> That's not "keeping". That's renaming igt to drm.

Well, there's like half the tests that are prefixed with drm, the other
with igt, so it's both really

> > Currently, I don't think it is appropriate to hold the "igt_" prefix, as
> > the tests are not IGT exclusive, but I don't have a strong opinion on
> > using the "drm_" or the "test_drm" prefixes.
>
> I repeat my stance that "drm_" alone is confusing.

What are you confusing it with?

> For the reason alone that it pollutes the code tagging tools, mixing
> actual drm_ types and functions with unit test functions.

I don't get it, I'm sorry. All these functions are static and not part
of any API, so I can't see how it would pollute a code tagging tool. Or
at least, not more than any driver does.

And we're part of a larger project here, it's about consistency with the
rest of the ecosystem.

Maxime


Attachments:
(No filename) (2.15 kB)
signature.asc (235.00 B)
Download all attachments