From: Daan De Meyer Date: Mon, 13 Feb 2023 13:27:24 +0000 (+0100) Subject: test-boot-timestamp: Handle ERANGE error X-Git-Tag: v253~12 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0da4cc97b446b43802692f2415e5a774771b0ca9;p=thirdparty%2Fsystemd.git 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. --- diff --git a/src/test/test-boot-timestamps.c b/src/test/test-boot-timestamps.c index 53e378eaab6..c3e48769668 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;