From f033160ea20f803e9a5aa33ab2e9a8bcdcac6544 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alicia=20Boya=20Garc=C3=ADa?= Date: Mon, 14 Aug 2023 15:36:16 +0200 Subject: [PATCH] gst-validate: Use fatal-criticals by default Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/2903 Part-of: --- .../gst-devtools/validate/gst/validate/gst-validate-report.c | 5 +++-- .../gst-devtools/validate/tests/check/validate/overrides.c | 3 ++- .../gst-devtools/validate/tests/check/validate/padmonitor.c | 2 ++ 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/subprojects/gst-devtools/validate/gst/validate/gst-validate-report.c b/subprojects/gst-devtools/validate/gst/validate/gst-validate-report.c index 6017b17874..5f1877e7e4 100644 --- a/subprojects/gst-devtools/validate/gst/validate/gst-validate-report.c +++ b/subprojects/gst-devtools/validate/gst/validate/gst-validate-report.c @@ -48,7 +48,8 @@ #include "gst-validate-scenario.h" static GstClockTime _gst_validate_report_start_time = 0; -static GstValidateDebugFlags _gst_validate_flags = 0; +static GstValidateDebugFlags _gst_validate_flags = + GST_VALIDATE_FATAL_CRITICALS | GST_VALIDATE_PRINT_ISSUES; static GHashTable *_gst_validate_issues = NULL; static FILE **log_files = NULL; static gboolean output_is_tty = TRUE; @@ -639,7 +640,7 @@ gst_validate_report_init (void) /* init the debug flags */ var = g_getenv ("GST_VALIDATE"); - if (var && strlen (var) > 0) { + if (var) { _gst_validate_flags = g_parse_debug_string (var, keys, G_N_ELEMENTS (keys)); } diff --git a/subprojects/gst-devtools/validate/tests/check/validate/overrides.c b/subprojects/gst-devtools/validate/tests/check/validate/overrides.c index 78c2eedacb..9cbdfa770a 100644 --- a/subprojects/gst-devtools/validate/tests/check/validate/overrides.c +++ b/subprojects/gst-devtools/validate/tests/check/validate/overrides.c @@ -103,7 +103,8 @@ gst_validate_suite (void) if (atexit (gst_validate_deinit) != 0) { GST_ERROR ("failed to set gst_validate_deinit as exit function"); } - + // Do not abort on critical issues, as this test will generate them on purpose. + g_setenv ("GST_VALIDATE", "print_issues", TRUE); g_setenv ("GST_VALIDATE_REPORTING_DETAILS", "all", TRUE); gst_validate_init (); tcase_add_test (tc_chain, check_text_overrides); diff --git a/subprojects/gst-devtools/validate/tests/check/validate/padmonitor.c b/subprojects/gst-devtools/validate/tests/check/validate/padmonitor.c index 677543f231..5d5e731539 100644 --- a/subprojects/gst-devtools/validate/tests/check/validate/padmonitor.c +++ b/subprojects/gst-devtools/validate/tests/check/validate/padmonitor.c @@ -1067,6 +1067,8 @@ gst_validate_suite (void) if (atexit (gst_validate_deinit) != 0) { GST_ERROR ("failed to set gst_validate_deinit as exit function"); } + // Do not abort on critical issues, as this test will generate them on purpose. + g_setenv ("GST_VALIDATE", "print_issues", TRUE); fake_elements_register ();