From: "Dixit, Ashutosh" <ashutosh.dixit@intel.com>
To: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
Cc: igt-dev@lists.freedesktop.org
Subject: Re: [igt-dev] [V2 i-g-t] tests/kms_cursor_crc: Fix SIGABRT in dynamic subtests
Date: Mon, 14 Nov 2022 12:08:24 -0800 [thread overview]
Message-ID: <878rkdpadj.wl-ashutosh.dixit@intel.com> (raw)
In-Reply-To: <20221104020005.4098049-1-bhanuprakash.modem@intel.com>
On Thu, 03 Nov 2022 19:00:05 -0700, Bhanuprakash Modem wrote:
>
Hi Bhanu, could you please fix the compile warnings below. Thanks.
> @@ -700,65 +700,78 @@ static void test_rapid_movement(data_t *data)
> igt_assert_lt(usec, 0.9 * 400 * 1000000 / data->refresh);
> }
>
> -static void run_size_tests(data_t *data, void (*testfunc)(data_t *),
> - int w, int h)
> +static void run_size_tests(data_t *data, int w, int h)
> {
> enum pipe pipe;
> + struct {
> + const char *name;
> + void (*testfunc)(data_t *);
> + const char *desc;
> + } size_tests[] = {
> + { "cursor-onscreen", test_crc_onscreen,
> + "Check if a given-size cursor is well-positioned inside the screen." },
> + { "cursor-offscreen", test_crc_offscreen,
> + "Check if a given-size cursor is well-positioned outside the screen." },
> + { "cursor-sliding", test_crc_sliding,
> + "Check the smooth and pixel-by-pixel given-size cursor movements on horizontal, vertical and diagonal." },
> + { "cursor-random", test_crc_random,
> + "Check random placement of a cursor with given size." },
> + { "cursor-rapid-movement", test_rapid_movement,
> + "Check the rapid update of given-size cursor movements." },
> + };
> + int i;
> + char name[16];
>
> if (w == 0 && h == 0) {
> w = data->cursor_max_w;
> h = data->cursor_max_h;
>
> - /*
> - * No point in doing the "max-size" test if
> - * it was already covered by the other tests.
> - */
> - if ((w == h) && (w <= 512) && (h <= 512) &&
> - is_power_of_two(w) && is_power_of_two(h)) {
> - igt_info("Cursor max size %dx%d already covered by other tests\n", w, h);
> - return;
> - }
> + strcpy(name, "max-size");
> + } else {
> + snprintf(name, sizeof(name), "%dx%d", w, h);
[305/1132] Compiling C object tests/kms_cursor_crc.p/kms_cursor_crc.c.o
../tests/kms_cursor_crc.c: In function ‘run_size_tests.constprop’:
../tests/kms_cursor_crc.c:731:50: warning: ‘%d’ directive output may be truncated writing between 1 and 11 bytes into a region of size between 4 and 14 [-Wformat-truncation=]
731 | snprintf(name, sizeof(name), "%dx%d", w, h);
| ^~
../tests/kms_cursor_crc.c:731:46: note: directive argument in the range [-2147483648, 1024]
731 | snprintf(name, sizeof(name), "%dx%d", w, h);
| ^~~~~~~
In file included from /usr/include/stdio.h:894,
from ../lib/igt_core.h:41,
from ../lib/drmtest.h:39,
from ../lib/igt.h:27,
from ../tests/kms_cursor_crc.c:25:
In function ‘snprintf’,
inlined from ‘run_size_tests.constprop’ at ../tests/kms_cursor_crc.c:731:3:
/usr/include/bits/stdio2.h:71:10: note: ‘__builtin___snprintf_chk’ output between 4 and 24 bytes into a destination of size 16
71 | return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
72 | __glibc_objsize (__s), __fmt,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
73 | __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~
next prev parent reply other threads:[~2022-11-14 20:11 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-02 11:04 [igt-dev] [i-g-t] tests/kms_cursor_crc: Fix SIGABRT in dynamic subtests Bhanuprakash Modem
2022-11-02 12:11 ` [igt-dev] ✗ GitLab.Pipeline: warning for " Patchwork
2022-11-02 12:28 ` [igt-dev] ✓ Fi.CI.BAT: success " Patchwork
2022-11-02 17:32 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2022-11-04 2:00 ` [igt-dev] [V2 i-g-t] " Bhanuprakash Modem
2022-11-07 5:36 ` Modem, Bhanuprakash
2022-11-08 16:19 ` aemad
2022-11-08 16:21 ` aemad
2022-11-07 22:47 ` Melissa Wen
2022-11-08 16:18 ` Melissa Wen
2022-11-14 20:08 ` Dixit, Ashutosh [this message]
2022-11-15 4:52 ` Modem, Bhanuprakash
2022-11-04 2:55 ` [igt-dev] ✓ Fi.CI.BAT: success for tests/kms_cursor_crc: Fix SIGABRT in dynamic subtests (rev2) Patchwork
2022-11-04 20:49 ` [igt-dev] ✗ Fi.CI.IGT: failure " 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=878rkdpadj.wl-ashutosh.dixit@intel.com \
--to=ashutosh.dixit@intel.com \
--cc=bhanuprakash.modem@intel.com \
--cc=igt-dev@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