| Branch: | Tag: | Revision:

root / htest / Test / Ganeti @ 4c49b965

Name Size
Attoparsec.hs 2 kB
BasicTypes.hs 5.1 kB
Common.hs 4.8 kB
Daemon.hs 2.5 kB
Errors.hs 1.3 kB
JSON.hs 1.8 kB
Jobs.hs 989 Bytes
Luxi.hs 5.7 kB
Objects.hs 7.8 kB
OpCodes.hs 21.9 kB
Rpc.hs 2.7 kB
Ssconf.hs 1.3 kB
THH.hs 2 kB
TestCommon.hs 8 kB
TestHTools.hs 4.5 kB
TestHelper.hs 4.7 kB 149 Bytes
Types.hs 11.9 kB
Utils.hs 8.6 kB

Latest revisions

# Date Author Comment
4c49b965 12/06/2012 02:29 pm Guido Trotter

make genMaybe more Just

There is a common conception that Just something is more worth than
Nothing. So we're biasing our tests towards that. As such let's generate
Nothing fewer times, and Just subgen more times. The values were copied
from the "official" maybe generator....

3516b09a 12/06/2012 11:15 am Iustin Pop

Fix build breakage in Jobs.hs test code

Commit 3bdbe4b3 (“Jobs.hs: move OpStatus and JobStatus ADTs to
Types.hs”) removed the TemplateHaskell language pragma from
htest/Test/Ganeti/Jobs.hs due to a hlint warning, but that is bad: it
means the testSuite call is no longer interpreted as a splice, so it results in:...

3bdbe4b3 12/05/2012 09:03 pm Dato Simó

Jobs.hs: move OpStatus and JobStatus ADTs to Types.hs

This leaves Ganeti/Jobs.hs and Test/Ganeti/Jobs.hs empty, but they're the
target of a future move of some functions, so we leave them around, and
don't delete them, to avoid unnecessary delete/create diffs....

8e6623c8 12/04/2012 06:46 pm Guido Trotter

Add Ganeti.HTools.Graph

This module implements some algorithms on Data.Graph data structures.
At the moment its main functionality is an LF-color implementation
(greedy coloring in descending order of degree). There are also a few
extra functions to calculate the degree order, and convert the node to...

742bd043 12/04/2012 06:46 pm Guido Trotter

Add Dsatur implementation

Implement the Dsatur algorithm for Graph coloring. This also abstracts
the neighColors function into two subfunctions that this algorithm can

Signed-off-by: Guido Trotter <>
Reviewed-by: Iustin Pop <>

faef859e 12/04/2012 06:46 pm Guido Trotter

Ganeti/HTools/Graph Add isColorable

Check whether coloring on a given graph makes sense. This is the case
only if there are no loops and the graph is undirected.

Signed-off-by: Guido Trotter <>
Reviewed-by: Iustin Pop <>

34a21cc4 12/04/2012 06:46 pm Guido Trotter

Add tests for verticesByDegree{Asc,Desc}

This brings our coverage of Graph.hs to 100%

Signed-off-by: Guido Trotter <>
Reviewed-by: Iustin Pop <>

dae1f9cb 12/04/2012 06:46 pm Guido Trotter

HTools/Node: add mkNodeGraph function

This function helps treating node node problems as graph problems.
It can transform a list of nodes plus a list of instances into a graph
which uses the nodes as vertices, and instances as edges connecting them
(as long as they have both a primary and a secondary node)...

8b50de5c 12/04/2012 06:46 pm Guido Trotter

Fix Dsatur and add Dcolor

Our Dsatur implementation was incorrect: while the paper defined the
degree of saturation of a vertex as the number of different colors it is
adjacent to, we were using the number of colors, without considering
uniqueness. This effectively implemented a different algorithm, which is...

c94f9990 12/04/2012 06:46 pm Guido Trotter

Add "proper coloring" unittest check

We have to check that for each edge its vertices have different colors.

This is very easy to do with a vertex-to-color map, but not so easy with
a color-to-vertex one. Since all our coloring algorithms created a
vertex-to-color map behind the scenes and then converted it, we flip...

View revisions

Also available in: Atom