1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2024-10-26 08:55:18 +03:00

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.

(cherry picked from commit 0da4cc97b4)
(cherry picked from commit ef96e60f18)
(cherry picked from commit 18a2aaf2f6)
This commit is contained in:
Daan De Meyer 2023-02-13 14:27:24 +01:00 committed by Luca Boccassi
parent 1b7b67d22a
commit 2b068e24ba

View File

@ -16,7 +16,7 @@ static int test_acpi_fpdt(void) {
r = acpi_get_boot_usec(&loader_start, &loader_exit);
if (r < 0) {
bool ok = r == -ENOENT || r == -EACCES || r == -ENODATA;
bool ok = r == -ENOENT || r == -EACCES || r == -ENODATA || r == -ERANGE;
log_full_errno(ok ? LOG_DEBUG : LOG_ERR, r, "Failed to read ACPI FPDT: %m");
return ok ? 0 : r;