[PATCH consfigurator v2 5/6] add gnupg scaffolding for test suite

Sean Whitton spwhitton at spwhitton.name
Thu Mar 10 23:04:34 GMT 2022


Hello,

On Thu 10 Mar 2022 at 03:40pm -07, Sean Whitton wrote:

> Changing the environment like this affects all of the Lisp image's
> threads.  If we could instead wrap gpg(1) in env(1) we could avoid that
> -- is it necessary to do it using the environment?  If so, I think we
> need a warning somewhere that running this part of the test suite has
> the potential to break things going on in other threads.

Ah I see now, it's because you need to affect GnuPG as invoked down in
GPG-FILE-AS-STRING, right?  I guess we don't have a good mechanism to
mock that function atm.

I'd like to suggest adding a DEFPARAMETER in data/util.lisp, and if it's
non-nil then GPG-FILE-AS-STRING wraps `env GNUPGHOME=${that-defparam}`
around the command invocation.  If that DEFPARAMETER is exported then
the test suite can just bind it around running the tests.

I don't think this is too ad hoc because a user might want to setq or
let-bind that variable if they want to retrieve data using another gpg
homedir?  What do you think?

-- 
Sean Whitton



More information about the sgo-software-discuss mailing list