dracutdevs / dracut

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

test: support non-root unit tests #1147

Open ddiss opened 3 years ago

ddiss commented 3 years ago

While working on unit tests for Dracut's cpio utilities I was hoping to be able to run them as a non-root user. This doesn't appear to be currently possible, due to the $EUID" == "0" assertions scattered throughout. It'd be nice if the requirement for root could be specified on a per-test basis via the test_check() hook. In the case of non-root execution, tests requiring root could be skipped.

haraldh commented 3 years ago

:+1: