Kill gpg agent in package-test.el to avoid a race
authorRob Browning <rlb@defaultvalue.org>
Mon, 10 Oct 2016 22:35:56 +0000 (17:35 -0500)
committerPeter Michael Green <plugwash@raspbian.org>
Mon, 9 Oct 2023 00:02:51 +0000 (01:02 +0100)
commit31f19ebfdb28bbb9a7e467238798d9a1cba435f1
tree2db7956b93d874871caf7024f92a23544c0d90d0
parent00c11cd62fc2d83e422573d2b262514a9712cf19
Kill gpg agent in package-test.el to avoid a race

package-test.el should no longer fail during clean up.

* Previously a delete-directories call raced with the gpg agent's own
  cleanup process (presumably triggered by the first deletion of one of
  the agent's sockets).  As a result, it looks like the agent might
  delete one of its sockets after delete-directories had decided to
  delete the socket, but before it made the attempt, causing an
  exception.

* To fix the problem, explicitly ask gpg-connect-agent to kill the agent
  before attempting to delete the gnupg home directory, and then delete
  via "rm -rf" to ignore any vanishing files.

Gbp-Pq: Name 0007-Kill-gpg-agent-in-package-test.el-to-avoid-a-race.patch
test/lisp/emacs-lisp/package-tests.el