From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Antti Koskipaa <antti.koskipaa@linux.intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH i-g-t v2 7/8] kms_cursor_crc: Add random cursor placement test
Date: Wed, 23 Apr 2014 14:04:37 +0300 [thread overview]
Message-ID: <20140423110437.GI18465@intel.com> (raw)
In-Reply-To: <1397131692-2857-8-git-send-email-antti.koskipaa@linux.intel.com>
On Thu, Apr 10, 2014 at 03:08:11PM +0300, Antti Koskipaa wrote:
> Signed-off-by: Antti Koskipaa <antti.koskipaa@linux.intel.com>
> ---
> tests/kms_cursor_crc.c | 14 ++++++++++++++
> 1 file changed, 14 insertions(+)
>
> diff --git a/tests/kms_cursor_crc.c b/tests/kms_cursor_crc.c
> index b2498a1..e00abf5 100644
> --- a/tests/kms_cursor_crc.c
> +++ b/tests/kms_cursor_crc.c
> @@ -214,6 +214,18 @@ static void test_crc_sliding(test_data_t *test_data)
> }
> }
>
> +static void test_crc_random(test_data_t *test_data)
> +{
> + int i;
> +
> + /* Random cursor placement */
> + for (i = 0; i < 50; i++) {
> + int x = rand() % (test_data->screenw + test_data->curw * 2) - test_data->curw;
> + int y = rand() % (test_data->screenh + test_data->curh * 2) - test_data->curh;
> + do_single_test(test_data, x, y);
> + }
> +}
As this is not deterministic it would be nice if the test would print
out some of the test parameters on failure (cursor coordinates and size
at least). Otherwise there's no good way to analyze failures.
> +
> static bool prepare_crtc(test_data_t *test_data, igt_output_t *output,
> int cursor_w, int cursor_h)
> {
> @@ -359,6 +371,8 @@ static void run_test_generic(data_t *data, int cursor_max_size)
> run_test(data, test_crc_offscreen, cursor_size, cursor_size);
> igt_subtest_f("cursor-%s-sliding", c_size)
> run_test(data, test_crc_sliding, cursor_size, cursor_size);
> + igt_subtest_f("cursor-%s-random", c_size)
> + run_test(data, test_crc_random, cursor_size, cursor_size);
> }
>
> }
> --
> 1.8.3.2
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Ville Syrjälä
Intel OTC
next prev parent reply other threads:[~2014-04-23 11:04 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-10 12:08 [PATCH i-g-t v2 0/8] kms_cursor_crc enhancements Antti Koskipaa
2014-04-10 12:08 ` [PATCH i-g-t v2 1/8] kms_cursor_crc: Remove some test cases and change cursor to color Antti Koskipaa
2014-04-10 12:08 ` [PATCH i-g-t v2 2/8] kms_cursor_crc: Move cursor enable and disable calls where they belong Antti Koskipaa
2014-04-23 10:54 ` Ville Syrjälä
2014-04-10 12:08 ` [PATCH i-g-t v2 3/8] kms_cursor_crc: Use a function pointer to call test Antti Koskipaa
2014-04-10 12:08 ` [PATCH i-g-t v2 4/8] kms_cursor_crc: Separate onscreen and offscreen tests Antti Koskipaa
2014-04-10 12:08 ` [PATCH i-g-t v2 5/8] kms_cursor_crc: Add reference software rendering Antti Koskipaa
2014-04-10 12:08 ` [PATCH i-g-t v2 6/8] kms_cursor_crc: Add moving cursor test Antti Koskipaa
2014-04-10 12:08 ` [PATCH i-g-t v2 7/8] kms_cursor_crc: Add random cursor placement test Antti Koskipaa
2014-04-23 11:04 ` Ville Syrjälä [this message]
2014-04-10 12:08 ` [PATCH i-g-t v2 8/8] kms_cursor_crc: Add background picture Antti Koskipaa
2014-04-25 13:27 ` [PATCH i-g-t v2 0/8] kms_cursor_crc enhancements Ville Syrjälä
2014-04-25 14:07 ` Daniel Vetter
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=20140423110437.GI18465@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=antti.koskipaa@linux.intel.com \
--cc=intel-gfx@lists.freedesktop.org \
/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