From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1944) id 698A8385DC2F; Wed, 26 Oct 2022 15:04:47 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 698A8385DC2F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1666796687; bh=s7KHBHpcQ7oFW72KkGS1SaeY2fhxcUiKiUin555zd+o=; h=From:To:Subject:Date:From; b=hsvDRyb0t3nAx60RHamrDUVhqHI20BjWTe9gjlSfkV+2UJlrb4P9MQdzRCAylfkIn mc70VD1088EJrgrFuNFkZKGVm2vo3cnstEQdASr/7QIVtl7ZjGVeiIMqHsMfzc7Upt odMbHbcHeHjdyoYBXXTaL0Df6NQdFUFr7gRuhRyE= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Szabolcs Nagy To: glibc-cvs@sourceware.org Subject: [glibc/arm/morello/main] Linux: Terminate subprocess on late failure in tst-pidfd (bug 29485) X-Act-Checkin: glibc X-Git-Author: Florian Weimer X-Git-Refname: refs/heads/arm/morello/main X-Git-Oldrev: 302bc33bc53c787da6e74162a7092e9c0fb964a8 X-Git-Newrev: e982657073c4db21459ffd9e17bc505b1d64b876 Message-Id: <20221026150447.698A8385DC2F@sourceware.org> Date: Wed, 26 Oct 2022 15:04:47 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=e982657073c4db21459ffd9e17bc505b1d64b876 commit e982657073c4db21459ffd9e17bc505b1d64b876 Author: Florian Weimer Date: Mon Aug 15 16:43:59 2022 +0200 Linux: Terminate subprocess on late failure in tst-pidfd (bug 29485) Reviewed-by: Carlos O'Donell (cherry picked from commit f82e05ebb295cadd35f7372f652c72264da810ad) Diff: --- NEWS | 1 + sysdeps/unix/sysv/linux/tst-pidfd.c | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index 15f3dd2cdb..f8fb8db510 100644 --- a/NEWS +++ b/NEWS @@ -10,6 +10,7 @@ Version 2.36.1 The following bugs are resolved with this release: [29446] _dlopen now ignores dl_caller argument in static mode + [29485] Linux: Terminate subprocess on late failure in tst-pidfd Version 2.36 diff --git a/sysdeps/unix/sysv/linux/tst-pidfd.c b/sysdeps/unix/sysv/linux/tst-pidfd.c index 037af22290..5711d1c312 100644 --- a/sysdeps/unix/sysv/linux/tst-pidfd.c +++ b/sysdeps/unix/sysv/linux/tst-pidfd.c @@ -147,8 +147,11 @@ do_test (void) may be denied if the process doesn't have CAP_SYS_PTRACE or if a LSM security_ptrace_access_check denies access. */ if (fd == -1 && errno == EPERM) - FAIL_UNSUPPORTED ("don't have permission to use pidfd_getfd on pidfd, " - "skipping test"); + { + TEST_COMPARE (pidfd_send_signal (pidfd, SIGKILL, NULL, 0), 0); + FAIL_UNSUPPORTED ("don't have permission to use pidfd_getfd on pidfd, " + "skipping test"); + } TEST_VERIFY (fd > 0); char *path = xasprintf ("/proc/%d/fd/%d", pid, remote_fd);