summaryrefslogtreecommitdiffstats
path: root/testsuites/validation/tc-barrier-create.c
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2021-05-06 15:15:28 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2021-05-07 07:44:07 +0200
commit9f727f937965ee3e7bd07c5af5ee48aafa59eaf8 (patch)
treeba0f5939470b4bd735b1e0d4277042ea0fa6d397 /testsuites/validation/tc-barrier-create.c
parentc46d125569a215226602a7d4b9c346ee074fe365 (diff)
downloadrtems-9f727f937965ee3e7bd07c5af5ee48aafa59eaf8.tar.bz2
validation: Fix handling of N/A pre-conditions
In the action requirements, some pre-conditions are not applicable depending on the state of other pre-conditions. There is no particular order in the pre-conditions, so we have to check the N/A status individually.
Diffstat (limited to 'testsuites/validation/tc-barrier-create.c')
-rw-r--r--testsuites/validation/tc-barrier-create.c53
1 files changed, 3 insertions, 50 deletions
diff --git a/testsuites/validation/tc-barrier-create.c b/testsuites/validation/tc-barrier-create.c
index 436030ef84..46d013ec9e 100644
--- a/testsuites/validation/tc-barrier-create.c
+++ b/testsuites/validation/tc-barrier-create.c
@@ -678,7 +678,6 @@ static inline RtemsBarrierReqCreate_Entry RtemsBarrierReqCreate_GetEntry(
T_TEST_CASE_FIXTURE( RtemsBarrierReqCreate, &RtemsBarrierReqCreate_Fixture )
{
RtemsBarrierReqCreate_Context *ctx;
- RtemsBarrierReqCreate_Entry entry;
size_t index;
ctx = T_fixture_context();
@@ -690,75 +689,30 @@ T_TEST_CASE_FIXTURE( RtemsBarrierReqCreate, &RtemsBarrierReqCreate_Fixture )
ctx->pcs[ 0 ] < RtemsBarrierReqCreate_Pre_Name_NA;
++ctx->pcs[ 0 ]
) {
- entry = RtemsBarrierReqCreate_GetEntry( index );
-
- if ( entry.Pre_Name_NA ) {
- ctx->pcs[ 0 ] = RtemsBarrierReqCreate_Pre_Name_NA;
- index += ( RtemsBarrierReqCreate_Pre_Name_NA - 1 )
- * RtemsBarrierReqCreate_Pre_Id_NA
- * RtemsBarrierReqCreate_Pre_Class_NA
- * RtemsBarrierReqCreate_Pre_MaxWait_NA
- * RtemsBarrierReqCreate_Pre_Free_NA;
- }
-
for (
ctx->pcs[ 1 ] = RtemsBarrierReqCreate_Pre_Id_Valid;
ctx->pcs[ 1 ] < RtemsBarrierReqCreate_Pre_Id_NA;
++ctx->pcs[ 1 ]
) {
- entry = RtemsBarrierReqCreate_GetEntry( index );
-
- if ( entry.Pre_Id_NA ) {
- ctx->pcs[ 1 ] = RtemsBarrierReqCreate_Pre_Id_NA;
- index += ( RtemsBarrierReqCreate_Pre_Id_NA - 1 )
- * RtemsBarrierReqCreate_Pre_Class_NA
- * RtemsBarrierReqCreate_Pre_MaxWait_NA
- * RtemsBarrierReqCreate_Pre_Free_NA;
- }
-
for (
ctx->pcs[ 2 ] = RtemsBarrierReqCreate_Pre_Class_Default;
ctx->pcs[ 2 ] < RtemsBarrierReqCreate_Pre_Class_NA;
++ctx->pcs[ 2 ]
) {
- entry = RtemsBarrierReqCreate_GetEntry( index );
-
- if ( entry.Pre_Class_NA ) {
- ctx->pcs[ 2 ] = RtemsBarrierReqCreate_Pre_Class_NA;
- index += ( RtemsBarrierReqCreate_Pre_Class_NA - 1 )
- * RtemsBarrierReqCreate_Pre_MaxWait_NA
- * RtemsBarrierReqCreate_Pre_Free_NA;
- }
-
for (
ctx->pcs[ 3 ] = RtemsBarrierReqCreate_Pre_MaxWait_Zero;
ctx->pcs[ 3 ] < RtemsBarrierReqCreate_Pre_MaxWait_NA;
++ctx->pcs[ 3 ]
) {
- entry = RtemsBarrierReqCreate_GetEntry( index );
-
- if ( entry.Pre_MaxWait_NA ) {
- ctx->pcs[ 3 ] = RtemsBarrierReqCreate_Pre_MaxWait_NA;
- index += ( RtemsBarrierReqCreate_Pre_MaxWait_NA - 1 )
- * RtemsBarrierReqCreate_Pre_Free_NA;
- }
-
for (
ctx->pcs[ 4 ] = RtemsBarrierReqCreate_Pre_Free_Yes;
ctx->pcs[ 4 ] < RtemsBarrierReqCreate_Pre_Free_NA;
++ctx->pcs[ 4 ]
) {
- entry = RtemsBarrierReqCreate_GetEntry( index );
-
- if ( entry.Pre_Free_NA ) {
- ctx->pcs[ 4 ] = RtemsBarrierReqCreate_Pre_Free_NA;
- index += ( RtemsBarrierReqCreate_Pre_Free_NA - 1 );
- }
+ RtemsBarrierReqCreate_Entry entry;
- if ( entry.Skip ) {
- ++index;
- continue;
- }
+ entry = RtemsBarrierReqCreate_GetEntry( index );
+ ++index;
RtemsBarrierReqCreate_Pre_Name_Prepare( ctx, ctx->pcs[ 0 ] );
RtemsBarrierReqCreate_Pre_Id_Prepare( ctx, ctx->pcs[ 1 ] );
@@ -771,7 +725,6 @@ T_TEST_CASE_FIXTURE( RtemsBarrierReqCreate, &RtemsBarrierReqCreate_Fixture )
RtemsBarrierReqCreate_Post_Class_Check( ctx, entry.Post_Class );
RtemsBarrierReqCreate_Post_IdVar_Check( ctx, entry.Post_IdVar );
RtemsBarrierReqCreate_Cleanup( ctx );
- ++index;
}
}
}