diff options
author | Daan De Meyer <daan.j.demeyer@gmail.com> | 2023-02-13 14:27:24 +0100 |
---|---|---|
committer | Daan De Meyer <daan.j.demeyer@gmail.com> | 2023-02-13 22:00:33 +0100 |
commit | 0da4cc97b446b43802692f2415e5a774771b0ca9 (patch) | |
tree | e726ae34f04f681495fbb0bad2eeab0fe499c9c8 /src/test | |
parent | boot: Ensure raise() is not dropped by LTO (diff) | |
download | systemd-0da4cc97b446b43802692f2415e5a774771b0ca9.tar.xz systemd-0da4cc97b446b43802692f2415e5a774771b0ca9.zip |
test-boot-timestamp: Handle ERANGE error
Timestampfs from sysfs files can be zero in which case ERANGE will
be returned so let's make sure we catch that.
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/test-boot-timestamps.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/test/test-boot-timestamps.c b/src/test/test-boot-timestamps.c index 53e378eaab..c3e4876966 100644 --- a/src/test/test-boot-timestamps.c +++ b/src/test/test-boot-timestamps.c @@ -16,7 +16,7 @@ static int test_acpi_fpdt(void) { r = acpi_get_boot_usec(&loader_start, &loader_exit); if (r < 0) { - bool ok = IN_SET(r, -ENOENT, -ENODATA) || ERRNO_IS_PRIVILEGE(r); + bool ok = IN_SET(r, -ENOENT, -ENODATA, -ERANGE) || ERRNO_IS_PRIVILEGE(r); log_full_errno(ok ? LOG_DEBUG : LOG_ERR, r, "Failed to read ACPI FPDT: %m"); return ok ? 0 : r; |