Skip to contentSkip to conversation

Open Posix Testsuite install layout

RFC Joerg Vehlow 2 participants 2 messages Jun 9, 2022

lore
Share & tools
lore
#0 lore raw

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?

The Makefile shouldn't be installed at all.

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.

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

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.

Joerg

[1]
https://git.openembedded.org/openembedded-core/tree/meta/recipes-extended/ltp/ltp_20220527.bb

Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp
#1 lore raw

Hi!

Quoted 22 lines

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

Quoted 10 lines

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.

Quoted 1 line

The Makefile shouldn't be installed at all.

Sure.

Quoted 7 lines

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

Quoted 6 lines

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.

Quoted 8 lines

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.

Quoted 4 lines

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.

Signature · 5 lines
Cyril Hrubis
[email protected]

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp