[igt-dev] [PATCH i-g-t 2/3] lib/igt_core: Disallow nesting of igt_dynamic inside igt_dynamic
Arkadiusz Hiler
arkadiusz.hiler at intel.com
Mon May 4 11:26:22 UTC 2020
igt_dynamic is allowed only inside igt_subtest_with_dynamic
Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler at intel.com>
---
lib/igt_core.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/lib/igt_core.c b/lib/igt_core.c
index 43f0ba8b..662a0986 100644
--- a/lib/igt_core.c
+++ b/lib/igt_core.c
@@ -1280,6 +1280,8 @@ bool __igt_run_dynamic_subtest(const char *dynamic_subtest_name)
{
internal_assert(in_subtest && _igt_dynamic_tests_executed >= 0,
"igt_dynamic is allowed only inside igt_subtest_with_dynamic\n");
+ internal_assert(!in_dynamic_subtest,
+ "igt_dynamic is not allowed to be nested in another igt_dynamic\n");
if (!valid_name_for_subtest(dynamic_subtest_name)) {
igt_critical("Invalid dynamic subtest name \"%s\".\n",
--
2.25.2
More information about the igt-dev
mailing list