From: Karthik B S <karthik.b.s@intel.com>
To: Bhanuprakash Modem <bhanuprakash.modem@intel.com>,
<igt-dev@lists.freedesktop.org>
Subject: Re: [igt-dev] [i-g-t] tests/kms_addfb_basic: Use proper macro for invalid tests
Date: Fri, 21 Apr 2023 14:24:35 +0530 [thread overview]
Message-ID: <e795e8a4-6b81-824b-6d30-3127d346555f@intel.com> (raw)
In-Reply-To: <20230420120631.1866947-1-bhanuprakash.modem@intel.com>
On 4/20/2023 5:36 PM, Bhanuprakash Modem wrote:
> For invalid tests, instead of using magic numbers use proper
> macros those are already defined in IGT lib.
>
> Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
Reviewed-by: Karthik B S <karthik.b.s@intel.com>
> ---
> tests/kms_addfb_basic.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/tests/kms_addfb_basic.c b/tests/kms_addfb_basic.c
> index a66ccfa6b..e4783624f 100644
> --- a/tests/kms_addfb_basic.c
> +++ b/tests/kms_addfb_basic.c
> @@ -549,7 +549,7 @@ static void addfb25_tests(int fd)
> igt_subtest("addfb25-bad-modifier") {
> igt_require_fb_modifiers(fd);
>
> - f.modifier[0] = ~0;
> + f.modifier[0] = DRM_FORMAT_MOD_INVALID;
> do_ioctl_err(fd, DRM_IOCTL_MODE_ADDFB2, &f, EINVAL);
> }
>
> @@ -729,7 +729,7 @@ static void prop_tests(int fd)
>
> igt_describe("Test that get-properties ioctl call fails correctly for invalid object type");
> igt_subtest("invalid-get-prop-any") {
> - get_props.obj_type = 0; /* DRM_MODE_OBJECT_ANY */
> + get_props.obj_type = DRM_MODE_OBJECT_ANY;
>
> do_ioctl_err(fd, DRM_IOCTL_MODE_OBJ_GETPROPERTIES, &get_props, EINVAL);
> }
> @@ -747,7 +747,7 @@ static void prop_tests(int fd)
>
> igt_describe("Test that set-properties ioctl call fails correctly for invalid object type");
> igt_subtest("invalid-set-prop-any") {
> - set_prop.obj_type = 0; /* DRM_MODE_OBJECT_ANY */
> + set_prop.obj_type = DRM_MODE_OBJECT_ANY;
>
> do_ioctl_err(fd, DRM_IOCTL_MODE_OBJ_SETPROPERTY, &set_prop, EINVAL);
> }
prev parent reply other threads:[~2023-04-21 8:54 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-20 12:06 [igt-dev] [i-g-t] tests/kms_addfb_basic: Use proper macro for invalid tests Bhanuprakash Modem
2023-04-20 14:18 ` [igt-dev] ✗ GitLab.Pipeline: warning for " Patchwork
2023-04-20 14:43 ` [igt-dev] ✓ Fi.CI.BAT: success " Patchwork
2023-04-20 18:11 ` [igt-dev] ✓ Fi.CI.BAT: success for tests/kms_addfb_basic: Use proper macro for invalid tests (rev2) Patchwork
2023-04-20 19:57 ` [igt-dev] ✓ Fi.CI.IGT: success for tests/kms_addfb_basic: Use proper macro for invalid tests Patchwork
2023-04-21 1:13 ` [igt-dev] ✓ Fi.CI.IGT: success for tests/kms_addfb_basic: Use proper macro for invalid tests (rev2) Patchwork
2023-04-21 8:54 ` Karthik B S [this message]
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=e795e8a4-6b81-824b-6d30-3127d346555f@intel.com \
--to=karthik.b.s@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