[systemd-devel] 4 failing tests
Kay Sievers
kay at vrfy.org
Fri Nov 30 04:58:43 PST 2012
On Fri, Nov 30, 2012 at 1:45 PM, Ramkumar Ramachandra
<artagnon at gmail.com> wrote:
> Kay Sievers wrote:
>> On Fri, Nov 30, 2012 at 1:28 PM, Zbigniew Jędrzejewski-Szmek
>> <zbyszek at in.waw.pl> wrote:
>>
>>> It'll be created by systemd during init if not present. So we _do_ a
>>> kind of around.
>
> Where is the creation code? The systemd-machine-id-setup binary does
> _not_ create it, and my patch proposes to fix that.
We overmount an empty file if needed. We do not want to create
anything if we do not know what to do, we should just fail with an
explaination, not mess around in the system!
>>> I haven't looked at the details of the patch, but
>>> I think that it would be nice to support testing before the first run
>>> with systemd: the tests should support missing /etc/machine-id.
>>
>> Don't know if it matters that much. Failing the test with a proper
>> error message sounds reasonable good enough to me.
>
> How do you propose we do that? /etc/machine-id is hardcoded in
> src/libsystemd-id128/sd-id128.c:107. Instead of returning -errno, we
> can return a special error value when /etc/machine-id can't be
> open()'ed, and cascade that value upwards from callers, finally
> handling it in the test.
Whatever fits. As said, I consider running the tests on non-systemd
machines not a priority.
>> The code should surely not get active during normal operation or any
>> service startup/restart, and magically try to fix the system in a way
>> we can't know what the right fix should be.
>
> My patch only proposes that systemd-machine-id-setup creates the file;
> nothing else.
Right, I see and understand what and why you are trying to do that,
but I don't think system should do that.
Booting should not create essential files in /etc which will be
persistent and change the behaviour of the system.
Kay
More information about the systemd-devel
mailing list