[igt-dev] [PATCH i-g-t] tests/kms_dp_aux_dev: Convert test to dynamic
Petri Latvala
petri.latvala at intel.com
Mon Sep 19 10:35:53 UTC 2022
On Mon, Sep 19, 2022 at 03:36:23PM +0530, Ananya Sharma wrote:
> Modified kms_universal_plane to include dynamic test cases.
>
> Signed-off-by: Ananya Sharma <ananya.sharma at intel.com>
> ---
> tests/kms_dp_aux_dev.c | 11 ++++++++---
> 1 file changed, 8 insertions(+), 3 deletions(-)
>
> diff --git a/tests/kms_dp_aux_dev.c b/tests/kms_dp_aux_dev.c
> index d3249fa3..ac12b500 100644
> --- a/tests/kms_dp_aux_dev.c
> +++ b/tests/kms_dp_aux_dev.c
> @@ -118,7 +118,7 @@ static bool test(int drm_fd, uint32_t connector_id)
> return false;
> }
>
> -igt_simple_main
> +igt_main
> {
> int valid_connectors = 0;
> drmModeRes *res;
> @@ -129,8 +129,13 @@ igt_simple_main
> res = drmModeGetResources(drm_fd);
> igt_require(res);
Calling anything that touches DRM outside of an igt_fixture or a
subtest is invalid. drmModeGetResources and its friends here for
example.
--
Petri Latvala
>
> - for (int i = 0; i < res->count_connectors; i++)
> - valid_connectors += test(drm_fd, res->connectors[i]);
> + igt_subtest_with_dynamic("basic") {
> + for (int i = 0; i < res->count_connectors; i++)
> + igt_dynamic_f("subtest-%d", i) {
> + valid_connectors += test(drm_fd, res->connectors[i]);
> + }
> + }
> +
> igt_require(valid_connectors);
>
> drmModeFreeResources(res);
> --
> 2.25.1
>
More information about the igt-dev
mailing list