From: Helen Koike <helen.koike@collabora.com>
To: "Kamil Konieczny" <kamil.konieczny@linux.intel.com>,
igt-dev@lists.freedesktop.org, "Rob Clark" <robdclark@gmail.com>,
"Emma Anholt" <emma@anholt.net>,
"Daniel Stone" <daniel@fooishbar.org>,
"Rob Clark" <robdclark@chromium.org>,
"Zbigniew Kempczyński" <zbigniew.kempczynski@intel.com>
Subject: Re: [igt-dev] [PATCH v4] core_getversion: Test for desired device
Date: Fri, 29 Sep 2023 11:45:45 -0300 [thread overview]
Message-ID: <4c354881-d263-69a5-78ba-ca32a687e302@collabora.com> (raw)
In-Reply-To: <20230929093459.4dhd3tk35q6u2yd2@kamilkon-desk.igk.intel.com>
On 29/09/2023 06:34, Kamil Konieczny wrote:
> Hi Rob,
>
> On 2023-09-28 at 14:05:27 -0700, Rob Clark wrote:
>> From: Rob Clark <robdclark@chromium.org>
>>
>> We discovered in drm/ci that if the drm device fails to probe, all the
>> tests come back as "Skip" and the job is considered successful. Fix
>> the getversion test to fail if there is no drm device or if the drm
>> device does not match the expected device as specified by the optional
>> IGT_REQUIRED_DRIVER environment variable.
> ----- ^^^^^^^^
> FORCE
>
>>
>> Signed-off-by: Rob Clark <robdclark@chromium.org>
>> Acked-by: Helen Koike <helen.koike@collabora.com>
>> Reviewed-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
>> ---
>> I dropped the previous two lib/drmtest patches, as they are no longer
>> strictly required. I think they are still nice-to-have, but they are
>> unchanged since the previous version so it didn't seem useful to re-
>> send them.
>>
>> tests/core_getversion.c | 9 ++++++++-
>> 1 file changed, 8 insertions(+), 1 deletion(-)
>>
>> diff --git a/tests/core_getversion.c b/tests/core_getversion.c
>> index 32cb976e4923..8c8e0c9a3e5e 100644
>> --- a/tests/core_getversion.c
>> +++ b/tests/core_getversion.c
>> @@ -48,14 +48,21 @@ igt_simple_main
>> {
>> int fd;
>> drmVersionPtr v;
>> + const char *name = getenv("IGT_FORCE_DRIVER");
>>
>> - fd = drm_open_driver(DRIVER_ANY);
>> + fd = __drm_open_driver(DRIVER_ANY);
>
> Did you tested it?
I did! :)
With drm-ci:
https://gitlab.freedesktop.org/helen.fo
rnazier/linux/-/pipelines/997824
I could see that msm jobs failed here, but the others didn't.
(the jobs from the others are red because of other failures from my
tests, but core_getversion passed).
Tested-by: Helen Koike <helen.koike@collabora.com>
>
>> + igt_assert_fd(fd);
>
> imho better igt_assert_f(fd > 0, "Error opening driver, forced: %s\n", name ? name : "(not-used)");
>
> Regards,
> Kamil
>
>> v = drmGetVersion(fd);
>> igt_assert_neq(strlen(v->name), 0);
>> igt_assert_neq(strlen(v->date), 0);
>> igt_assert_neq(strlen(v->desc), 0);
>> if (is_i915_device(fd))
>> igt_assert_lte(1, v->version_major);
>> + if (name) {
>> + igt_assert_f(!strcmp(name, v->name),
>> + "Expected driver \"%s\" but got \"%s\"\n",
>> + name, v->name);
>> + }
>>
>> drmFree(v);
>> drm_close_driver(fd);
>> --
>> 2.41.0
>>
prev parent reply other threads:[~2023-09-29 14:45 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-28 21:05 [igt-dev] [PATCH v4] core_getversion: Test for desired device Rob Clark
2023-09-28 21:38 ` [igt-dev] ✗ GitLab.Pipeline: warning for core_getversion: Test for desired device (rev3) Patchwork
2023-09-28 22:03 ` [igt-dev] ✓ CI.xeBAT: success " Patchwork
2023-09-28 22:07 ` [igt-dev] ✓ Fi.CI.BAT: " Patchwork
2023-09-29 6:48 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2023-09-29 9:34 ` [igt-dev] [PATCH v4] core_getversion: Test for desired device Kamil Konieczny
2023-09-29 14:45 ` Helen Koike [this message]
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=4c354881-d263-69a5-78ba-ca32a687e302@collabora.com \
--to=helen.koike@collabora.com \
--cc=daniel@fooishbar.org \
--cc=emma@anholt.net \
--cc=igt-dev@lists.freedesktop.org \
--cc=kamil.konieczny@linux.intel.com \
--cc=robdclark@chromium.org \
--cc=robdclark@gmail.com \
--cc=zbigniew.kempczynski@intel.com \
/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