Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
To: igt-dev@lists.freedesktop.org, karthik.b.s@intel.com
Subject: [igt-dev] [i-g-t] tests/kms_addfb_basic: Use proper macro for invalid tests
Date: Thu, 20 Apr 2023 17:36:31 +0530	[thread overview]
Message-ID: <20230420120631.1866947-1-bhanuprakash.modem@intel.com> (raw)

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>
---
 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);
 	}
-- 
2.40.0

             reply	other threads:[~2023-04-20 12:11 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-20 12:06 Bhanuprakash Modem [this message]
2023-04-20 14:18 ` [igt-dev] ✗ GitLab.Pipeline: warning for tests/kms_addfb_basic: Use proper macro for invalid tests 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 ` [igt-dev] [i-g-t] tests/kms_addfb_basic: Use proper macro for invalid tests Karthik B S

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=20230420120631.1866947-1-bhanuprakash.modem@intel.com \
    --to=bhanuprakash.modem@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=karthik.b.s@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