altstack: Clarify checking macros
authorDavid Gibson <david@gibson.dropbear.id.au>
Mon, 15 Feb 2016 11:49:54 +0000 (22:49 +1100)
committerDavid Gibson <david@gibson.dropbear.id.au>
Mon, 15 Feb 2016 11:49:54 +0000 (22:49 +1100)
commit11af31c336a4791a981c602b99dc52e2af5fa09b
treec14c7ca729b0d8a2ea9380775c30ffb2b4a5210d
parentdd3f80c16c4d7767777fc58face6394feb3e38cb
altstack: Clarify checking macros

The chkfail() and chkok() macros in altstack's test program are pretty
difficult to read.  More importantly, though, they do all their tests with
one big ok1().  That means if the test fails, you get no indication which
of the checks was actually wrong, making debugging harder.

This reworks the macros into a more verbose form that's easier to read,
and splits them into multiple ok1() tests to make failures more explicit.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
ccan/altstack/test/run.c