1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-09 17:38:00 +00:00
putty-source/test
Simon Tatham 809a4eb249 testcrypt.py: avoid restarting subprocess for frees.
I just ran into a bug in which the testcrypt child process was cleanly
terminated, but at least one Python object was left lying around
containing the identifier of a testcrypt object that had never been
freed. On program exit, the Python reference count on that object went
to zero, the __del__ method was invoked, and childprocess.funcall
started a _new_ instance of testcrypt just so it could tell it to free
the object identifier - which, of course, the new testcrypt had never
heard of!

We can already tell the difference between a ChildProcess object which
has no subprocess because it hasn't yet been started, and one which
has no subprocess because it's terminated: the latter has exitstatus
set to something other than None. So now we enforce by assertion that
we don't ever restart the child process, and the __del__ method avoids
doing anything if the child has already finished.
2020-02-29 12:13:32 +00:00
..
sclog Formatting change to braces around one case of a switch. 2020-02-16 11:26:21 +00:00
agenttest.py New test script 'agenttest.py' for testing Pageant. 2020-01-09 19:57:35 +00:00
agenttestdata.py New test script 'agenttest.py' for testing Pageant. 2020-01-09 19:57:35 +00:00
agenttestgen.py New test script 'agenttest.py' for testing Pageant. 2020-01-09 19:57:35 +00:00
colours.txt Rename the 'testdata' subdirectory to 'test'. 2019-01-03 16:56:02 +00:00
cryptsuite.py Reject all low-order points in Montgomery key exchange. 2020-02-28 20:48:52 +00:00
desref.py Whitespace rationalisation of entire code base. 2019-09-08 20:29:21 +01:00
display.txt Rename the 'testdata' subdirectory to 'test'. 2019-01-03 16:56:02 +00:00
eccref.py eccref.py: find low-order points on Montgomery curves. 2020-02-28 20:40:08 +00:00
lattrs.txt Rename the 'testdata' subdirectory to 'test'. 2019-01-03 16:56:02 +00:00
numbertheory.py numbertheory.py: cubic and quartic solver mod p. 2020-02-28 20:40:08 +00:00
scocols.txt Rename the 'testdata' subdirectory to 'test'. 2019-01-03 16:56:02 +00:00
ssh.py New test script 'agenttest.py' for testing Pageant. 2020-01-09 19:57:35 +00:00
testcrypt.py testcrypt.py: avoid restarting subprocess for frees. 2020-02-29 12:13:32 +00:00
utf8.txt Rename the 'testdata' subdirectory to 'test'. 2019-01-03 16:56:02 +00:00
vt100.txt Rename the 'testdata' subdirectory to 'test'. 2019-01-03 16:56:02 +00:00