Commit 991eb531 authored by Christian König's avatar Christian König Committed by Boris Brezillon

drm/exec: add test case for using a drm_exec multiple times

Not really a common use case, but let's make sure that we don't
accidentially break that somehow.

CC: Boris Brezillon <boris.brezillon@collabora.com>
Signed-off-by: default avatarChristian König <christian.koenig@amd.com>
Reviewed-by: default avatarBoris Brezillon <boris.brezillon@collabora.com>
Signed-off-by: default avatarBoris Brezillon <boris.brezillon@collabora.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230731123625.3766-2-christian.koenig@amd.com
parent 616bceae
......@@ -167,6 +167,26 @@ static void test_prepare_array(struct kunit *test)
drm_exec_fini(&exec);
}
static void test_multiple_loops(struct kunit *test)
{
struct drm_exec exec;
drm_exec_init(&exec, DRM_EXEC_INTERRUPTIBLE_WAIT);
drm_exec_until_all_locked(&exec)
{
break;
}
drm_exec_fini(&exec);
drm_exec_init(&exec, DRM_EXEC_INTERRUPTIBLE_WAIT);
drm_exec_until_all_locked(&exec)
{
break;
}
drm_exec_fini(&exec);
KUNIT_SUCCEED(test);
}
static struct kunit_case drm_exec_tests[] = {
KUNIT_CASE(sanitycheck),
KUNIT_CASE(test_lock),
......@@ -174,6 +194,7 @@ static struct kunit_case drm_exec_tests[] = {
KUNIT_CASE(test_duplicates),
KUNIT_CASE(test_prepare),
KUNIT_CASE(test_prepare_array),
KUNIT_CASE(test_multiple_loops),
{}
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment