This is the basic deadlock detection test, and it is set up as follows:
Test 2: Simple Compatibility Groups.
This test tests to see if more than one Xact can enter the same locked queue. the compatability groups followed the chart exactly. If there was someone waiting, then even though the new request is compatible with the current lock mode, it was put on the wait queue.
Test 3: Waiting Compatibility Groups.
This test checks to see if a group of Xact's in the waiting queue are correctly handled when they are awakened. The result is that the first group of compatible lock types is taken off the queue, and every Xact after the first non-compatible waiter stays in the wait queue. Test 4: Upgrades and Deadlock
This test makes sure that two people in the same locked queue can not both do upgrades. The second request causes a Restart error which is the correct action. This tricky test was not obvious, but it works.
Test 6: Error returns
This test makes sure that all error returns unlock the Lock_Table. The only ones which may have been a problem were in upgrade because it is the only highest level call which has multiple returns. Each return is preceded by an unlock call so the tests all suceeded.
Test 7: Many Locked pages test
This test tests that the internal memory system does not fail under heavy traffic. It simply grabs 9 locks on 9 different pages done by 4 transaction, resulting in 36 locked pages. It took a long time, but nothing died. After each transaction did an unlockall, simulating commits, all lock_queues were empty, and the lock mode on each page was None.