From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ville =?iso-8859-1?Q?Syrj=E4l=E4?= 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 Message-ID: <20140423110437.GI18465@intel.com> References: <1397131692-2857-1-git-send-email-antti.koskipaa@linux.intel.com> <1397131692-2857-8-git-send-email-antti.koskipaa@linux.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by gabe.freedesktop.org (Postfix) with ESMTP id DF1186E30C for ; Wed, 23 Apr 2014 04:04:40 -0700 (PDT) Content-Disposition: inline In-Reply-To: <1397131692-2857-8-git-send-email-antti.koskipaa@linux.intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: Antti Koskipaa Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Thu, Apr 10, 2014 at 03:08:11PM +0300, Antti Koskipaa wrote: > Signed-off-by: Antti Koskipaa > --- > 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 =3D 0; i < 50; i++) { > + int x =3D rand() % (test_data->screenw + test_data->curw * 2) - test_d= ata->curw; > + int y =3D rand() % (test_data->screenh + test_data->curh * 2) - test_d= ata->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=E4l=E4 Intel OTC