[Intel-gfx] [PATCH i-g-t] igt/kms_properties.c: fix test case for setting immutable properties
Bhawanpreet Lakha
Bhawanpreet.Lakha at amd.com
Thu Jun 8 20:06:44 UTC 2017
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
More information about the Intel-gfx
mailing list