Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement --enable-* and --disable-* to disable packages #617

Open
pevik opened this issue Nov 18, 2019 · 2 comments
Open

Implement --enable-* and --disable-* to disable packages #617

pevik opened this issue Nov 18, 2019 · 2 comments

Comments

@pevik
Copy link
Member

pevik commented Nov 18, 2019

Current configure options --with-{numa,tirpc} are used to disable autotools
detection of presence headers and libraries (+ in case of NUMA it also changes
error message of the compiled binary).
But this confuses users a bit as usually --without-foo usually means that part
of the software is completely excluded (not being compiled). It's also confusing
as --with-open-posix-testsuite and --with-realtime-testsuite options work like users
expect it.
IMHO we compile binaries which only say "compiled without FOO support" because
runtime files expect them, but this could be solved by not installing affected
runtime files. The obvious benefits are smaller size and shorter compiled time.

There could be these configured options (all default on):
--with{,out}-syscalls (or kernel?)
--with{,out}-net
--with{,out}-rpc
--with{,out}-numa
--with{,out}-cve (this one is problematic, as it's also among syscalls)
--with{,out}-commands (or userspace ?)

@MofX
Copy link
Contributor

MofX commented Dec 10, 2019

Hi Petr,
this is actually the wrong approach. Enabling and Disabling of features (in our case testsuites) should be done using --enable-* and --disable-*.
The --with(out)-* options are normally used for enabling or disabling dependencies, that in turn can enable or disable features. So the use of --with-tirpc, --with-python and --with-bash is correct, while --with-open-posix-testsuite and --with-realtime-testsuite is wrong.
See: https://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.69/html_node/External-Software.html#External-Software and https://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.69/html_node/Package-Options.html#Package-Options or https://autotools.io/autoconf/arguments.html

So my proposal for enable/disable switches. The names are just taken from the directory names, disable/enable shows the default state

--disable-testsuite-commands
--disable-testsuite-cve
--disable-testsuite-kernel
--disable-testsuite-misc
--disable-testsuite-network
--enable-testsuite-open-posix
--enable-testsuite-realtime

But there is one big problem: The scenario_groups/runtest files. Personally I do not like these files at all. The information in the runtest files should be integrated directly into the tests and scenario_groups shouldn't be required, because the directory structure should be enough to make parts of testsuites selectable.

But still disabling testsuites can have benefits for developers, who work only on parts of the library or on users who run ltp tests directly.

@pevik pevik changed the title Change configure --without-foo options to behavior to really disable packages Implement --enable-* and --disable-* to disable packages Dec 10, 2019
@pevik
Copy link
Member Author

pevik commented Dec 10, 2019

@MofX Agree on --enable/--disable.
But I'd consider more granular switches (not too much, but directories might not be enough; CVE has just a few tests, kernel is the biggest directory).

+ I'd still wanted to be able to disable tests which depends on non-default libs. There are many tests which use TST_TEST_TCONF, but I target mainly the biggest ones (testcases/network/rpc and NUMA tests (there is no point to take compile time and space just to say "you don't have libtirpc / libnuma v2 support").

We could also revise crash and f00f tests, move it somewhere or delete and rename misc to math, but that's another story.

But using just directories will probably lead to fewer runtest files which contains tests which aren't actually installed. That was the reason for using TST_TEST_TCONF.
This should be solved once metan finishes his docparse project (https://github.com/metan-ucw/ltp/tree/master/docparse) and new runner (https://github.com/metan-ucw/runltp-ng).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants