summaryrefslogtreecommitdiffstats
path: root/src/test
diff options
context:
space:
mode:
authorBalint Reczey <balint.reczey@canonical.com>2020-05-05 21:24:53 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2020-05-06 22:01:50 +0200
commite48471b94885b7e9861d468974cfc00e1455a7fd (patch)
tree14fd96c1dd88668198a8e37f3010d5e2da4b8e08 /src/test
parenthwdb: Force "mouse" type on Logitech Ultrathin Touch Mouse (diff)
downloadsystemd-e48471b94885b7e9861d468974cfc00e1455a7fd.tar.xz
systemd-e48471b94885b7e9861d468974cfc00e1455a7fd.zip
test: Skip test-boot-timestamps on permission denied
In containers even root can be denied to access the needed files.
Diffstat (limited to 'src/test')
-rw-r--r--src/test/test-boot-timestamps.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/test/test-boot-timestamps.c b/src/test/test-boot-timestamps.c
index 3c7f7a98cf..29074ecccd 100644
--- a/src/test/test-boot-timestamps.c
+++ b/src/test/test-boot-timestamps.c
@@ -17,7 +17,7 @@ static int test_acpi_fpdt(void) {
r = acpi_get_boot_usec(&loader_start, &loader_exit);
if (r < 0) {
- bool ok = r == -ENOENT || (getuid() != 0 && r == -EACCES) || r == -ENODATA;
+ bool ok = r == -ENOENT || r == -EACCES || r == -ENODATA;
log_full_errno(ok ? LOG_DEBUG : LOG_ERR, r, "Failed to read ACPI FPDT: %m");
return ok ? 0 : r;
@@ -37,7 +37,7 @@ static int test_efi_loader(void) {
r = efi_loader_get_boot_usec(&loader_start, &loader_exit);
if (r < 0) {
- bool ok = r == -ENOENT || (getuid() != 0 && r == -EACCES) || r == -EOPNOTSUPP;
+ bool ok = r == -ENOENT || r == -EACCES || r == -EOPNOTSUPP;
log_full_errno(ok ? LOG_DEBUG : LOG_ERR, r, "Failed to read EFI loader data: %m");
return ok ? 0 : r;
@@ -59,7 +59,7 @@ static int test_boot_timestamps(void) {
r = boot_timestamps(NULL, &fw, &l);
if (r < 0) {
- bool ok = r == -ENOENT || (getuid() != 0 && r == -EACCES) || r == -EOPNOTSUPP;
+ bool ok = r == -ENOENT || r == -EACCES || r == -EOPNOTSUPP;
log_full_errno(ok ? LOG_DEBUG : LOG_ERR, r, "Failed to read variables: %m");
return ok ? 0 : r;