summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2017-02-28 10:04:55 +0100
committerWerner Koch <wk@gnupg.org>2017-02-28 10:06:15 +0100
commitf141fdee4015d36aec2122853ef55f3ae42197da (patch)
tree8b7cc35d3e0f07ea7d7ad0273f68b6925d5c7720 /tests
parentf27e516aabd27afeddecfde197eae1fd21a11395 (diff)
downloadlibgpg-error-f141fdee4015d36aec2122853ef55f3ae42197da.tar.gz
tests: New option --debug for t-poll.
* tests/t-poll.c (test_poll): Add option. Signed-off-by: Werner Koch <wk@gnupg.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/t-poll.c50
1 files changed, 50 insertions, 0 deletions
diff --git a/tests/t-poll.c b/tests/t-poll.c
index d39797a..ec79416 100644
--- a/tests/t-poll.c
+++ b/tests/t-poll.c
@@ -241,7 +241,57 @@ test_poll (void)
fail ("gpgrt_poll unexpectedly timed out\n");
continue;
}
+
show ("gpgrt_poll detected %d events\n", ret);
+ if (debug)
+ show ("gpgrt_poll: r=%d"
+ " 0:%c%c%c%c%c%c%c%c%c%c%c%c"
+ " 1:%c%c%c%c%c%c%c%c%c%c%c%c"
+ " 2:%c%c%c%c%c%c%c%c%c%c%c%c"
+ "\n",
+ ret,
+ fds[0].want_read? 'r':'-',
+ fds[0].want_write? 'w':'-',
+ fds[0].want_oob? 'o':'-',
+ fds[0].want_rdhup? 'h':'-',
+ fds[0].ignore? '!':'=',
+ fds[0].got_read? 'r':'-',
+ fds[0].got_write? 'w':'-',
+ fds[0].got_oob? 'o':'-',
+ fds[0].got_rdhup? 'h':'-',
+ fds[0].got_hup? 'H':' ',
+ fds[0].got_err? 'e':' ',
+ fds[0].got_nval? 'n':' ',
+
+ fds[1].want_read? 'r':'-',
+ fds[1].want_write? 'w':'-',
+ fds[1].want_oob? 'o':'-',
+ fds[1].want_rdhup? 'h':'-',
+ fds[1].ignore? '!':'=',
+ fds[1].got_read? 'r':'-',
+ fds[1].got_write? 'w':'-',
+ fds[1].got_oob? 'o':'-',
+ fds[1].got_rdhup? 'h':'-',
+ fds[1].got_hup? 'H':' ',
+ fds[1].got_err? 'e':' ',
+ fds[1].got_nval? 'n':' ',
+
+ fds[2].want_read? 'r':'-',
+ fds[2].want_write? 'w':'-',
+ fds[2].want_oob? 'o':'-',
+ fds[2].want_rdhup? 'h':'-',
+ fds[2].ignore? '!':'=',
+ fds[2].got_read? 'r':'-',
+ fds[2].got_write? 'w':'-',
+ fds[2].got_oob? 'o':'-',
+ fds[2].got_rdhup? 'h':'-',
+ fds[2].got_hup? 'H':' ',
+ fds[2].got_err? 'e':' ',
+ fds[2].got_nval? 'n':' '
+ );
+ else
+ show ("gpgrt_poll detected %d events\n", ret);
+
if (fds[0].got_read)
{
/* Read from the producer. */