[PATCH i-g-t] igt/kms_properties.c: fix test case for setting immutable properties

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Test doesn't check if the property is immutable, and fails.
Added conditions to detect if the property is immutable.

Signed-off-by: Bhawanpreet Lakha <Bhawanpreet.Lakha at amd.com>
---
 tests/kms_properties.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/tests/kms_properties.c b/tests/kms_properties.c
index c15026b8..9585e8e9 100644
--- a/tests/kms_properties.c
+++ b/tests/kms_properties.c
@@ -138,7 +138,11 @@ static void test_properties(int fd, uint32_t type, uint32_t id, bool atomic)
 		if (!atomic) {
 			ret = drmModeObjectSetProperty(fd, id, type, prop_id, prop_value);
 
-			igt_assert_eq(ret, 0);
+			if (!(prop->flags & DRM_MODE_PROP_IMMUTABLE))
+				igt_assert_eq(ret, 0);
+			else
+				igt_assert(ret != 0);
+
 		} else {
 			ret = drmModeAtomicAddProperty(req, id, prop_id, prop_value);
 			igt_assert(ret >= 0);
-- 
2.11.0



[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux