git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@9232 35acf78f-673a-0410-8e92-d51de3d6d3f4
This commit is contained in:
parent
05b9eb5530
commit
8b133b8c18
|
@ -2202,7 +2202,7 @@ test_assert_sequence("ABCDE", "invalid sequence");]]></value>
|
||||||
<value>This test case verifies the priority boost of a thread waiting on a conditional variable queue. It tests this very specific situation in order to improve code coverage. The created threads perform the following operations: TA{lock(M2), lock(M1), wait(C1), unlock(M1), unlock(M2)}, TB{lock(M2), wait(C1), unlock(M2)}. TC{lock(M1), unlock(M1)}.</value>
|
<value>This test case verifies the priority boost of a thread waiting on a conditional variable queue. It tests this very specific situation in order to improve code coverage. The created threads perform the following operations: TA{lock(M2), lock(M1), wait(C1), unlock(M1), unlock(M2)}, TB{lock(M2), wait(C1), unlock(M2)}. TC{lock(M1), unlock(M1)}.</value>
|
||||||
</description>
|
</description>
|
||||||
<condition>
|
<condition>
|
||||||
<value />
|
<value>CH_CFG_USE_CONDVARS</value>
|
||||||
</condition>
|
</condition>
|
||||||
<various_code>
|
<various_code>
|
||||||
<setup_code>
|
<setup_code>
|
||||||
|
@ -2792,7 +2792,7 @@ test_wait_threads();]]></value>
|
||||||
<value>Timeout functionality is tested for chEvtWaitOneTimeout(), chEvtWaitAnyTimeout() and chEvtWaitAllTimeout().</value>
|
<value>Timeout functionality is tested for chEvtWaitOneTimeout(), chEvtWaitAnyTimeout() and chEvtWaitAllTimeout().</value>
|
||||||
</description>
|
</description>
|
||||||
<condition>
|
<condition>
|
||||||
<value />
|
<value>CH_CFG_USE_EVENTS_TIMEOUT</value>
|
||||||
</condition>
|
</condition>
|
||||||
<various_code>
|
<various_code>
|
||||||
<setup_code>
|
<setup_code>
|
||||||
|
@ -4139,12 +4139,14 @@ static THD_FUNCTION(bmk_thread4, p) {
|
||||||
chSysUnlock();
|
chSysUnlock();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if CH_CFG_USE_SEMAPHORES
|
||||||
static THD_FUNCTION(bmk_thread7, p) {
|
static THD_FUNCTION(bmk_thread7, p) {
|
||||||
|
|
||||||
(void)p;
|
(void)p;
|
||||||
while (!chThdShouldTerminateX())
|
while (!chThdShouldTerminateX())
|
||||||
chSemWait(&sem1);
|
chSemWait(&sem1);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static THD_FUNCTION(bmk_thread8, p) {
|
static THD_FUNCTION(bmk_thread8, p) {
|
||||||
|
|
||||||
|
|
|
@ -932,6 +932,7 @@ static const testcase_t test_005_008 = {
|
||||||
};
|
};
|
||||||
#endif /* CH_CFG_USE_CONDVARS */
|
#endif /* CH_CFG_USE_CONDVARS */
|
||||||
|
|
||||||
|
#if (CH_CFG_USE_CONDVARS) || defined(__DOXYGEN__)
|
||||||
/**
|
/**
|
||||||
* @page test_005_009 [5.9] Condition Variable priority boost test
|
* @page test_005_009 [5.9] Condition Variable priority boost test
|
||||||
*
|
*
|
||||||
|
@ -943,6 +944,12 @@ static const testcase_t test_005_008 = {
|
||||||
* unlock(M2)}, TB{lock(M2), wait(C1), unlock(M2)}. TC{lock(M1),
|
* unlock(M2)}, TB{lock(M2), wait(C1), unlock(M2)}. TC{lock(M1),
|
||||||
* unlock(M1)}.
|
* unlock(M1)}.
|
||||||
*
|
*
|
||||||
|
* <h2>Conditions</h2>
|
||||||
|
* This test is only executed if the following preprocessor condition
|
||||||
|
* evaluates to true:
|
||||||
|
* - CH_CFG_USE_CONDVARS
|
||||||
|
* .
|
||||||
|
*
|
||||||
* <h2>Test Steps</h2>
|
* <h2>Test Steps</h2>
|
||||||
* - [5.9.1] Reading current base priority.
|
* - [5.9.1] Reading current base priority.
|
||||||
* - [5.9.2] Thread A is created at priority P(+1), it locks M2, locks
|
* - [5.9.2] Thread A is created at priority P(+1), it locks M2, locks
|
||||||
|
@ -1023,6 +1030,7 @@ static const testcase_t test_005_009 = {
|
||||||
NULL,
|
NULL,
|
||||||
test_005_009_execute
|
test_005_009_execute
|
||||||
};
|
};
|
||||||
|
#endif /* CH_CFG_USE_CONDVARS */
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Exported data.
|
* Exported data.
|
||||||
|
@ -1052,7 +1060,9 @@ const testcase_t * const test_sequence_005[] = {
|
||||||
#if (CH_CFG_USE_CONDVARS) || defined(__DOXYGEN__)
|
#if (CH_CFG_USE_CONDVARS) || defined(__DOXYGEN__)
|
||||||
&test_005_008,
|
&test_005_008,
|
||||||
#endif
|
#endif
|
||||||
|
#if (CH_CFG_USE_CONDVARS) || defined(__DOXYGEN__)
|
||||||
&test_005_009,
|
&test_005_009,
|
||||||
|
#endif
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -406,6 +406,7 @@ static const testcase_t test_007_005 = {
|
||||||
test_007_005_execute
|
test_007_005_execute
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#if (CH_CFG_USE_EVENTS_TIMEOUT) || defined(__DOXYGEN__)
|
||||||
/**
|
/**
|
||||||
* @page test_007_006 [7.6] Events Flags wait timeouts
|
* @page test_007_006 [7.6] Events Flags wait timeouts
|
||||||
*
|
*
|
||||||
|
@ -413,6 +414,12 @@ static const testcase_t test_007_005 = {
|
||||||
* Timeout functionality is tested for chEvtWaitOneTimeout(),
|
* Timeout functionality is tested for chEvtWaitOneTimeout(),
|
||||||
* chEvtWaitAnyTimeout() and chEvtWaitAllTimeout().
|
* chEvtWaitAnyTimeout() and chEvtWaitAllTimeout().
|
||||||
*
|
*
|
||||||
|
* <h2>Conditions</h2>
|
||||||
|
* This test is only executed if the following preprocessor condition
|
||||||
|
* evaluates to true:
|
||||||
|
* - CH_CFG_USE_EVENTS_TIMEOUT
|
||||||
|
* .
|
||||||
|
*
|
||||||
* <h2>Test Steps</h2>
|
* <h2>Test Steps</h2>
|
||||||
* - [7.6.1] The functions are invoked first with TIME_IMMEDIATE
|
* - [7.6.1] The functions are invoked first with TIME_IMMEDIATE
|
||||||
* timeout, the timeout condition is tested.
|
* timeout, the timeout condition is tested.
|
||||||
|
@ -459,6 +466,7 @@ static const testcase_t test_007_006 = {
|
||||||
NULL,
|
NULL,
|
||||||
test_007_006_execute
|
test_007_006_execute
|
||||||
};
|
};
|
||||||
|
#endif /* CH_CFG_USE_EVENTS_TIMEOUT */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @page test_007_007 [7.7] Broadcasting using chEvtBroadcast()
|
* @page test_007_007 [7.7] Broadcasting using chEvtBroadcast()
|
||||||
|
@ -551,7 +559,9 @@ const testcase_t * const test_sequence_007[] = {
|
||||||
&test_007_003,
|
&test_007_003,
|
||||||
&test_007_004,
|
&test_007_004,
|
||||||
&test_007_005,
|
&test_007_005,
|
||||||
|
#if (CH_CFG_USE_EVENTS_TIMEOUT) || defined(__DOXYGEN__)
|
||||||
&test_007_006,
|
&test_007_006,
|
||||||
|
#endif
|
||||||
&test_007_007,
|
&test_007_007,
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
|
|
@ -112,12 +112,14 @@ static THD_FUNCTION(bmk_thread4, p) {
|
||||||
chSysUnlock();
|
chSysUnlock();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if CH_CFG_USE_SEMAPHORES
|
||||||
static THD_FUNCTION(bmk_thread7, p) {
|
static THD_FUNCTION(bmk_thread7, p) {
|
||||||
|
|
||||||
(void)p;
|
(void)p;
|
||||||
while (!chThdShouldTerminateX())
|
while (!chThdShouldTerminateX())
|
||||||
chSemWait(&sem1);
|
chSemWait(&sem1);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static THD_FUNCTION(bmk_thread8, p) {
|
static THD_FUNCTION(bmk_thread8, p) {
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue