[Pkg-gnupg-commit] [gpgme] 382/412: qt: Add debug output for testTofuPolicy

Daniel Kahn Gillmor dkg at fifthhorseman.net
Thu Sep 22 21:27:24 UTC 2016


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

dkg pushed a commit to branch master
in repository gpgme.

commit d438cb59a068b6f076e6bd70d3a2c46bc05ccb5c
Author: Andre Heinecke <aheinecke at intevation.de>
Date:   Mon Sep 19 10:01:19 2016 +0200

    qt: Add debug output for testTofuPolicy
    
    * lang/qt/tests/t-tofuinfo.cpp (testTofuPolicy): Add
    debug output.
    
    --
    The debug output is only emitted before a failure of the
    test in case a keylisting of bravo at example.net fails which
    it should never do.
---
 lang/qt/tests/t-tofuinfo.cpp | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/lang/qt/tests/t-tofuinfo.cpp b/lang/qt/tests/t-tofuinfo.cpp
index f40bf21..d76ff7b 100644
--- a/lang/qt/tests/t-tofuinfo.cpp
+++ b/lang/qt/tests/t-tofuinfo.cpp
@@ -299,6 +299,26 @@ private Q_SLOTS:
         auto result = job->exec(QStringList() << QStringLiteral("bravo at example.net"),
                                                  false, keys);
 
+        if (keys.empty()) {
+            qDebug() << "bravo at example.net not found";
+            qDebug() << "Error: " << result.error().asString();
+            const auto homedir = QString::fromLocal8Bit(qgetenv("GNUPGHOME"));
+            qDebug() << "Homedir is: " << homedir;
+            QFileInfo fi(homedir + "/pubring.gpg");
+            qDebug () << "pubring exists: " << fi.exists() << " readable? "
+                      << fi.isReadable() << " size: " << fi.size();
+            QFileInfo fi2(homedir + "/pubring.kbx");
+            qDebug () << "keybox exists: " << fi2.exists() << " readable? "
+                      << fi2.isReadable() << " size: " << fi2.size();
+
+            result = job->exec(QStringList(), false, keys);
+            foreach (const auto key, keys) {
+                qDebug() << "Key: " << key.userID(0).name() << " <"
+                         << key.userID(0).email()
+                         << ">\n fpr: " << key.primaryFingerprint();
+            }
+        }
+        Q_ASSERT(!result.error());
         Q_ASSERT(!keys.empty());
         auto key = keys[0];
         Q_ASSERT(!key.isNull());

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



More information about the Pkg-gnupg-commit mailing list