[igt-dev] [PATCH i-g-t] tests/kms_color: Optimize ctm test execution
Bhanuprakash Modem
bhanuprakash.modem at intel.com
Thu Dec 23 07:18:33 UTC 2021
Instead of iterating through all the delta, break the execution
when we found a match. This will optimize the time required to
execute ctm-0-* tests.
Cc: Karthik B S <karthik.b.s at intel.com>
Cc: Uma Shankar <uma.shankar at intel.com>
Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem at intel.com>
---
tests/kms_color.c | 24 +++++++++++++++---------
1 file changed, 15 insertions(+), 9 deletions(-)
diff --git a/tests/kms_color.c b/tests/kms_color.c
index 775f35964f..854b8f3c31 100644
--- a/tests/kms_color.c
+++ b/tests/kms_color.c
@@ -754,9 +754,11 @@ run_tests_for_pipe(data_t *data, enum pipe p)
expected_colors[1].g =
expected_colors[2].b =
0.25 + delta * (i - 2);
- success |= test_pipe_ctm(data, primary,
- red_green_blue,
- expected_colors, ctm);
+ if (test_pipe_ctm(data, primary, red_green_blue,
+ expected_colors, ctm)) {
+ success = true;
+ break;
+ }
}
igt_assert(success);
}
@@ -776,9 +778,11 @@ run_tests_for_pipe(data_t *data, enum pipe p)
expected_colors[1].g =
expected_colors[2].b =
0.5 + delta * (i - 2);
- success |= test_pipe_ctm(data, primary,
- red_green_blue,
- expected_colors, ctm);
+ if (test_pipe_ctm(data, primary, red_green_blue,
+ expected_colors, ctm)) {
+ success = true;
+ break;
+ }
}
igt_assert(success);
}
@@ -798,9 +802,11 @@ run_tests_for_pipe(data_t *data, enum pipe p)
expected_colors[1].g =
expected_colors[2].b =
0.75 + delta * (i - 3);
- success |= test_pipe_ctm(data, primary,
- red_green_blue,
- expected_colors, ctm);
+ if (test_pipe_ctm(data, primary, red_green_blue,
+ expected_colors, ctm)) {
+ success = true;
+ break;
+ }
}
igt_assert(success);
}
--
2.32.0
More information about the igt-dev
mailing list