From 9331ca3f44b8f1992f3f4d580f33614e72760d0a Mon Sep 17 00:00:00 2001 From: Michael Davidsaver Date: Mon, 31 Aug 2015 11:17:34 -0400 Subject: [PATCH] dbLockTest: check additional recursive case --- src/ioc/db/test/dbLockTest.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/ioc/db/test/dbLockTest.c b/src/ioc/db/test/dbLockTest.c index c51481d0d..04331267c 100644 --- a/src/ioc/db/test/dbLockTest.c +++ b/src/ioc/db/test/dbLockTest.c @@ -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();