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
sys-kernel/dracut: enable testing #34052
Conversation
Pull Request assignmentSubmitter: @LaszloGombos sys-kernel/dracut: @puleglot, @floppym Linked bugsNo bugs to link found. If your pull request references any of the Gentoo bug reports, please add appropriate GLEP 66 tags to the commit message and request reassignment. If you do not receive any reply to this pull request, please open or link a bug to attract the attention of maintainers. In order to force reassignment and/or bug reference scan, please append Docs: Code of Conduct ● Copyright policy (expl.) ● Devmanual ● GitHub PRs ● Proxy-maint guide |
Pull request CI reportReport generated at: 2023-11-29 21:16 UTC There are existing issues already. Please look into the report to make sure none of them affect the packages in question: |
0f8bec5
to
3b10eb6
Compare
Pull request CI reportReport generated at: 2023-11-29 23:56 UTC There are existing issues already. Please look into the report to make sure none of them affect the packages in question: |
Pull request CI reportReport generated at: 2023-11-30 00:16 UTC There are existing issues already. Please look into the report to make sure none of them affect the packages in question: |
fbe5714
to
b8a4710
Compare
Pull request CI reportReport generated at: 2023-12-02 01:36 UTC There are existing issues already. Please look into the report to make sure none of them affect the packages in question: |
Pull request CI reportReport generated at: 2023-12-02 02:06 UTC There are existing issues already. Please look into the report to make sure none of them affect the packages in question: |
Test 98 has the least amount of dependencies, lets enable just that one test first. Signed-off-by: Laszlo Gombos <laszlo.gombos@gmail.com>
Pull request CI reportReport generated at: 2023-12-02 15:01 UTC There are existing issues already. Please look into the report to make sure none of them affect the packages in question: |
I think it is fairly typical to install suid binaries with mode 4711 so that only root has access to read the file. I think this is meant to make exploitation of suid binaries more difficult. |
Thanks @floppym . Just to be clear this issue with /bin/mount does not impact test 98, so this issue is out of scope of this PR. I mentioned it as this will come up later if and when we attempt to enable more tests. |
ewarn "Skipping tests: Unable to access /dev/kvm." | ||
else | ||
emake -C test check | ||
tools/test-github.sh gentoo "98" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you think about running the full test suite if mount is readable? Something like this:
tools/test-github.sh gentoo "98" | |
local mount=$(type -P mount) | |
if [[ -n ${mount} && -r ${mount} ]]; then | |
emake -C test check | |
else | |
tools/test-github.sh gentoo "98" || die | |
fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another potential challange is networked tests - e.g. nfs, iscsi, nbd. The test suite would create a server and client VM with qemu and boot both VMs. Would we want to/is it normally allowed to run this kind of test suites as part of packaging ?
Note that for example that just the NFS test (Test number 20) itself (if everything goes well), runs for about 45 min - see the upstream timeout on networking CI tests - https://github.com/dracutdevs/dracut/blob/master/.github/workflows/integration.yml#L58 . Most of the time this tests times out even with the 45 min timeout limit.
Also note that we do not run networked tests on Gentoo upstream - https://github.com/dracutdevs/dracut/blob/master/.github/workflows/integration.yml#L27
IMHO we want to run only a subset of the tests - at least initially.
There is an attempt to reorganize the test suite upstream so that it is easier to just pick a non-networked tests downstream - see dracutdevs/dracut#2263
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking at the test-github.sh script, it looks like it runs configure and make to compile the code (again). We don't want to do that in the src_test function.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fair point. I think this also came up during Debian/Ubuntu discussion. Let me drop some pointers here for now, and I hope to find some time to upload a new revision later.
https://salsa.debian.org/debian/dracut/-/merge_requests/24/
https://bugs.launchpad.net/ubuntu/+source/dracut/+bug/2031417
One of the reason I opened this PR as testing dracut on Gentoo is blocked by dracutdevs/dracut#2562 not landing. This is now resolved by dracut-ng work - dracut-ng/dracut-ng#8, so closing this PR for now. |
Enable running tests for dracut.
Related: https://bugs.gentoo.org/298014 and dracutdevs/dracut#2429
Tests have been running upstream on Gentoo for about 4 months now, so perhaps it is time to try it here - see dracutdevs/dracut#2469
The one issue I found is that some test cases needs to make a copy of /bin/mount binary (copy into an initramfs) and it seems only root has the permission to copy the /bin/mount binary on Gentoo ?
Test 98 has the least amount of dependencies (it does not require copying mount), lets enable just that one test first.
One of the strength of dracut that it is widely used and tested in general, so alpine should try to take use of the test suite as well.
I only changed latest version, but happy to update the PR for other version as well