After updating gnupg to 2.5.17 in pkgsrc I ran the self tests and noticed them hanging. The symptom is:
Making check in migrations GPG_AGENT_INFO= LC_ALL=C EXEEXT= PATH="../gpgscm:/tmp/security/gnupg2/work/.cwrapper/bin:/tmp/security/gnupg2/work/.buildlink/bin:/tmp/security/gnupg2/work/.gcc/bin:/tmp/security/gnupg2/work/.tools/bin:/usr/pkg/bin:/home/wiz/bin:/usr/local/bin:/usr/X11R7/bin:/bin:/usr/bin:/usr/pkg/bin:/usr/local/bin:/sbin:/usr/sbin:/usr/pkg/sbin:/usr/local/sbin:/usr/games:/usr/sbin:/usr/local/bin:/usr/pkg_bulk/bin:/root/.cargo/bin:/usr/pkg/bin:/usr/pkg/bin" abs_top_srcdir="/tmp/security/gnupg2/work/gnupg-2.5.17" objdir="/tmp/security/gnupg2/work/gnupg-2.5.17" GNUPG_BUILD_ROOT="/tmp/security/gnupg2/work/gnupg-2.5.17/tests" GNUPG_IN_TEST_SUITE=fact GPGSCM_PATH="/tmp/security/gnupg2/work/gnupg-2.5.17/tests/gpgscm" /tmp/security/gnupg2/work/gnupg-2.5.17/tests/gpgscm/gpgscm /tmp/security/gnupg2/work/gnupg-2.5.17/tests/migrations/run-tests.scm Testing a clean migration ...
and then nothing happens.
There are three gnupg related processes I found:
test 9517 0.0 0.0 18184 3196 pts/2 I+ 2:45PM 0:00.00 gpg --no-permission-warning --no-greeting --no-secmem-warning --batch --agent-program=/tmp/security/gnupg2/work/gnupg-2.5.17/agent/gpg-agent|--debug-quick-random --list-secret-keys test 16450 0.0 0.0 15644 3088 pts/2 I+ 2:45PM 0:00.07 /tmp/security/gnupg2/work/gnupg-2.5.17/tests/gpgscm/gpgscm /tmp/security/gnupg2/work/gnupg-2.5.17/tests/migrations/run-tests.scm test 27899 0.0 0.0 15652 3104 pts/2 I+ 2:45PM 0:00.02 gpgscm /tmp/security/gnupg2/work/gnupg-2.5.17/tests/migrations/from-classic.scm
In case it matters, this is on NetBSD 11.99.5/x86_64.
I also see hangs when running gpgme self tests or the notmuch configure script.