Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [i-g-t] tests/kms_addfb_basic: Use proper macro for invalid tests
@ 2023-04-20 12:06 Bhanuprakash Modem
  2023-04-20 14:18 ` [igt-dev] ✗ GitLab.Pipeline: warning for " Patchwork
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Bhanuprakash Modem @ 2023-04-20 12:06 UTC (permalink / raw)
  To: igt-dev, karthik.b.s

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

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2023-04-21  8:54 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [igt-dev] [i-g-t] tests/kms_addfb_basic: Use proper macro for invalid tests Karthik B S

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox