2007-09-02 00:52:40 +02:00
|
|
|
|
|
|
|
|
TESTING "Locking" ./test-locking
|
|
|
|
|
|
2008-08-09 09:33:14 +02:00
|
|
|
TEST "mutex section" mutexsection <<END
|
|
|
|
|
out: mutex locked section 1
|
|
|
|
|
out: mutex locked section 2
|
|
|
|
|
END
|
|
|
|
|
|
|
|
|
|
|
2007-09-02 17:52:30 +02:00
|
|
|
TEST "mutex not unlocked asserts" mutexforgotunlock <<END
|
|
|
|
|
return: 134
|
|
|
|
|
END
|
|
|
|
|
|
2009-01-25 14:39:18 +01:00
|
|
|
TEST "mutex explicitly unlocked" mutexexplicitunlock <<END
|
|
|
|
|
return: 0
|
|
|
|
|
END
|
|
|
|
|
|
2007-09-02 17:52:30 +02:00
|
|
|
|
2008-08-09 09:33:14 +02:00
|
|
|
TEST "nested mutex section" nestedmutexsection <<END
|
|
|
|
|
out: outer mutex locked section
|
|
|
|
|
out: inner mutex locked section
|
|
|
|
|
END
|
2008-08-09 13:44:34 +02:00
|
|
|
|
|
|
|
|
|
2008-09-16 00:45:05 +02:00
|
|
|
TEST "chained mutex section" chainedmutexsection <<END
|
2009-02-12 02:38:58 +01:00
|
|
|
out: ^outer mutex locked section
|
2008-09-16 00:45:05 +02:00
|
|
|
out: inner but not outer mutex locked section
|
|
|
|
|
END
|
|
|
|
|
|
|
|
|
|
|
2008-09-27 04:19:43 +02:00
|
|
|
TEST "recursive mutex section" recursivemutexsection <<END
|
2009-01-25 14:39:18 +01:00
|
|
|
out: recmutex locked once
|
|
|
|
|
out: recmutex locked twice
|
2008-09-27 04:19:43 +02:00
|
|
|
END
|