From: Anshuman Gupta <anshuman.gupta@intel.com>
To: Petri Latvala <petri.latvala@intel.com>
Cc: igt-dev@lists.freedesktop.org, chris@chris-wilson.co.uk
Subject: Re: [igt-dev] [PATCH i-g-t] tests/kms_content_protection: CP cleanup exit handler
Date: Tue, 19 May 2020 15:57:13 +0530 [thread overview]
Message-ID: <20200519102713.GP10565@intel.com> (raw)
In-Reply-To: <20200519084226.GY9497@platvala-desk.ger.corp.intel.com>
On 2020-05-19 at 11:42:26 +0300, Petri Latvala wrote:
> On Tue, May 19, 2020 at 11:40:28AM +0530, Anshuman Gupta wrote:
> > Add HDCP content protection cleanup igt exit handler,
> > earlier it was done through igt_fixture which doesn't
> > trigger hdcp cleanup on igt abortion due to any signal.
> > This should avoid any HDCP content protection leak.
> >
> > Cc: Ramalingam C <ramalingam.c@intel.com>
> > Signed-off-by: Anshuman Gupta <anshuman.gupta@intel.com>
> > ---
> > tests/kms_content_protection.c | 14 +++++++++-----
> > 1 file changed, 9 insertions(+), 5 deletions(-)
> >
> > diff --git a/tests/kms_content_protection.c b/tests/kms_content_protection.c
> > index 3b9cedcb..f3101b8a 100644
> > --- a/tests/kms_content_protection.c
> > +++ b/tests/kms_content_protection.c
> > @@ -651,12 +651,21 @@ static void test_content_protection_cleanup(void)
> > }
> > }
> >
> > +static void test_content_protection_exit_handler(int sig)
> > +{
> > + igt_fixture {
> > + test_content_protection_cleanup();
> > + igt_display_fini(&data.display);
> > + }
>
Thanks Petri for review.
> Don't put it in an igt_fixture. If a test fails, you're still inside a
> subtest and entering an igt_fixture will fail.
test_content_protection_cleanup is using for_each_connected_output() which
of using assert on igt_can_fail(), because of that i had to used
igt_fixture(), could you please suggest to mitigate above.
Thanks,
Anshuman Gupta.
>
> You can trust the state to be correct without the fixture because you
> only install the exit handler when we're actually executing and the
> init has been already done.
>
>
> --
> Petri Latvala
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
next prev parent reply other threads:[~2020-05-19 10:36 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-19 6:10 [igt-dev] [PATCH i-g-t] tests/kms_content_protection: CP cleanup exit handler Anshuman Gupta
2020-05-19 6:50 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2020-05-19 7:52 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2020-05-19 8:42 ` [igt-dev] [PATCH i-g-t] " Petri Latvala
2020-05-19 10:27 ` Anshuman Gupta [this message]
2020-05-19 11:10 ` Petri Latvala
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=20200519102713.GP10565@intel.com \
--to=anshuman.gupta@intel.com \
--cc=chris@chris-wilson.co.uk \
--cc=igt-dev@lists.freedesktop.org \
--cc=petri.latvala@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.