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.la...@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

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to