libxl: event tests: test_timedereg: Fix rc handling
authorIan Jackson <ian.jackson@eu.citrix.com>
Thu, 9 Jul 2015 17:16:25 +0000 (18:16 +0100)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Wed, 15 Jul 2015 10:40:44 +0000 (11:40 +0100)
In 31c836f4 "libxl: events: Permit timeouts to signal ao abort",
timeout callbacks take an extra rc argument.

In that patch the wrong assertion is made about the rc in
test_timedereg's `occurs' callback.  Fix this to make the test pass
again.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
tools/libxl/libxl_test_timedereg.c

index c46466348736e68f5203873af0bbbf31b3080ba5..a567db683901ce64a9c064b4260b91dc52efd596 100644 (file)
@@ -67,7 +67,7 @@ static void occurs(libxl__egc *egc, libxl__ev_time *ev,
     int off = ev - &et[0][0];
     LOG(DEBUG,"occurs[%d][%d] seq=%d rc=%d", off/NTIMES, off%NTIMES, seq, rc);
 
-    assert(!rc);
+    assert(rc == ERROR_TIMEDOUT);
 
     switch (seq) {
     case 0: