[Pkg-gnupg-commit] [libgpg-error] 19/29: tests: New option --debug for t-poll.

Daniel Kahn Gillmor dkg at fifthhorseman.net
Sun Mar 5 00:41:34 UTC 2017


This is an automated email from the git hooks/post-receive script.

dkg pushed a commit to branch master
in repository libgpg-error.

commit f141fdee4015d36aec2122853ef55f3ae42197da
Author: Werner Koch <wk at gnupg.org>
Date:   Tue Feb 28 10:04:55 2017 +0100

    tests: New option --debug for t-poll.
    
    * tests/t-poll.c (test_poll): Add option.
    
    Signed-off-by: Werner Koch <wk at gnupg.org>
---
 doc/errorref.txt |  2 ++
 tests/t-poll.c   | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 52 insertions(+)

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.  */

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gnupg/libgpg-error.git



More information about the Pkg-gnupg-commit mailing list