From: Yu Watanabe Date: Tue, 2 Jun 2026 16:40:06 +0000 (+0900) Subject: test-namespace: namespace_open_by_id() may return -ESTALE for permission reasons X-Git-Tag: v261-rc4~84 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e0f02425ae1d65b9cc6e6b166fe97872594053da;p=thirdparty%2Fsystemd.git test-namespace: namespace_open_by_id() may return -ESTALE for permission reasons As commented in namespace_open_by_id(). Follow-up for 23f22047189a291b9ba19185a24264771ab8c467. --- diff --git a/src/test/test-namespace.c b/src/test/test-namespace.c index 96272bc7623..41c67a3cf95 100644 --- a/src/test/test-namespace.c +++ b/src/test/test-namespace.c @@ -298,7 +298,7 @@ TEST(namespace_open_by_id) { * the kernel restricts open_by_handle_at() on nsfs to the initial userns and pidns and to * CAP_SYS_ADMIN. */ _cleanup_close_ int opened = namespace_open_by_id(ns_id); - if (opened == -EPERM) + if (IN_SET(opened, -EPERM, -ESTALE)) return (void) log_tests_skipped("not in initial user namespace or missing CAP_SYS_ADMIN"); if (IN_SET(opened, -EOPNOTSUPP, -EINVAL)) return (void) log_tests_skipped("nsfs lookup by ns_id is not supported by this kernel");