dbLockTest: check additional recursive case

This commit is contained in:
Michael Davidsaver
2015-08-31 11:17:34 -04:00
parent 1587c44d79
commit 9331ca3f44

View File

@@ -216,6 +216,15 @@ static void testMultiLock(void)
testPtrOk1(testdbRecordPtr("recg")->lset->plockSet->owner,==,myself);
#endif
/* recursive locking of individual records is allowed */
dbScanLock(prec[0]);
testIntOk1(testdbRecordPtr("reca")->lset->plockSet->refcount,==,3);
dbScanUnlock(prec[0]);
/* recursive locking of dbScanLock isn't
* dbScanLockMany(plockA); <-- would fail
*/
dbScanUnlockMany(plockA);
testDiag("After locker unlocked");
@@ -407,9 +416,9 @@ static void testLinkNOP(void)
MAIN(dbLockTest)
{
#ifdef LOCKSET_DEBUG
testPlan(99);
testPlan(100);
#else
testPlan(87);
testPlan(88);
#endif
testSets();
testSingleLock();