From 0df2b0e82136f2dc37de5c84fb505c8a6e89e7ca Mon Sep 17 00:00:00 2001 From: Avi Weiss Date: Tue, 30 Jan 2024 13:13:53 +1000 Subject: [PATCH] Fix #119, Update out-of-date verification macros + typo corrections --- .github/pull_request_template.md | 2 +- .github/workflows/codeql-build.yml | 2 +- .github/workflows/format-check.yml | 1 - .github/workflows/static-analysis.yml | 2 +- config/default_hs_interface_cfg.h | 2 +- config/default_hs_internal_cfg.h | 2 +- config/default_hs_mission_cfg.h | 2 +- config/default_hs_msg.h | 2 +- config/default_hs_platform_cfg.h | 2 +- config/default_hs_tblstruct.h | 2 +- docs/dox_src/cfs_hs.dox | 2 +- fsw/inc/hs_perfids.h | 1 - fsw/src/hs_verify.h | 36 ++------------------------- unit-test/hs_app_tests.c | 3 ++- 14 files changed, 14 insertions(+), 47 deletions(-) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 599c59d..6b059e5 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -10,7 +10,7 @@ A clear and concise description of what the contribution is. **Testing performed** Steps taken to test the contribution: 1. Build steps '...' -1. Execution steps '...' +2. Execution steps '...' **Expected behavior changes** A clear and concise description of how this contribution will change behavior and level of impact. diff --git a/.github/workflows/codeql-build.yml b/.github/workflows/codeql-build.yml index 5bbd70c..cad09d4 100644 --- a/.github/workflows/codeql-build.yml +++ b/.github/workflows/codeql-build.yml @@ -3,7 +3,7 @@ name: CodeQl Analysis on: push: pull_request: - + jobs: codeql: diff --git a/.github/workflows/format-check.yml b/.github/workflows/format-check.yml index 2d73eeb..b9d1f11 100644 --- a/.github/workflows/format-check.yml +++ b/.github/workflows/format-check.yml @@ -9,4 +9,3 @@ jobs: format-check: name: Run format check uses: nasa/cFS/.github/workflows/format-check.yml@main - \ No newline at end of file diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/static-analysis.yml index 0c1d4a4..fa6bb81 100644 --- a/.github/workflows/static-analysis.yml +++ b/.github/workflows/static-analysis.yml @@ -10,4 +10,4 @@ jobs: name: Run cppcheck uses: nasa/cFS/.github/workflows/static-analysis.yml@main with: - strict-dir-list: './fsw' + strict-dir-list: './fsw' diff --git a/config/default_hs_interface_cfg.h b/config/default_hs_interface_cfg.h index 2ffb8f5..e7da2ec 100644 --- a/config/default_hs_interface_cfg.h +++ b/config/default_hs_interface_cfg.h @@ -26,7 +26,7 @@ * interface, tables definitions, and any other data products that * serve to exchange information with other entities. * - * @note This file may be overridden/superceded by mission-provided defintions + * @note This file may be overridden/superceded by mission-provided definitions * either by overriding this header or by generating definitions from a command/data * dictionary tool. */ diff --git a/config/default_hs_internal_cfg.h b/config/default_hs_internal_cfg.h index 7d7ab2e..50cd83a 100644 --- a/config/default_hs_internal_cfg.h +++ b/config/default_hs_internal_cfg.h @@ -26,7 +26,7 @@ * to items in this file only affect the local module and will be transparent * to external entities that are using the public interface(s). * - * @note This file may be overridden/superceded by mission-provided defintions + * @note This file may be overridden/superceded by mission-provided definitions * either by overriding this header or by generating definitions from a command/data * dictionary tool. */ diff --git a/config/default_hs_mission_cfg.h b/config/default_hs_mission_cfg.h index 935f578..6d2418a 100644 --- a/config/default_hs_mission_cfg.h +++ b/config/default_hs_mission_cfg.h @@ -25,7 +25,7 @@ * This is a compatibility header for the "mission_cfg.h" file that has * traditionally provided public config definitions for each CFS app. * - * @note This file may be overridden/superceded by mission-provided defintions + * @note This file may be overridden/superceded by mission-provided definitions * either by overriding this header or by generating definitions from a command/data * dictionary tool. */ diff --git a/config/default_hs_msg.h b/config/default_hs_msg.h index 0ddccae..81ed730 100644 --- a/config/default_hs_msg.h +++ b/config/default_hs_msg.h @@ -25,7 +25,7 @@ * This is a compatibility header for the "hs_msg.h" file that has * traditionally provided the message definitions for cFS apps. * - * @note This file may be overridden/superceded by mission-provided defintions + * @note This file may be overridden/superceded by mission-provided definitions * either by overriding this header or by generating definitions from a command/data * dictionary tool. */ diff --git a/config/default_hs_platform_cfg.h b/config/default_hs_platform_cfg.h index c346b58..25a1aeb 100644 --- a/config/default_hs_platform_cfg.h +++ b/config/default_hs_platform_cfg.h @@ -29,7 +29,7 @@ * These definitions are now provided in two separate files, one for * the public/mission scope and one for internal scope. * - * @note This file may be overridden/superceded by mission-provided defintions + * @note This file may be overridden/superceded by mission-provided definitions * either by overriding this header or by generating definitions from a command/data * dictionary tool. */ diff --git a/config/default_hs_tblstruct.h b/config/default_hs_tblstruct.h index 4aa1a71..9733e25 100644 --- a/config/default_hs_tblstruct.h +++ b/config/default_hs_tblstruct.h @@ -23,7 +23,7 @@ * * Provides default definitions for HK table structures * - * @note This file may be overridden/superceded by mission-provided defintions + * @note This file may be overridden/superceded by mission-provided definitions * either by overriding this header or by generating definitions from a command/data * dictionary tool. */ diff --git a/docs/dox_src/cfs_hs.dox b/docs/dox_src/cfs_hs.dox index 6a81efe..9117e3d 100644 --- a/docs/dox_src/cfs_hs.dox +++ b/docs/dox_src/cfs_hs.dox @@ -54,7 +54,7 @@ This document provides a complete specification for the commands and telemetry associated with the Health and Safety (HS) application software. The document is intended primarily - for users of the software (operations personal, test engineers, and maintenance personnel). + for users of the software (operations personnel, test engineers, and maintenance personnel). The last section of the document, the deployment guide section, is intended for mission developers when deploying and configuring the HS application software for a mission flight software build environment. diff --git a/fsw/inc/hs_perfids.h b/fsw/inc/hs_perfids.h index cac3a69..6fb957d 100644 --- a/fsw/inc/hs_perfids.h +++ b/fsw/inc/hs_perfids.h @@ -29,7 +29,6 @@ * \{ */ -#define HS_IDLETASK_PERF_ID 37 /**< \brief Idle task performance ID */ #define HS_APPMAIN_PERF_ID 40 /**< \brief Main task performance ID */ /**\}*/ diff --git a/fsw/src/hs_verify.h b/fsw/src/hs_verify.h index fe07dc1..13e6cb2 100644 --- a/fsw/src/hs_verify.h +++ b/fsw/src/hs_verify.h @@ -29,22 +29,13 @@ * Macro Definitions *************************************************************************/ -/* - * Idle Task Priority - */ -#if HS_IDLE_TASK_PRIORITY < 0 -#error HS_IDLE_TASK_PRIORITY cannot be less than 0 -#elif HS_IDLE_TASK_PRIORITY > 255 -#error HS_IDLE_TASK_PRIORITY can not exceed 255 -#endif - /* * Maximum number execution counters */ #if HS_MAX_EXEC_CNT_SLOTS < 1 -#error HS_MAX_MSG_ACT_TYPES cannot be less than 1 +#error HS_MAX_EXEC_CNT_SLOTS cannot be less than 1 #elif HS_MAX_EXEC_CNT_SLOTS > 4294967295 -#error HS_MAX_MSG_ACT_TYPES can not exceed 4294967295 +#error HS_MAX_EXEC_CNT_SLOTS can not exceed 4294967295 #endif /* @@ -220,20 +211,6 @@ #error HS_CPUHOG_DEFAULT_STATE not defined as a supported enumerated type #endif -/* - * Utilization Calls Per Mark - */ -#if HS_UTIL_CALLS_PER_MARK > 4294967295 -#error HS_UTIL_CALLS_PER_MARK can not exceed 4294967295 -#endif - -/* - * Utilization Cycles per Interval - */ -#if HS_UTIL_CALLS_PER_MARK > 4294967295 -#error HS_UTIL_CYCLES_PER_INTERVAL can not exceed 4294967295 -#endif - /* * Total number of Utils per Interval */ @@ -279,15 +256,6 @@ #error HS_UTIL_AVERAGE_NUM_INTERVAL can not exceed HS_UTIL_PEAK_NUM_INTERVAL #endif -/* - * Utilization Average Number of Intervals - */ -#if HS_UTIL_TIME_DIAG_ARRAY_POWER < 0 -#error HS_UTIL_TIME_DIAG_ARRAY_POWER cannot be less than 0 -#elif HS_UTIL_TIME_DIAG_ARRAY_POWER > 31 -#error HS_UTIL_TIME_DIAG_ARRAY_POWER can not exceed 31 -#endif - #ifndef HS_MISSION_REV #error HS_MISSION_REV must be defined! #elif (HS_MISSION_REV < 0) diff --git a/unit-test/hs_app_tests.c b/unit-test/hs_app_tests.c index 082af1c..a4457a7 100644 --- a/unit-test/hs_app_tests.c +++ b/unit-test/hs_app_tests.c @@ -1881,6 +1881,7 @@ void HS_ProcessCommands_Test(void) uint8 call_count_CFE_SB_ReceiveBuffer = 0; uint8 call_count_HS_AppPipe = 0; HS_EMTEntry_t EMTable[HS_MAX_MONITORED_EVENTS]; + uint8 call_count_HS_MonitorEvent; HS_AppData.CurrentEventMonState = HS_STATE_ENABLED; HS_AppData.EMTablePtr = EMTable; @@ -1927,7 +1928,7 @@ void HS_ProcessCommands_Test(void) UtAssert_True(call_count_HS_AppPipe == 1, "HS_AppPipe was called %u time(s), expected 1", call_count_HS_AppPipe); - uint8 call_count_HS_MonitorEvent = UT_GetStubCount(UT_KEY(HS_MonitorEvent)); + call_count_HS_MonitorEvent = UT_GetStubCount(UT_KEY(HS_MonitorEvent)); UtAssert_True(call_count_HS_MonitorEvent == 1, "HS_MonitorEvent was called %u time(s), expected 1", call_count_HS_MonitorEvent);