Commit f2034496 authored by Swann Perarnau's avatar Swann Perarnau
Browse files

Fix the G5k tests to avoid false negatives

regression.sh can fail when the g5k tests are passing, simply because
the main code gets notified of group creation in the wrong order.

This commit change the suite to NAK on exit code errors instead of
outputs to try to fix this problem.

This is a temporary fix at best, we should instead improve the tests so
that the validation is more thorough, and results in crashes when
something wrong happens.

Related to issue #2.
parent 5728c663
...@@ -81,8 +81,9 @@ echo ...@@ -81,8 +81,9 @@ echo
echo echo
echo -- Testing replication : echo -- Testing replication :
time tests/grid5kSlowGrouptest.py --host-list A,A,A,A > regression/grid5kSlowGrouptest_test time tests/grid5kSlowGrouptest.py --host-list A,A,A,A > regression/grid5kSlowGrouptest_test
status=$?
echo echo
if diff <( sed '/{.*}/d' <(sed "/to wait/d" <(sort regression/grid5kSlowGrouptest_test))) <( sed '/{.*}/d' <(sed "/to wait/d" <(sort regression/grid5kSlowGrouptest_base))) if [ $status -eq 0 ]
then then
echo Replication OK echo Replication OK
rm regression/grid5kSlowGrouptest_test rm regression/grid5kSlowGrouptest_test
...@@ -95,8 +96,9 @@ echo ...@@ -95,8 +96,9 @@ echo
echo echo
echo -- Testing replication and routing : echo -- Testing replication and routing :
time tests/grid5kGrouptest.py --host-list A,A,A,A > regression/grid5kGrouptest_test time tests/grid5kGrouptest.py --host-list A,A,A,A > regression/grid5kGrouptest_test
status=$?
echo echo
if diff <( sed '/{.*}/d' <(sed "/to wait/d" <(sort regression/grid5kGrouptest_test))) <( sed '/{.*}/d' <(sed "/to wait/d" <(sort regression/grid5kGrouptest_base))) if [ $status -eq 0 ]
then then
echo Replication and routing OK echo Replication and routing OK
rm regression/grid5kGrouptest_test rm regression/grid5kGrouptest_test
......
...@@ -24,7 +24,7 @@ class Grid5000GroupTest(FrameworkControler): ...@@ -24,7 +24,7 @@ class Grid5000GroupTest(FrameworkControler):
self.groups = dict() self.groups = dict()
def dead_nodes(self, rank, ID, nodes) : def dead_nodes(self, rank, ID, nodes) :
flushprint("dead nodes [ from rank {} ID {}] {}".format(rank, ID, nodes)) assert False, "dead nodes [ from rank {} ID {}] {}".format(rank, ID, nodes)
def ping_receive(self, txt) : def ping_receive(self, txt) :
self.to_wait_pings -= 1 self.to_wait_pings -= 1
......
...@@ -12,7 +12,7 @@ class Grid5000SlowGroupTest(FrameworkControler): ...@@ -12,7 +12,7 @@ class Grid5000SlowGroupTest(FrameworkControler):
self.groups = dict() self.groups = dict()
def dead_nodes(self, rank, ID, nodes) : def dead_nodes(self, rank, ID, nodes) :
print("dead nodes [ from rank {} ID {}] {}".format(rank, ID, nodes)) assert False, "dead nodes [ from rank {} ID {}] {}".format(rank, ID, nodes)
def ping_receive(self, txt) : def ping_receive(self, txt) :
print(txt) print(txt)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment