]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test-fs-util: do not fail if machine-id is missing
authorLuca Boccassi <bluca@debian.org>
Mon, 24 Oct 2022 23:59:47 +0000 (00:59 +0100)
committerLuca Boccassi <bluca@debian.org>
Tue, 25 Oct 2022 15:00:26 +0000 (16:00 +0100)
When building in a chroot there might not be any machine-id

src/test/test-fs-util.c

index 5d9d99e272a5eabd6376909ec935e5ead0672992..9c1ced7591a81c0197d4e5101be3641b8b62fa89 100644 (file)
@@ -216,7 +216,7 @@ TEST(chase_symlinks) {
         result = mfree(result);
 
         r = chase_symlinks("/etc/machine-id/foo", NULL, 0, &result, NULL);
-        assert_se(r == -ENOTDIR);
+        assert_se(IN_SET(r, -ENOTDIR, -ENOENT));
         result = mfree(result);
 
         /* Path that loops back to self */