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

fix(test): running tests no longer requires to be root #2429

Closed
wants to merge 1 commit into from

Conversation

Henrik66
Copy link
Contributor

After fd9cd02, tests no longer requires to be root. Being able to run VMs to run tests is required, but that should not imply root user.

Fixes #1147 and https://bugs.gentoo.org/298014

@github-actions github-actions bot added the test Issues related to testing label Jul 14, 2023
Copy link
Collaborator

@LaszloGombos LaszloGombos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks.

I will close #2217 in favor of this PR.

Copy link
Member

@aafeijoo-suse aafeijoo-suse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FWIW, this line would also have to be removed:

@[ "$(shell id -u)" = 0 ] || { echo "'check' must be run as root! Please use 'sudo'."; exit 1; }

@Henrik66
Copy link
Contributor Author

FWIW, this line would also have to be removed:

@[ "$(shell id -u)" = 0 ] || { echo "'check' must be run as root! Please use 'sudo'."; exit 1; }

Thanks @aafeijoo-suse for the review.
Unfortunately, I do not understand what else needs to be removed as the line 4 of test/Makefile is already removed in this PR - see https://github.com/dracutdevs/dracut/pull/2429/files#diff-740cb5a1689091cb894445e46683c255e39689ccba1c6c63d8a8841c8df8817dL4 . Can you help me understand please ! Thanks !

@aafeijoo-suse
Copy link
Member

FWIW, this line would also have to be removed:

@[ "$(shell id -u)" = 0 ] || { echo "'check' must be run as root! Please use 'sudo'."; exit 1; }

Thanks @aafeijoo-suse for the review. Unfortunately, I do not understand what else needs to be removed as the line 4 of test/Makefile is already removed in this PR - see https://github.com/dracutdevs/dracut/pull/2429/files#diff-740cb5a1689091cb894445e46683c255e39689ccba1c6c63d8a8841c8df8817dL4 . Can you help me understand please ! Thanks !

Sorry, I missed that change somehow... it's all good

@LaszloGombos
Copy link
Collaborator

CC @bdrung for his possible feedback

@bdrung
Copy link
Contributor

bdrung commented Aug 15, 2023

+1 from my side. I tested the patch from this PR plus #2484 successfully for the tests 01 02 03 04 on Debian and Ubuntu.

One caveat: The kernel on Ubuntu is only readable by root. So either make it readable or run as root. See https://launchpad.net/bugs/759725

Copy link
Contributor

@bdrung bdrung left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove sudo from the Docker files in test/container/.

@LaszloGombos LaszloGombos modified the milestones: dracut-060, dracut-061 Oct 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
test Issues related to testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

test: support non-root unit tests
4 participants