[systemd-devel] [PATCH 1/1] tests: skip test for test-unit-file when executed without privileges

Kay Sievers kay at vrfy.org
Tue Jul 30 05:17:30 PDT 2013


On Tue, Jul 30, 2013 at 1:52 PM, Zbigniew Jędrzejewski-Szmek
<zbyszek at in.waw.pl> wrote:
> On Tue, Jul 30, 2013 at 11:50:54AM +0200, Christian Hesse wrote:
>> Hello everybody,
>>
>> for me this test fails and I think it is correct to skip it in case
>> permission is denied. Patch attached.
> It *is* an error in the installation or environment if
> unit files cannot be read. In almost all circumstances,
> reducing permissions on unit files doesn't introduce any
> extra security because later on they are all accessible
> from PID 1 over dbus. I agree that failing an assertion
> is not nice from the view of the user, what about
> exit(EXIT_FAILURE)?

Hmm, we assert() most of the test failures to see where things went wrong.

Would exit() make much of a difference in that case? Is it worth to
distinguish different types of failures in the test?

Kay


More information about the systemd-devel mailing list