From 0da4cc97b446b43802692f2415e5a774771b0ca9 Mon Sep 17 00:00:00 2001 From: Daan De Meyer Date: Mon, 13 Feb 2023 14:27:24 +0100 Subject: 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. --- src/test/test-boot-timestamps.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/test') 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; -- cgit v1.2.3