[PATCH] test/mbuf: fix the forked process segment fault

Burakov, Anatoly anatoly.burakov at intel.com
Mon May 22 17:37:09 CEST 2023


On 5/22/2023 4:21 PM, Stephen Hemminger wrote:
> On Mon, 22 May 2023 11:19:24 +0100
> "Burakov, Anatoly" <anatoly.burakov at intel.com> wrote:
> 
>>>
>>> This case validates mbuf. IMO there is no need to do validation in a secondary process.
>>> Unit test for rte_panic() also uses fork() and could have the same issue.
>>>    
>>
>> In that case, rte_panic() test should be fixed as well.
>>
>> My concern is that ideally, we shouldn't intentionally crash the test
>> app if something goes wrong, and calling rte_panic() accomplishes just
>> that - which is why I suggested running them in secondary processes
>> instead, so that any call into rte_panic happens inside a secondary
>> process, and the main test process doesn't crash even if the test has
>> failed.
>>
> 
> All forks outside of EAL are bad. The test should be removed, it was buggy
> when first written.

I agree that none of the tests (or anything else in DPDK) should fork, 
but some things still crash process (as in, cause rte_panic), and the 
purpose of using fork() was for that. We can rewrite the tests to not 
fork and instead use other methods (such as spinning up secondary 
processes), we don't have to remove them.

-- 
Thanks,
Anatoly



More information about the dev mailing list