summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 57e2d57)
raw | patch | inline | side by side (parent: 57e2d57)
author | Sebastian Harl <sh@tokkee.org> | |
Fri, 25 Oct 2013 15:30:12 +0000 (17:30 +0200) | ||
committer | Sebastian Harl <sh@tokkee.org> | |
Fri, 25 Oct 2013 15:30:12 +0000 (17:30 +0200) |
I.e. check errno rather than the return value.
t/utils/channel_test.c | patch | blob | history |
diff --git a/t/utils/channel_test.c b/t/utils/channel_test.c
index 20fd4543c4360fdbb2b1f473ce2a7ac517f448eb..02ed172a42ace53f1090e2b18379246681fe6774 100644 (file)
--- a/t/utils/channel_test.c
+++ b/t/utils/channel_test.c
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);