From: Nick Rosbrook Date: Mon, 12 Dec 2022 19:37:52 +0000 (-0500) Subject: test-fs-util: skip part of test_chase_symlinks if machine-id is not initialized X-Git-Tag: v253-rc1~281^2~3 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=079fcdd04f57bfb1e333fea853e050c99eb16e02;p=thirdparty%2Fsystemd.git test-fs-util: skip part of test_chase_symlinks if machine-id is not initialized The part of test_chase_symlink in test-fs-util that calls sd_id128_get_machine will fail if /etc/machine-id is empty, so skip this block if the machine-id is not initialized. --- diff --git a/src/test/test-fs-util.c b/src/test/test-fs-util.c index 16c6774a659..69f63039902 100644 --- a/src/test/test-fs-util.c +++ b/src/test/test-fs-util.c @@ -315,7 +315,7 @@ TEST(chase_symlinks) { assert_se(symlink("/usr/../etc/./machine-id", p) >= 0); r = chase_symlinks(p, NULL, 0, NULL, &pfd); - if (r != -ENOENT) { + if (r != -ENOENT && sd_id128_get_machine(NULL) >= 0) { _cleanup_close_ int fd = -1; sd_id128_t a, b;