From: Petri Latvala <petri.latvala@intel.com>
To: Kamil Konieczny <kamil.konieczny@linux.intel.com>
Cc: igt-dev@lists.freedesktop.org
Subject: Re: [igt-dev] [PATCH i-g-t v2] tests/prime_vgem: fix test listing problem
Date: Wed, 25 Jan 2023 15:31:01 +0200 [thread overview]
Message-ID: <Y9EvFaMNnkAeMI8v@platvala-desk.ger.corp.intel.com> (raw)
In-Reply-To: <20230123151711.94167-1-kamil.konieczny@linux.intel.com>
On Mon, Jan 23, 2023 at 04:17:11PM +0100, Kamil Konieczny wrote:
> Move call to function with possible usage of card fd inside
> fixture, as uses of fd are allowed inside fixtures or subtests.
> This may eliminate problem when using --list-subtests option,
> depending on implementation it can assert like:
>
> sudo build/tests/prime_vgem --list-subtests
> ...
> coherency-blt
> (prime_vgem:259195) intel_ctx-CRITICAL: Test assertion failure function intel_ctx_create_all_physical, file ../lib/intel_ctx.c:344:
> (prime_vgem:259195) intel_ctx-CRITICAL: Failed assertion: err == 0
> (prime_vgem:259195) intel_ctx-CRITICAL: error: -9 != 0
> Test prime_vgem failed.
>
> v2: improve commit messages and use fixtures for create and
> destroy of context (Petri)
>
> Reported-by: Petri Latvala <petri.latvala@intel.com>
> Cc: Petri Latvala <petri.latvala@intel.com>
> Signed-off-by: Kamil Konieczny <kamil.konieczny@linux.intel.com>
Reviewed-by: Petri Latvala <petri.latvala@intel.com>
> ---
> tests/prime_vgem.c | 8 ++++++--
> 1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/tests/prime_vgem.c b/tests/prime_vgem.c
> index f876e748..06be273c 100644
> --- a/tests/prime_vgem.c
> +++ b/tests/prime_vgem.c
> @@ -1093,7 +1093,10 @@ static void test_each_engine(const char *name, int vgem, int i915,
> unsigned int flags))
> {
> const struct intel_execution_engine2 *e;
> - const intel_ctx_t *ctx = intel_ctx_create_all_physical(i915);
> + const intel_ctx_t *ctx;
> +
> + igt_fixture
> + ctx = intel_ctx_create_all_physical(i915);
>
> igt_subtest_with_dynamic(name) {
> for_each_ctx_engine(i915, ctx, e) {
> @@ -1110,7 +1113,8 @@ static void test_each_engine(const char *name, int vgem, int i915,
> }
> }
>
> - intel_ctx_destroy(i915, ctx);
> + igt_fixture
> + intel_ctx_destroy(i915, ctx);
> }
>
> igt_main
> --
> 2.37.2
>
prev parent reply other threads:[~2023-01-25 13:34 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-23 15:17 [igt-dev] [PATCH i-g-t v2] tests/prime_vgem: fix test listing problem Kamil Konieczny
2023-01-23 16:49 ` [igt-dev] ✓ Fi.CI.BAT: success for tests/prime_vgem: fix test listing problem (rev2) Patchwork
2023-01-24 3:47 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2023-01-25 13:31 ` Petri Latvala [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=Y9EvFaMNnkAeMI8v@platvala-desk.ger.corp.intel.com \
--to=petri.latvala@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=kamil.konieczny@linux.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