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.
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user