Statistics
| Branch: | Tag: | Revision:

root / test / hs / Test / Ganeti / Locking @ cf7f8e51

Name Size
Allocation.hs 13.6 kB
Locks.hs 2.2 kB

Latest revisions

# Date Author Comment
cf7f8e51 03/04/2014 02:27 pm Klaus Aehlig

Verify implication restriction on locks

As specified in our design, if A is a group lock and B
belongs to A, then A must be earlier in the lock order
than B. Verify this property.

Signed-off-by: Klaus Aehlig <>
Reviewed-by: Petr Pudlak <>

2e1399da 03/04/2014 02:27 pm Klaus Aehlig

Update Arbitrary GanetiLocks

With the extension of Ganeti.Locking.Locks.GanetiLocks to the
full lock hierarchy, also extend the instantiation of Arbitrary.

Signed-off-by: Klaus Aehlig <>
Reviewed-by: Petr Pudlak <>

e3b02e1f 02/26/2014 06:23 pm Klaus Aehlig

Verify serialization/deserialization consistency for Locks

As we made Ganeti.Locking.Locks an instance of JSON, we better verify
that we can readJSON what we showJSON.

Signed-off-by: Klaus Aehlig <>
Reviewed-by: Petr Pudlak <>

89d140d1 02/26/2014 06:23 pm Klaus Aehlig

Add test for serialization of LockAllocation

Verify readJSON . showJSON = Ok for LockAllocations.

Signed-off-by: Klaus Aehlig <>
Reviewed-by: Petr Pudlak <>

13caa61d 02/21/2014 02:14 pm Klaus Aehlig

Verify the result of opportunistic union

Verify that the result returned by the opportunistic union correctly
reflects the state change: locks not in the result are not changed,
locks in the result are as requested.

Signed-off-by: Klaus Aehlig <>...

fb68bc0c 02/21/2014 02:14 pm Klaus Aehlig

Verify that opportunistic union only adds to the locks held

Add a test verifying that by opportunistic union the set of locks
held, and the level at which the locks are held, only increases.

Signed-off-by: Klaus Aehlig <>
Reviewed-by: Petr Pudlak <>

9f9c4543 02/21/2014 02:14 pm Klaus Aehlig

Use opportunisticUnion in Arbitrary LockAllocation

Also allow the newly exported function opportunisticLockUnion in the
construction of arbitrary lock allocations.

Signed-off-by: Klaus Aehlig <>
Reviewed-by: Petr Pudlak <>

07eec0fc 02/21/2014 02:14 pm Klaus Aehlig

Generate arbitrary :: LockAllocation according to interface

While we know that freeLocks and intersectLocks are defined in terms
of updateLocks, it is still cleaner to test against the interface: the
module Ganeti.Locking.Allocation exports several functions, and all...

277c969f 02/19/2014 03:45 pm Klaus Aehlig

Add a test verifying that lock-implication is honored

Locks can be included in one another. This inclusion can be violated
in two ways, viz.,
- A holds a lock L and B holds an exclusive lock L belongs to, and
- A holds an exclusive lock and B holds a lock L belongs to....

64df329d 02/19/2014 03:45 pm Klaus Aehlig

Verify that every owner mentioned as blocking actually is

If a request is blocked by multiple lock owners, verify that each
single one of them actually blocks the request. In other words,
verify that, whenever all but one release their lock, the request
still does not succeed....

View revisions

Also available in: Atom