[LTP] [PATCH] shmget03: fix test when some shm segments already exist

xuyang2018.jy@fujitsu.com xuyang2018.jy@fujitsu.com
Wed Jul 14 12:17:04 CEST 2021


Hi Cyril, Petr
> Hi,
>
> ...
>> We will need to have some kind of flag that would tell the testrunner
>> that the test is using/modifying SysV IPC anyways as without namespaces
>> these tests cannot run in parallel at all.
>
>> So I would say that we should:
>
>> * Write these tests in a way that they expect that they are the only
>>    process that modifies these resources during the testrun
>
>> * Mark all these tests with .sysv_ipc flag in the tst_test structure
>
>> * Then we can easily add support for running them in a separate
>>    namespace in the test library
>
>> Does that sound reasonable?
> +1

+1

Since now ltp test libary uses fork_testrun, I wonder whether we should 
add clone_testrun. So test's setup/test/cleanup function are all in new 
namespace.

Maybe we should support two ways for running test cases in 
lib/tst_test(fork and clone)?

And we can add clone and flag argument(the value can be 
CLONE_NEWIPC/CLONE_NEWNET/CLONENEWPID or more ) in tst_test struct.

ps: Just a initial idea

Best Regards
Yang Xu


> Kind regards,
> Petr


More information about the ltp mailing list