mirror of
https://github.com/systemd/systemd.git
synced 2025-03-08 08:58:27 +03:00
test-journal-verify: Use a more thorough machine ID check
Let's not only check if the file exists but also check if it contains a valid machine ID.
This commit is contained in:
parent
8d3beb00c0
commit
d0287dc1d7
@ -80,8 +80,8 @@ static int run_test(const char *verification_key, ssize_t max_iterations) {
|
||||
assert_se(m != NULL);
|
||||
|
||||
/* managed_journal_file_open requires a valid machine id */
|
||||
if (access("/etc/machine-id", F_OK) != 0)
|
||||
return log_tests_skipped("/etc/machine-id not found");
|
||||
if (sd_id128_get_machine(NULL) < 0)
|
||||
return log_tests_skipped("No valid machine ID found");
|
||||
|
||||
test_setup_logging(LOG_DEBUG);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user