[LTP] [PATCH v5 02/10] shell API/tests: Require root for format/mount tests
Petr Vorel
pvorel@suse.cz
Mon Sep 12 12:12:49 CEST 2022
> Hi!
> > Although the warning is quite obvious:
> > tst_device.c:101: TINFO: Not allowed to open /dev/loop-control. Are you root?: EACCES (13)
> > tst_device.c:140: TINFO: No free devices found
> > TBROK: Failed to acquire device
> > It's safer to expect root to get valid result.
> Another option would actually be to make the TST_NEED_DEVICE flag imply
> TST_NEEDS_ROOT flag, but I do not think that we have that for the C
> library either.
No, it does not imply in C API either. Yes, that would make sense for both API.
But I'd keep it as it is now and I'll do this change after the release,
Because I have other small fixes on API I'd like to post before the release.
BTW I always wondered why it was not done from the start, I thought there is a
reason for that (i.e. some special user with approved permissions).
> Either way this is fine as well:
> Reviwed-by: Cyril Hrubis <chrubis@suse.cz>
Thanks!
Kind regards,
Petr
More information about the ltp
mailing list