diff options
Diffstat (limited to 'lib/igt_core.c')
-rw-r--r-- | lib/igt_core.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/igt_core.c b/lib/igt_core.c index 65b39458..d61d3229 100644 --- a/lib/igt_core.c +++ b/lib/igt_core.c @@ -1021,6 +1021,7 @@ void __igt_subtest_group_restore(int save) static bool skipped_one = false; static bool succeeded_one = false; static bool failed_one = false; +static bool warned = false; static void exit_subtest(const char *) __attribute__((noreturn)); static void exit_subtest(const char *result) @@ -1037,6 +1038,7 @@ static void exit_subtest(const char *result) igt_terminate_spin_batches(); in_subtest = NULL; + warned = false; siglongjmp(igt_subtest_jmpbuf, 1); } @@ -1126,7 +1128,7 @@ void igt_success(void) { succeeded_one = true; if (in_subtest) - exit_subtest("SUCCESS"); + exit_subtest(warned ? "WARNING" : "SUCCESS"); } /** @@ -2120,6 +2122,9 @@ void igt_vlog(const char *domain, enum igt_log_level level, const char *format, if (list_subtests && level <= IGT_LOG_WARN) return; + if (level >= IGT_LOG_WARN) + warned = true; + if (vasprintf(&line, format, args) == -1) return; |