From 02339bd8bbe51384ec358726b01ba2a08fce7d01 Mon Sep 17 00:00:00 2001 From: Thibault Saunier Date: Mon, 15 Jun 2020 09:08:51 -0400 Subject: [PATCH] validate: Fix marking expected issues as criticals And never mark a repeat expected reports as repeated Part-of: --- validate/gst/validate/gst-validate-reporter.c | 2 +- validate/gst/validate/gst-validate-runner.c | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/validate/gst/validate/gst-validate-reporter.c b/validate/gst/validate/gst-validate-reporter.c index 0c5fcf38ad..52c5e1db62 100644 --- a/validate/gst/validate/gst-validate-reporter.c +++ b/validate/gst/validate/gst-validate-reporter.c @@ -218,7 +218,7 @@ gst_validate_report_valist (GstValidateReporter * reporter, prev_report = g_hash_table_lookup (priv->reports, (gconstpointer) issue_id); runner = gst_validate_reporter_get_runner (reporter); - if (prev_report) { + if (prev_report && prev_report->level != GST_VALIDATE_REPORT_LEVEL_EXPECTED) { GstValidateReportingDetails reporter_level = gst_validate_reporter_get_reporting_level (reporter); GstValidateReportingDetails runner_level = GST_VALIDATE_SHOW_UNKNOWN; diff --git a/validate/gst/validate/gst-validate-runner.c b/validate/gst/validate/gst-validate-runner.c index eda2b8dec7..19b105047d 100644 --- a/validate/gst/validate/gst-validate-runner.c +++ b/validate/gst/validate/gst-validate-runner.c @@ -688,8 +688,10 @@ gst_validate_runner_add_report (GstValidateRunner * runner, if (report->level == GST_VALIDATE_REPORT_LEVEL_IGNORE) return; - if (check_report_expected (runner, report)) + if (check_report_expected (runner, report)) { + GST_INFO_OBJECT (runner, "Found expected issue: %p", report); report->level = GST_VALIDATE_REPORT_LEVEL_EXPECTED; + } gst_validate_send (json_boxed_serialize (GST_MINI_OBJECT_TYPE (report), report)); @@ -824,7 +826,8 @@ _do_report_synthesis (GstValidateRunner * runner) if ((report->level == GST_VALIDATE_REPORT_LEVEL_CRITICAL) || (report->issue->flags & GST_VALIDATE_ISSUE_FLAGS_FULL_DETAILS)) { - criticals = g_list_append (criticals, report); + if (report->level == GST_VALIDATE_REPORT_LEVEL_CRITICAL) + criticals = g_list_append (criticals, report); gst_validate_report_print_details (report); } }