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.
This commit is contained in:
Daan De Meyer
2023-02-13 22:00:33 +01:00
parent ec96dad2f4
commit 0da4cc97b4
+1 -1
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 = 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;