[Cuis-dev] BaseImageTests for 5302

Juan Vuletich JuanVuletich at zoho.com
Thu Jun 23 08:31:34 PDT 2022


On 6/22/2022 7:01 PM, ken.dickey--- via Cuis-dev wrote:
> On 2022-06-22 05:06, Juan Vuletich wrote:
> ..
>> But #grabProcessorFor:onTimeout: already have tests.
>>
>> This test is verifying #valueWithin:onTimeout:. It should work ok even
>> in the presence of other processes. All we need is a larger value in
>> the assert: It still needs to be smaller than one second, or the test
>> would be tested nothing.
>
> The problem is that Time class>>millisecondsToRun: is prempted.

Nope. #valueWithin:onTimeout: should work correctly if processes are 
preempted. It actually uses process preemption to do its job (see the 
implementation).

The only (non-) problem here is that on the Sipeed Lichee RV, 
#valueWithin:onTimeout: takes a bit longer to do its job. I just want to 
give it this little extra time. That's why I'm asking you for an 
appropriate timeout value.

>
> Running the code without preemption (see attached) and the SUnit tests 
> all pass.

That could perhaps be a different test.

> The problem is with the preemption, not with the duration values.
>
> Perhaps #Time class>>unpreemptedMillisecondsToRun: ??
>
> HTH,
> -KenD

#unpreemptedMillisecondsToRun: could be useful elsewhere, of course. 
Here I'd stick to the existing test, just tweaking the timeout to what 
the hardware can do.

BTW, I'm curious about `0 tinyBenchmarks` on that system.

Thanks,

-- 
Juan Vuletich
www.cuis-smalltalk.org
https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev
https://github.com/jvuletich
https://www.linkedin.com/in/juan-vuletich-75611b3
https://independent.academia.edu/JuanVuletich
https://www.researchgate.net/profile/Juan-Vuletich
https://patents.justia.com/inventor/juan-manuel-vuletich
https://twitter.com/JuanVuletich



More information about the Cuis-dev mailing list