[Cuis-dev] Follow-up: #terminate and #suspend update

Jaromir Matas mail at jaromir.net
Mon Jan 23 11:30:32 PST 2023


Hi Juan,

Thanks again. I’m enclosing the two tests I’d like to store for future reference.

They both illustrate system’s behavior when you attempt to resume or terminate a process that is being terminated and the termination procedure is in a vulnerable early stage: specifically when the terminating suspended context/stack is being prepared, before running the “proper” unwind. In this particular situation the termination may derail. The probability of such an event is reasonably low but why not fix it. A possible solution is commented in the tests but before integrating it I want to test it thoroughly in Squeak/Pharo as well. The idea is to nil the suspended context during the preparation of the new stack to prevent accidental resumption/termination. Once the “proper” unwind starts it’s ok to terminate the terminating process again as demonstrated in # testTerminateTerminatingProcessAfterUnwindStarted

Best,
Jaromir

--

Jaromír Matas

mail at jaromir.net


From: Juan Vuletich via Cuis-dev<mailto:cuis-dev at lists.cuis.st>
Sent: Monday, January 23, 2023 15:25
To: Discussion of Cuis Smalltalk<mailto:cuis-dev at lists.cuis.st>
Cc: Juan Vuletich<mailto:juan at cuis.st>; Jaromir Matas<mailto:mail at jaromir.net>
Subject: Re: [Cuis-dev] Follow-up: #terminate and #suspend update

Hi!

On 1/22/2023 4:29 PM, Jaromir Matas via Cuis-dev wrote:
Hi again,

Missed the list, sorry.

As we agree to keep the current isTerminated semantics (also consistent with Squeak/Pharo) I’d suggest to use the test as the documentation of the observed behavior; I’ve added a link to the archive in the comment.

Just pushed it to github.




Question: is there a way to make a test an “expected failure” like in Squeak? In Squeak I create a method

ProcessTest>>#expectedFailures

                ^ #(testTerminateTerminatingProcess testResumeTerminatingProcess)

As a result the two listed tests show green in the test runner if they fail.

If possible, I’d like to post two tests that currently fail as a reminder/documentation.

Plase post those tests. If nobody beats to me, I'll add expected failure functionality.


Thanks,
Jaromir

Thanks,


--

Juan Vuletich

cuis.st

github.com/jvuletich

researchgate.net/profile/Juan-Vuletich

independent.academia.edu/JuanVuletich

patents.justia.com/inventor/juan-manuel-vuletich

linkedin.com/in/juan-vuletich-75611b3

twitter.com/JuanVuletich

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20230123/c86a5d10/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ProcessTest-testTerminateTerminatingProcess.st
Type: application/octet-stream
Size: 1943 bytes
Desc: ProcessTest-testTerminateTerminatingProcess.st
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20230123/c86a5d10/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ProcessTest-testResumeTerminatingProcess.st
Type: application/octet-stream
Size: 1964 bytes
Desc: ProcessTest-testResumeTerminatingProcess.st
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20230123/c86a5d10/attachment-0003.obj>


More information about the Cuis-dev mailing list