From: Sebastian Harl Date: Fri, 25 Oct 2013 15:30:12 +0000 (+0200) Subject: channel_test: Updated timeout check according to latest changes. X-Git-Tag: sysdb-0.1.0~336^2~38 X-Git-Url: https://git.tokkee.org/?p=sysdb.git;a=commitdiff_plain;h=7883754015815be0be6df492000bb38d138548a6 channel_test: Updated timeout check according to latest changes. I.e. check errno rather than the return value. --- diff --git a/t/utils/channel_test.c b/t/utils/channel_test.c index 20fd454..02ed172 100644 --- a/t/utils/channel_test.c +++ b/t/utils/channel_test.c @@ -155,10 +155,13 @@ START_TEST(test_select) chan = sdb_channel_create(0, 1); + errno = 0; check = sdb_channel_select(chan, &data, NULL, NULL, NULL, &ts); - fail_unless(check == ETIMEDOUT, - "sdb_channel_select() = %i; expected: %i (ETIMEDOUT)", - check, ETIMEDOUT); + fail_unless(check < ETIMEDOUT, + "sdb_channel_select() = %i; expected: <0", check); + fail_unless(errno == ETIMEDOUT, + "sdb_channel_select() set errno to %i; expected: %i (ETIMEDOUT)", + errno, ETIMEDOUT); check = sdb_channel_select(chan, NULL, NULL, &data, NULL, NULL); fail_unless(! check, "sdb_channel_select() = %i; expected: 0", check);