test for rtems_workspace_greedy_allocate

Chris Johns chrisj at rtems.org
Mon Feb 8 06:20:08 UTC 2021


On 8/2/21 5:12 pm, Sebastian Huber wrote:
> On 08/02/2021 06:50, Chris Johns wrote:
> 
>>> Another approach is to remove the greedy allocation functions and test the no
>>> memory conditions differently. We could wrap the allocator function and let if
>>> fail every n-the call. With this you can write generic tests like:
>>>
>>> for i=1,2,...
>>>
>>>     let allocate fail in i-th call
>>>
>>>    p = test()
>>>
>>>    if p != NULL:
>>>
>>>          done
>> I think greedy should have a separate test as it is an interface. A test means
>> sbrk can be tested because I am wondering if it is. Removing it and playing with
>> allocators not an option for me. There are too many powerpc BSP we have not been
>> able to test and have sat broken for a decade now. They are a tangle of
>> interconnected pieces that are fragile and the ISA bridge IRQ bug is an example.
>> If we cannot test all powerpc BSPs we need to step carefully. My efforts are
>> focused on a specific working PowerPC BSP.
> 
> This approach would be independent of the BSP. The problem is that this stuff is
> used in a couple of tests:

I am not sure about this approach. The fix I have is simple and easy and apart
from something in _Heap_Free_block taking what I think is too much time it looks OK.

FYI It seems the sbrk heap extend slows down in _Heap_Free_block. No idea why
that would have a slow down.

Chris


More information about the devel mailing list