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
|
|
|
|
|
|
|
|
|
|
|
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
|
|
|
|
|
out: mutex locked once
|
|
|
|
|
out: mutex locked twice
|
|
|
|
|
END
|
|
|
|
|
|
|
|
|
|
|
2008-08-09 13:44:34 +02:00
|
|
|
TEST "rwlock section" rwlocksection <<END
|
|
|
|
|
out: write locked section 1
|
|
|
|
|
out: read locked section 2
|
|
|
|
|
END
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
TEST "rwlock not unlocked asserts" rwlockforgotunlock <<END
|
|
|
|
|
return: 134
|
|
|
|
|
END
|
2008-08-10 05:54:45 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
TEST "condition not unlocked asserts" conditionforgotunlock <<END
|
|
|
|
|
return: 134
|
|
|
|
|
END
|
|
|
|
|
|
|
|
|
|
TEST "condition section" conditionsection <<END
|
|
|
|
|
out: condition locked section 1
|
|
|
|
|
out: condition locked section 2
|
|
|
|
|
END
|
|
|
|
|
|
|
|
|
|
PLANNED "condition signaling" <<END
|
|
|
|
|
END
|
|
|
|
|
|
|
|
|
|
PLANNED "condition broadcasting" <<END
|
|
|
|
|
END
|
|
|
|
|
|
|
|
|
|
|