[igt-dev] [PATCH i-g-t v1] tests/kms_color_chamelium: Fix port_idx check

Kunal Joshi kunal1.joshi at intel.com
Thu Sep 15 09:26:25 UTC 2022


chamelium has a port with id 0, so return -1 instead.

Cc: Modem Bhanuprakash <bhanuprakash.modem at intel.com>
Signed-off-by: Kunal Joshi <kunal1.joshi at intel.com>
---
 tests/chamelium/kms_color_chamelium.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/chamelium/kms_color_chamelium.c b/tests/chamelium/kms_color_chamelium.c
index 678931aa..05a06155 100644
--- a/tests/chamelium/kms_color_chamelium.c
+++ b/tests/chamelium/kms_color_chamelium.c
@@ -443,7 +443,7 @@ static int test_setup(data_t *data, enum pipe p)
 		}
 	}
 
-	return 0;
+	return -1;
 }
 
 static void
@@ -452,7 +452,7 @@ run_gamma_degamma_tests_for_pipe(data_t *data, enum pipe p,
 {
 	int port_idx = test_setup(data, p);
 
-	igt_require(port_idx);
+	igt_require(port_idx >= 0);
 
 	data->color_depth = 8;
 	data->drm_format = DRM_FORMAT_XRGB8888;
-- 
2.25.1



More information about the igt-dev mailing list