* [PATCH i-g-t] igt/kms_properties.c: fix test case for setting immutable properties
@ 2017-06-08 20:06 Bhawanpreet Lakha
[not found] ` <20170608200644.4394-1-Bhawanpreet.Lakha-5C7GfCeVMHo@public.gmane.org>
0 siblings, 1 reply; 3+ messages in thread
From: Bhawanpreet Lakha @ 2017-06-08 20:06 UTC (permalink / raw)
To: intel-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
harry.wentland-5C7GfCeVMHo, bhawanpreet.lakha-5C7GfCeVMHo
Cc: Bhawanpreet Lakha
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@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
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Intel-gfx] [PATCH i-g-t] igt/kms_properties.c: fix test case for setting immutable properties
[not found] ` <20170608200644.4394-1-Bhawanpreet.Lakha-5C7GfCeVMHo@public.gmane.org>
@ 2017-06-09 12:22 ` Arkadiusz Hiler
2017-06-09 13:22 ` Harry Wentland
0 siblings, 1 reply; 3+ messages in thread
From: Arkadiusz Hiler @ 2017-06-09 12:22 UTC (permalink / raw)
To: Bhawanpreet Lakha
Cc: intel-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
harry.wentland-5C7GfCeVMHo,
amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
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@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.
--
Cheers,
Arek
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH i-g-t] igt/kms_properties.c: fix test case for setting immutable properties
2017-06-09 12:22 ` [Intel-gfx] " Arkadiusz Hiler
@ 2017-06-09 13:22 ` Harry Wentland
0 siblings, 0 replies; 3+ messages in thread
From: Harry Wentland @ 2017-06-09 13:22 UTC (permalink / raw)
To: Arkadiusz Hiler, Bhawanpreet Lakha; +Cc: intel-gfx, amd-gfx
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@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
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-06-09 13:22 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-08 20:06 [PATCH i-g-t] igt/kms_properties.c: fix test case for setting immutable properties Bhawanpreet Lakha
[not found] ` <20170608200644.4394-1-Bhawanpreet.Lakha-5C7GfCeVMHo@public.gmane.org>
2017-06-09 12:22 ` [Intel-gfx] " Arkadiusz Hiler
2017-06-09 13:22 ` Harry Wentland
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.