diff --git a/val/include/acs_test_status.h b/val/include/acs_test_status.h new file mode 100644 index 00000000..791a83a4 --- /dev/null +++ b/val/include/acs_test_status.h @@ -0,0 +1,35 @@ +/** @file + * Copyright (c) 2026, Arm Limited or its affiliates. All rights reserved. + * SPDX-License-Identifier : Apache-2.0 + + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. +**/ + +#ifndef __ACS_TEST_STATUS_H__ +#define __ACS_TEST_STATUS_H__ + +/* Test status counters visible across ACS */ +typedef struct { + uint32_t total_rules_run; /* Total rules/tests that reported a status */ + uint32_t passed; /* Count of TEST_PASS */ + uint32_t partial_coverage; /* Count of TEST_PARTIAL_COV */ + uint32_t warnings; /* Count of TEST_WARN */ + uint32_t skipped; /* Count of TEST_SKIP */ + uint32_t failed; /* Count of TEST_FAIL */ + uint32_t not_implemented; /* Count of TEST_NO_IMP */ + uint32_t pal_not_supported; /* Count of TEST_PAL_NS */ +} acs_test_status_counters_t; + +extern acs_test_status_counters_t g_rule_test_stats; + +#endif /* __ACS_TEST_STATUS_H__ */ diff --git a/val/include/val_interface.h b/val/include/val_interface.h index 9a252454..a0ce6b27 100644 --- a/val/include/val_interface.h +++ b/val/include/val_interface.h @@ -23,6 +23,7 @@ #include "acs_pfdi.h" #include "acs_cxl.h" #include "val_status.h" +#include "acs_test_status.h" extern uint32_t g_print_level; @@ -64,20 +65,6 @@ extern uint32_t g_print_level; #define EL1SKIPTRAP_CNTPCT (1u << 1) #define EL1SKIPTRAP_DEVMEM (1u << 2) -/* Test status counters visible across ACS */ -typedef struct { - uint32_t total_rules_run; /* Total rules/tests that reported a status */ - uint32_t passed; /* Count of TEST_PASS */ - uint32_t partial_coverage; /* Count of TEST_PARTIAL_COV */ - uint32_t warnings; /* Count of TEST_WARN */ - uint32_t skipped; /* Count of TEST_SKIP */ - uint32_t failed; /* Count of TEST_FAIL */ - uint32_t not_implemented; /* Count of TEST_NO_IMP */ - uint32_t pal_not_supported; /* Count of TEST_PAL_NS */ -} acs_test_status_counters_t; - -extern acs_test_status_counters_t g_rule_test_stats; - /* Module init operation type enum */ typedef enum { INIT_OP_INIT, diff --git a/val/src/acs_test_infra.c b/val/src/acs_test_infra.c index 9c028bbe..9ad782b2 100644 --- a/val/src/acs_test_infra.c +++ b/val/src/acs_test_infra.c @@ -162,16 +162,6 @@ val_print_acs_test_status_summary(void) g_rule_test_stats.not_implemented); val_print(INFO, "---------------------------------\n"); - /* Reset global rule/test status counters after printing summary */ - g_rule_test_stats.total_rules_run = 0; - g_rule_test_stats.passed = 0; - g_rule_test_stats.partial_coverage = 0; - g_rule_test_stats.warnings = 0; - g_rule_test_stats.skipped = 0; - g_rule_test_stats.failed = 0; - g_rule_test_stats.pal_not_supported = 0; - g_rule_test_stats.not_implemented = 0; - } /**