[pkg-gnupg-maint] Bug#960542: pinentry: debian/tests/simple-tty is sloppy in its attempt to avoid a race condition

Daniel Kahn Gillmor dkg at fifthhorseman.net
Wed May 13 20:21:04 BST 2020


Package: src:pinentry
Version: 1.1.0-4
Severity: wishlist

in debian/tests/simple-tty in pinentry, we just added a 2.0s sleep to
avoid a race condition, where the password would be entered before
pinentry-tty had finished writing out its prompt.

It would be nice to instead have that test read the pty and wait for the
prompt before sending the password, rather than an arbitrary 2s sleep.

this would make the normal test run faster (avoiding an arbitrary 2s
timeout) and still avoid the worst race conditions.  I don't know
whether a final race condition would remain though: there might be a gap
if pinentry-tty is suspended by the OS between writing out the prompt
and listening on the pty.  That would be "interesting" to discover.

       --dkg
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 227 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/pkg-gnupg-maint/attachments/20200513/e8e9a65c/attachment.sig>


More information about the pkg-gnupg-maint mailing list