[systemd-devel] [PATCH] Skip tests that depend on /etc/machine-id if it is not present

Zbigniew Jędrzejewski-Szmek zbyszek at in.waw.pl
Fri Nov 30 05:21:30 PST 2012


On Fri, Nov 30, 2012 at 06:47:42PM +0530, Ramkumar Ramachandra wrote:
> The following tests fail if /etc/machine-id is not present:
> +        if (journal_file_open("one.journal", O_RDWR|O_CREAT, 0666, true, false, NULL, NULL, NULL, &one) == -128) {
> +                printf("skipping test: /etc/machine-id not preset\n");
> +                return 0;
> +        }
> +
>          assert_se(journal_file_open("one.journal", O_RDWR|O_CREAT, 0666, true,Hm, this seems fairly intrusive. What about just adding a simple
test in the Makefile, which adds this test to the list of tests
only if /etc/machine-id does not exist?

Zbyszek


More information about the systemd-devel mailing list