unified/tests: Unlock the mutex exactly same time as it was locked

Since the mutex can not be unlocked if it is not locked, fix the test
and make sure that it unlocks the timer exactly same times as it locked
it before.

Change-Id: Ie29d308b789ed00f4fd3cf2faef3aa1f4bc89e3e
Signed-off-by: Dmitriy Korovkin <dmitriy.korovkin@windriver.com>
This commit is contained in:
Dmitriy Korovkin 2016-11-04 15:20:26 -04:00 committed by Benjamin Walsh
commit e0509bc79e

View file

@ -113,7 +113,7 @@ int microMutexLockUnlock(void)
timestamp / N_TEST_MUTEX,
SYS_CLOCK_HW_CYCLES_TO_NS_AVG(timestamp, N_TEST_MUTEX));
timestamp = TIME_STAMP_DELTA_GET(0);
for (i = 0; i <= N_TEST_MUTEX; i++) {
for (i = 0; i < N_TEST_MUTEX; i++) {
task_mutex_unlock(TEST_MUTEX);
}
timestamp = TIME_STAMP_DELTA_GET(timestamp);