[Intel-gfx] [PATCH i-g-t] igt/kms_properties.c: fix test case for setting immutable properties
Harry Wentland
harry.wentland at amd.com
Fri Jun 9 13:22:00 UTC 2017
On 2017-06-09 08:22 AM, Arkadiusz Hiler wrote:
> On Thu, Jun 08, 2017 at 04:06:44PM -0400, Bhawanpreet Lakha wrote:
>> 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);
>
>
> What about read only properties and setting them using the atomic calls
> below?
>
> Do we have that scenario already? Seems lika a potential false fail as
> well.
>
Good point. We'll take a look at connector-properties-atomic test which
should exercise the atomic code path.
Harry
More information about the amd-gfx
mailing list