emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

ERT, EPG, and GnuPG 2.4.*


From: Jens Schmidt
Subject: ERT, EPG, and GnuPG 2.4.*
Date: Sat, 26 Aug 2023 22:21:35 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.14.0

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?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]