From: "Ser, Simon" <simon.ser@intel.com>
To: "igt-dev@lists.freedesktop.org" <igt-dev@lists.freedesktop.org>,
"chris@chris-wilson.co.uk" <chris@chris-wilson.co.uk>
Cc: "paul.kocialkowski@linux.intel.com" <paul.kocialkowski@linux.intel.com>
Subject: Re: [igt-dev] [PATCH i-g-t] audio: Avoid test_integrity failing if there's no HW support
Date: Tue, 23 Apr 2019 11:45:05 +0000 [thread overview]
Message-ID: <b5a664cf2ff3571da4b7950df53f8460415772f1.camel@intel.com> (raw)
In-Reply-To: <20190423080946.19771-1-chris@chris-wilson.co.uk>
On Tue, 2019-04-23 at 09:09 +0100, Chris Wilson wrote:
> Before asserting that the HDMI audio loopback works after resume, first
> require it to be present before suspend -- as not all machines are setup
> with the right HDMI audio capture.
>
> More strictly, one would expect that an audio capture device setup
> before suspend will remain functional after resume. An exercise left for
> the reader.
What if audio works without suspend, but breaks with suspend? That new
test makes it less easy to understand whether audio works at all or if
it breaks because of suspend.
Side note, I wouldn't bother too much with patches since all the audio
tests will get replaced by Chamelium audio tests (see my
"tests/kms_chamelium: add dp-audio test" series).
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=110499
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Simon Ser <simon.ser@intel.com>
> Cc: Paul Kocialkowski <paul.kocialkowski@linux.intel.com>
> ---
> tests/audio.c | 18 +++++++-----------
> 1 file changed, 7 insertions(+), 11 deletions(-)
>
> diff --git a/tests/audio.c b/tests/audio.c
> index 560876a33..28d18fb29 100644
> --- a/tests/audio.c
> +++ b/tests/audio.c
> @@ -94,7 +94,7 @@ static int input_callback(void *data, short *buffer, int frames)
> return 0;
> }
>
> -static void test_integrity(const char *device_name)
> +static bool test_integrity(const char *device_name)
> {
> struct test_data data;
> int sampling_rate;
> @@ -150,39 +150,35 @@ static void test_integrity(const char *device_name)
> data.streak = 0;
>
> ret = alsa_run(data.alsa, RUN_TIMEOUT);
> - igt_assert(ret > 0);
>
> audio_signal_clean(data.signal);
> free(data.signal);
>
> alsa_close_output(data.alsa);
>
> - run = true;
> + run = ret > 0;
> }
>
> - /* Make sure we tested at least one frequency */
> - igt_assert(run);
> -
> alsa_close_input(data.alsa);
> free(data.alsa);
> +
> + return run;
> }
>
> static void test_suspend_resume_integrity(const char *device_name,
> enum igt_suspend_state state,
> enum igt_suspend_test test)
> {
> - test_integrity(device_name);
> + /* Make sure we tested at least one frequency */
> + igt_require(test_integrity(device_name));
>
> igt_system_suspend_autoresume(state, test);
>
> - test_integrity(device_name);
> + igt_assert(test_integrity(device_name));
> }
>
> igt_main
> {
> - igt_subtest("hdmi-integrity")
> - test_integrity("HDMI");
> -
> igt_subtest("hdmi-integrity-after-suspend")
> test_suspend_resume_integrity("HDMI", SUSPEND_STATE_MEM,
> SUSPEND_TEST_NONE);
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
next prev parent reply other threads:[~2019-04-23 11:45 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-23 7:52 [igt-dev] [PATCH i-g-t] tests/intel-ci: blacklist audio tests Simon Ser
2019-04-23 8:09 ` [igt-dev] [PATCH i-g-t] audio: Avoid test_integrity failing if there's no HW support Chris Wilson
2019-04-23 9:09 ` Chris Wilson
2019-04-23 11:45 ` Ser, Simon [this message]
2019-04-23 12:00 ` Chris Wilson
2019-04-23 13:09 ` Ser, Simon
2019-04-24 12:50 ` Jani Nikula
2019-04-25 11:12 ` Ser, Simon
2019-04-23 9:05 ` [igt-dev] ✓ Fi.CI.BAT: success for tests/intel-ci: blacklist audio tests (rev2) Patchwork
2019-04-23 9:10 ` [igt-dev] [PATCH i-g-t] audio: Avoid test_integrity failing if there's no HW support Chris Wilson
2019-04-23 9:52 ` [igt-dev] ✓ Fi.CI.BAT: success for tests/intel-ci: blacklist audio tests (rev3) Patchwork
2019-04-23 11:07 ` [igt-dev] ✓ Fi.CI.IGT: success for tests/intel-ci: blacklist audio tests (rev2) Patchwork
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=b5a664cf2ff3571da4b7950df53f8460415772f1.camel@intel.com \
--to=simon.ser@intel.com \
--cc=chris@chris-wilson.co.uk \
--cc=igt-dev@lists.freedesktop.org \
--cc=paul.kocialkowski@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