Refactor rlib2 unit tests
This huge patch removes a lot of cruft that has been accumulated in therlib2 test file. A new class, RAPITestCase, provides a common base forall the tests and unifies checks that were repeated on a per-test-casebasis.
Signed-off-by: Hrvoje Ribicic <riba@google.com>...
Merge branch 'stable-2.11' into master
Verify: liftM extRepr . readJSON . showJSON = Ok . extRepr
In other words, verify that for LockWaiting, the JSON encodingcan be decoded correctly up to observable indistinguishability.
Signed-off-by: Klaus Aehlig <aehlig@google.com>Reviewed-by: Petr Pudlak <pudlak@google.com>
Verify readJSON . showJSON = Ok for LockRequest
Verify that the JSON encoding of a LockRequest can correctlybe decoded.
Verify extRepr-equal states are equal on updateLocksWaiting
Add a test that verifies that extRepr-equal states cannot bedistinguished by updateLocksWaiting-transitions. To obtainextRepr-equal states, we compare each state to the one computedfrom its extensional representation....
Verify that extRepr-equal states behave equal on updateLocks
Add a test that verifies that extRepr-equal states cannot bedistinguished by updateLocks-transitions. To obtain extRepr-equalstates, we compare each state to the one computed from itsextensional representation....
Verify decoding from extensional representation is sound
Verify that, on the image of extRepr, it holds extRepr . fromExtrRepr = id.In other words, verify that when obtain a lock waiting from an extensionalrepresentation, it has the same extensional representation....
Verify that all pending requests are justified
If a request is pending in a lock waiting structure, it has to fulfilltwo properties:- It must be a valid request, not violating any lock order requirements, and- it must not be possible to fulfill it immediately....
Verify soundness of notifications
Verify that, if a lock owner gets notified, he- had a pending request, and- the request is fulfilled now.
Strengthen progress property in lock waiting
Not only verify that after the blockers for one pending requesthave gone, some request was honored, but also verify that it wasnot a request by one of the blockers.
Signed-off-by: Klaus Aehlig <aehlig@google.com>...
View revisions
Also available in: Atom