[LTP] [RFC] Open Posix Testsuite install layout

Cyril Hrubis chrubis@suse.cz
Thu Jun 9 14:33:35 CEST 2022


Hi!
> I am currently reviewing openembedded's recipe ([1]). It is currently
> installing the openposix testsuite twice: Once in
> /opt/ltp/testcases/open_posix_testsuite and also directly into
> /opt/ltp/. This is probably due to the fact, that the open posix
> testsuite had no install target until 20110606 and then it was installed
> into a different directory:
> 
> 
> 
> 
> In 3b808b4 ("Add install target; shuffle around/cleanup code."), make
> install was added to open posix testsuite, but the install layout is a
> bit odd.
> 
> It installs:
> 
> /opt/ltp/bin/run-all-posix-option-group-tests.sh
> /opt/ltp/bin/t0
> /opt/ltp/bin/run-tests.sh
> /opt/ltp/bin/Makefile
> /opt/ltp/bin/run-posix-option-group-test.sh
> 
> This is mostly ok, although run-tests.sh should be called
> run-posix-tests.sh, otherwise it looks like it would run "normal" ltp tests.
> And the scripts are structured a bit weird, at least
> run-all-posix-option-group-tests.sh and run-posix-option-group-test.sh
> could be merged into a single script. And
> run-all-posix-option-group-tests.sh does not execute all tests, but only
> (maybe not even all) conformance/interface tests. Based on the name of
> the script and the available documentation, this makes sense, but I
> don't see how these scripts are useful. Why would anyone want to only
> run tests for optional posix features, but not for other?

No idea about these choices, there is a lot of historicall mess in there
feel free to clean things up.

> The Makefile shouldn't be installed at all.

Sure.

> But what is worth is the fact, that the open posix testsuites are
> installed directly into /opt/ltp
> 
> /opt/ltp/stress
> /opt/ltp/conformance
> /opt/ltp/functional
> 
> They should be installed into /opt/ltp/testcases/open_posix_testsuite or
> maybe /opt/ltp/open_posix_testsuite otherwise it is very confusing.
> This would of course require the shell scripts, that execute open posix
> tests to be changed during installation (currently they use "$(dirname
> "$0")/../conformance/interfaces"). Additionally all generated run.sh
> scripts would need adaption, as they use run-tests.sh.

Another option would be /opt/open_posix_testsuite/ since apart from
being in the LTP git repository these are not integrated with the rest
of the LTP at all.

> I would propose and volunteer to:
> 1. Move testsuites to /opt/ltp/testcases/open_posix_testsuite
> 2. Move run-tests.sh and t0 to /opt/ltp/testcases
>    /open_posix_testsuite/bin, because it is only used by run.sh scriptss
>    from the suites directories
> 3. Fix paths in run-posix-option-group-test.sh during installation
>    (or drop them completely? Are they even used by anyone?)
> 2. Remove the Makefile from /opt/ltp/bin

Sounds good.

> For the future it would probably be a good idea to integrate the tests
> into the default ltp testrunner or at least provide something, that can
> execute the installed tests automatically. But to be honest, I don't
> care about this, because we are executing the tests with our own testrunner.

This is in the long term plan for the new LTP testrunner, hopefully we
will have something by the end of the year.

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list