dracutdevs / dracut

dracut the event driven initramfs infrastructure
https://github.com/dracutdevs/dracut/wiki
GNU General Public License v2.0
604 stars 400 forks source link

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

Closed Henrik66 closed 7 months ago

Henrik66 commented 1 year ago

After https://github.com/dracutdevs/dracut/commit/fd9cd02cb21f25d32fec4cd9889457ea6361f45e, 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 https://github.com/dracutdevs/dracut/issues/1147 and https://bugs.gentoo.org/298014

Henrik66 commented 1 year ago

FWIW, this line would also have to be removed:

https://github.com/dracutdevs/dracut/blob/6af3fcfd7f699ec4bb3f1e9ac71b7a9ebb9804b3/test/Makefile#L4

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 commented 1 year ago

FWIW, this line would also have to be removed: https://github.com/dracutdevs/dracut/blob/6af3fcfd7f699ec4bb3f1e9ac71b7a9ebb9804b3/test/Makefile#L4

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 commented 1 year ago

CC @bdrung for his possible feedback

bdrung commented 1 year ago

+1 from my side. I tested the patch from this PR plus https://github.com/dracutdevs/dracut/pull/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