summaryrefslogtreecommitdiffstats
path: root/testsuites/validation/tr-mtx-seize-wait.c
diff options
context:
space:
mode:
Diffstat (limited to 'testsuites/validation/tr-mtx-seize-wait.c')
-rw-r--r--testsuites/validation/tr-mtx-seize-wait.c35
1 files changed, 24 insertions, 11 deletions
diff --git a/testsuites/validation/tr-mtx-seize-wait.c b/testsuites/validation/tr-mtx-seize-wait.c
index 367ca0da32..2e2fe9d1ec 100644
--- a/testsuites/validation/tr-mtx-seize-wait.c
+++ b/testsuites/validation/tr-mtx-seize-wait.c
@@ -3,11 +3,11 @@
/**
* @file
*
- * @ingroup RTEMSTestCaseScoreMtxReqSeizeWait
+ * @ingroup ScoreMtxReqSeizeWait
*/
/*
- * Copyright (C) 2021 embedded brains GmbH (http://www.embedded-brains.de)
+ * Copyright (C) 2021 embedded brains GmbH & Co. KG
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -56,16 +56,15 @@
#include "tr-tq-enqueue-ceiling.h"
#include "tr-tq-enqueue-deadlock.h"
#include "tr-tq-enqueue-fifo.h"
-#include "tr-tq-enqueue-mrsp.h"
#include "tr-tq-enqueue-priority-inherit.h"
#include "tr-tq-enqueue-priority.h"
#include <rtems/test.h>
/**
- * @defgroup RTEMSTestCaseScoreMtxReqSeizeWait spec:/score/mtx/req/seize-wait
+ * @defgroup ScoreMtxReqSeizeWait spec:/score/mtx/req/seize-wait
*
- * @ingroup RTEMSTestSuiteTestsuitesValidationNoClock0
+ * @ingroup TestsuitesValidationNoClock0
*
* @{
*/
@@ -92,24 +91,24 @@ typedef struct {
* @brief If this member is true, then the calling thread shall be the owner
* of the mutex.
*/
- bool owner_caller;;
+ bool owner_caller;
/**
* @brief If this member is true, then a thread other than the calling thread
* shall be the owner of the mutex.
*/
- bool owner_other;;
+ bool owner_other;
/**
* @brief If this member is true, then a deadlock shall occur.
*/
- bool deadlock;;
+ bool deadlock;
/**
* @brief This member contains the current priority of the calling thread
* before the directive call.
*/
- rtems_task_priority priority_before;;
+ rtems_task_priority priority_before;
/**
* @brief This member contains the owner of the mutex after the directive
@@ -121,7 +120,7 @@ typedef struct {
* @brief This member contains the current priority of the calling thread
* after the directive call.
*/
- rtems_task_priority priority_after;;
+ rtems_task_priority priority_after;
/**
* @brief This member contains a copy of the corresponding
@@ -218,6 +217,10 @@ static const char * const * const ScoreMtxReqSeizeWait_PreDesc[] = {
NULL
};
+#if defined(RTEMS_SMP)
+#include "tr-tq-enqueue-mrsp.h"
+#endif
+
typedef ScoreMtxReqSeizeWait_Context Context;
static Status_Control Status( const Context *ctx, Status_Control status )
@@ -707,7 +710,7 @@ static void ScoreMtxReqSeizeWait_Post_Enqueued_Check(
case ScoreMtxReqSeizeWait_Post_Enqueued_PriorityInherit: {
/*
- * The calling thread shall be enqueued in priority order with priorit
+ * The calling thread shall be enqueued in priority order with priority
* inheritance.
*/
ScoreTqReqEnqueuePriorityInherit_Run( &ctx->tq_ctx->base );
@@ -728,7 +731,11 @@ static void ScoreMtxReqSeizeWait_Post_Enqueued_Check(
* The calling thread shall be enqueued in priority order according to
* the MrsP locking protocol.
*/
+ #if defined(RTEMS_SMP)
ScoreTqReqEnqueueMrsp_Run( &ctx->tq_ctx->base );
+ #else
+ T_unreachable();
+ #endif
break;
}
@@ -1072,6 +1079,11 @@ static void ScoreMtxReqSeizeWait_TestVariant(
static T_fixture_node ScoreMtxReqSeizeWait_Node;
+static T_remark ScoreMtxReqSeizeWait_Remark = {
+ .next = NULL,
+ .remark = "ScoreMtxReqSeizeWait"
+};
+
void ScoreMtxReqSeizeWait_Run( TQMtxContext *tq_ctx )
{
ScoreMtxReqSeizeWait_Context *ctx;
@@ -1133,6 +1145,7 @@ void ScoreMtxReqSeizeWait_Run( TQMtxContext *tq_ctx )
}
}
+ T_add_remark( &ScoreMtxReqSeizeWait_Remark );
T_pop_fixture();
}