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

Cyril Hrubis chrubis@suse.cz
Wed Jul 14 11:33:24 CEST 2021


Hi!
> >> Perhaps it can be done at the higher level, e.g. in the ltp tests
> >> runner if some tests request it with a newipc flag...
> > Well, we have at least two runners (runltp which uses ltp-pan, runltp-ng) and we
> > also support running tests without runner, it'd be nice to solve this in LTP
> > API.
> 
> I didn't mean these runners, I was thinking about fork_testrun() in tst_test.c.

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?

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list