From cf6fb4a7f277f83573d86c1a4d01a186b59d6aa8 Mon Sep 17 00:00:00 2001 From: Thibault Saunier Date: Tue, 25 Feb 2020 10:54:00 -0300 Subject: [PATCH] validate: Add a specific error type for check actions And mark it as `NO_BACKTRACE | FULL_DETAILS`, same as for other action failure types. --- validate/gst/validate/gst-validate-report.c | 14 ++++++++++++-- validate/gst/validate/gst-validate-report.h | 1 + 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/validate/gst/validate/gst-validate-report.c b/validate/gst/validate/gst-validate-report.c index 1cba290..1b1e06d 100644 --- a/validate/gst/validate/gst-validate-report.c +++ b/validate/gst/validate/gst-validate-report.c @@ -247,6 +247,10 @@ gst_validate_issue_register (GstValidateIssue * issue) #define REGISTER_VALIDATE_ISSUE(lvl,id,sum,desc) \ gst_validate_issue_register (gst_validate_issue_new (id, \ sum, desc, GST_VALIDATE_REPORT_LEVEL_##lvl)) + +#define REGISTER_VALIDATE_ISSUE_FULL(lvl,id,sum,desc,flags) \ + gst_validate_issue_register (gst_validate_issue_new_full (id, \ + sum, desc, GST_VALIDATE_REPORT_LEVEL_##lvl, flags)) static void gst_validate_report_load_issues (void) { @@ -435,8 +439,14 @@ gst_validate_report_load_issues (void) "The execution of an action timed out", NULL); REGISTER_VALIDATE_ISSUE (CRITICAL, SCENARIO_FILE_MALFORMED, "The scenario file was malformed", NULL); - REGISTER_VALIDATE_ISSUE (CRITICAL, SCENARIO_ACTION_EXECUTION_ERROR, - "The execution of an action did not properly happen", NULL); + REGISTER_VALIDATE_ISSUE_FULL (CRITICAL, SCENARIO_ACTION_EXECUTION_ERROR, + "The execution of an action did not properly happen", NULL, + GST_VALIDATE_ISSUE_FLAGS_NO_BACKTRACE | + GST_VALIDATE_ISSUE_FLAGS_FULL_DETAILS); + REGISTER_VALIDATE_ISSUE_FULL (CRITICAL, SCENARIO_ACTION_CHECK_ERROR, + "A check action failed", NULL, + GST_VALIDATE_ISSUE_FLAGS_NO_BACKTRACE | + GST_VALIDATE_ISSUE_FLAGS_FULL_DETAILS); REGISTER_VALIDATE_ISSUE (ISSUE, SCENARIO_ACTION_EXECUTION_ISSUE, "An issue happened during the execution of a scenario", NULL); REGISTER_VALIDATE_ISSUE (CRITICAL, CONFIG_LATENCY_TOO_HIGH, diff --git a/validate/gst/validate/gst-validate-report.h b/validate/gst/validate/gst-validate-report.h index a16ee97..85d0d81 100644 --- a/validate/gst/validate/gst-validate-report.h +++ b/validate/gst/validate/gst-validate-report.h @@ -133,6 +133,7 @@ typedef enum { #define SCENARIO_NOT_ENDED _QUARK("scenario::not-ended") #define SCENARIO_FILE_MALFORMED _QUARK("scenario::malformed") #define SCENARIO_ACTION_EXECUTION_ERROR _QUARK("scenario::execution-error") +#define SCENARIO_ACTION_CHECK_ERROR _QUARK("scenario::check-error") #define SCENARIO_ACTION_TIMEOUT _QUARK("scenario::action-timeout") #define SCENARIO_ACTION_EXECUTION_ISSUE _QUARK("scenario::execution-issue") -- 2.7.4