unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* ERT, EPG, and GnuPG 2.4.*
@ 2023-08-26 20:21 Jens Schmidt
  0 siblings, 0 replies; only message in thread
From: Jens Schmidt @ 2023-08-26 20:21 UTC (permalink / raw)
  To: emacs-devel

Still working, slowly but steadily, on bug#63627, where one aspect is
to provide ERT tests for plstore.el.

Now GnuPG 2.4.* can suffer from GnuPG bug T6481, which would make any
ERT tests hang.  At least one GNU/Linux distribution provides patched
GnuPG versions 2.4.* that do not hang with Emacs, though.

I see the following options to avoid hangs during tests:

- Check GnuPG version and unconditionally skip tests for GnuPG 2.4.*.

- Control test execution by some external means (environment variable?)
  for GnuPG 2.4.*.

- Detect hanging GnuPG versions with some timeout logic along the
  lines of the following (which actually works):

    (let ((epg-pinentry-mode 'loopback))
      (make-thread
       (lambda ()
         (sit-for 1)
         (when-let ((process
                     (cl-find-if
                      (lambda (process)
                        (eq (process-filter process) #'epg--process-filter))
                      (process-list)))
                    ((eq (process-status process) 'run)))
           (kill-process process))))
      (with-temp-buffer
        (setq-local epa-file-encrypt-to '("test-key"))
        (write-region (point-min) (point-max) "test.gpg")))

What do you think?



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-08-26 20:21 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-26 20:21 ERT, EPG, and GnuPG 2.4.* Jens Schmidt

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).