From: Masatake YAMATO Date: Tue, 3 Feb 2026 21:45:43 +0000 (+0900) Subject: tests: (test_mkfds:netns) conditionally report EPERM when ioctl(SIOCGSKNS) fails X-Git-Tag: v2.43-devel~95^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5b375501ac20244490319023025acca4ec97ea41;p=thirdparty%2Futil-linux.git tests: (test_mkfds:netns) conditionally report EPERM when ioctl(SIOCGSKNS) fails Signed-off-by: Masatake YAMATO --- diff --git a/tests/helpers/test_mkfds.c b/tests/helpers/test_mkfds.c index b7033165f..a135dae0d 100644 --- a/tests/helpers/test_mkfds.c +++ b/tests/helpers/test_mkfds.c @@ -2206,7 +2206,8 @@ static void *make_netns(const struct factory *factory _U_, struct fdesc fdescs[] int ns = ioctl(sd, SIOCGSKNS); if (ns < 0) - err_nosys(EXIT_FAILURE, "failed in ioctl(SIOCGSKNS)"); + err_nosys(errno == EPERM? EXIT_EPERM: EXIT_FAILURE, + "failed in ioctl(SIOCGSKNS)"); close(sd); if (ns != fdescs[0].fd) {