diff options
author | Werner Koch <[email protected]> | 2017-02-28 09:04:55 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2017-02-28 09:06:15 +0000 |
commit | f141fdee4015d36aec2122853ef55f3ae42197da (patch) | |
tree | 8b7cc35d3e0f07ea7d7ad0273f68b6925d5c7720 | |
parent | Improve tracing of estream. (diff) | |
download | libgpg-error-f141fdee4015d36aec2122853ef55f3ae42197da.tar.gz libgpg-error-f141fdee4015d36aec2122853ef55f3ae42197da.zip |
tests: New option --debug for t-poll.
* tests/t-poll.c (test_poll): Add option.
Signed-off-by: Werner Koch <[email protected]>
-rw-r--r-- | doc/errorref.txt | 2 | ||||
-rw-r--r-- | tests/t-poll.c | 50 |
2 files changed, 52 insertions, 0 deletions
diff --git a/doc/errorref.txt b/doc/errorref.txt index 4bc0ebb..284123b 100644 --- a/doc/errorref.txt +++ b/doc/errorref.txt @@ -201,6 +201,8 @@ GPG_ERR_TRUSTDB Trust DB error GPG_ERR_BAD_CERT Bad certificate + NTBTLS: - No subject found in the certifciate. + GPG_ERR_INV_USER_ID Invalid user ID 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. */ |