From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by sourceware.org (Postfix) with ESMTPS id 194E738387E3 for ; Wed, 1 Jun 2022 20:57:29 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 194E738387E3 Received: from pps.filterd (m0098417.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 251KDlCY015071; Wed, 1 Jun 2022 20:57:28 GMT Received: from ppma02dal.us.ibm.com (a.bd.3ea9.ip4.static.sl-reverse.com [169.62.189.10]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3geey5rp5c-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 01 Jun 2022 20:57:28 +0000 Received: from pps.filterd (ppma02dal.us.ibm.com [127.0.0.1]) by ppma02dal.us.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 251Kb1Hu026595; Wed, 1 Jun 2022 20:57:27 GMT Received: from b03cxnp07027.gho.boulder.ibm.com (b03cxnp07027.gho.boulder.ibm.com [9.17.130.14]) by ppma02dal.us.ibm.com with ESMTP id 3gd1ad3hb2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 01 Jun 2022 20:57:27 +0000 Received: from b03ledav006.gho.boulder.ibm.com (b03ledav006.gho.boulder.ibm.com [9.17.130.237]) by b03cxnp07027.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 251KvQfj32375192 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 1 Jun 2022 20:57:26 GMT Received: from b03ledav006.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 58E67C6055; Wed, 1 Jun 2022 20:57:26 +0000 (GMT) Received: from b03ledav006.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B6690C6057; Wed, 1 Jun 2022 20:57:25 +0000 (GMT) Received: from localhost (unknown [9.65.198.109]) by b03ledav006.gho.boulder.ibm.com (Postfix) with ESMTP; Wed, 1 Jun 2022 20:57:25 +0000 (GMT) References: <20220207174431.360355-1-adhemerval.zanella@linaro.org> <20220207174431.360355-2-adhemerval.zanella@linaro.org> <87y1yg2r6n.fsf@linux.ibm.com> <33467020-1749-e30e-5f38-8d046525e1dc@linaro.org> User-agent: mu4e 1.6.6; emacs 27.2 From: Matheus Castanho To: Adhemerval Zanella Cc: libc-alpha@sourceware.org Subject: Re: [PATCH v2 01/15] linux: Add pidfd_open Date: Wed, 01 Jun 2022 17:53:11 -0300 In-reply-to: <33467020-1749-e30e-5f38-8d046525e1dc@linaro.org> Message-ID: <87tu942jbf.fsf@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain X-TM-AS-GCONF: 00 X-Proofpoint-GUID: Kv8-cYw9Ns4MvDjrygYtwnXDGCLf8Drq X-Proofpoint-ORIG-GUID: Kv8-cYw9Ns4MvDjrygYtwnXDGCLf8Drq X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.874,Hydra:6.0.517,FMLib:17.11.64.514 definitions=2022-06-01_07,2022-06-01_01,2022-02-23_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 mlxscore=0 lowpriorityscore=0 adultscore=0 suspectscore=0 phishscore=0 malwarescore=0 mlxlogscore=931 clxscore=1015 spamscore=0 bulkscore=0 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2204290000 definitions=main-2206010083 X-Spam-Status: No, score=-10.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Jun 2022 20:57:31 -0000 Adhemerval Zanella writes: > On 01/06/2022 15:02, Matheus Castanho wrote: >> >> Hi Adhemerval, >> >> Adhemerval Zanella via Libc-alpha writes: >> >>> This was added on Linux 5.3 (32fcb426ec001cb6d5a4a195091a8486ea77e2df) >>> as a way to retrieve a pid file descriptors for process that has not >>> been created CLONE_PIDFD (by usual fork/clone). >>> --- >> [...] >>> create mode 100644 sysdeps/unix/sysv/linux/tst-pidfd-consts.py >> >> This new test fails on systems with older kernels (e.g. Debian 10 - >> kernel 4.19). Looks like linux/pidfd.h is not available on such systems, >> so list_macros fails when trying to compile source_2. >> >> FAIL: misc/tst-pidfd-consts >> original exit status 1 >> /tmp/tmp5g72cxka/test.c:2:10: fatal error: linux/pidfd.h: No such file or directory >> #include >> ^~~~~~~~~~~~~~~ >> compilation terminated. > > Not sure how to properly handle it, maybe in this case return UNSUPPORTED: > > diff --git a/sysdeps/unix/sysv/linux/tst-pidfd-consts.py b/sysdeps/unix/sysv/linux/tst-pidfd-consts.py > index 75df0ebed5..cfc9fbc7cb 100644 > --- a/sysdeps/unix/sysv/linux/tst-pidfd-consts.py > +++ b/sysdeps/unix/sysv/linux/tst-pidfd-consts.py > @@ -19,6 +19,7 @@ > > import argparse > import sys > +import subprocess > > import glibcextract > import glibcsyscalls > @@ -35,7 +36,8 @@ def main(): > > linux_version_headers = glibcsyscalls.linux_kernel_version(args.cc) > linux_version_glibc = (5, 18) > - sys.exit(glibcextract.compare_macro_consts( > + try: > + sys.exit(glibcextract.compare_macro_consts( > '#include \n', > '#include \n' > '#include \n', > @@ -44,6 +46,8 @@ def main(): > None, > linux_version_glibc > linux_version_headers, > linux_version_headers > linux_version_glibc)) > + except subprocess.CalledProcessError: > + sys.exit(77) > > if __name__ == '__main__': > main() I don't think there's much else to do besides returning UNSUPPORTED. Of course this will mark the test as UNSUPPORTED for any failure in the internal gcc call, but I don't see it as a problem today since this function seems to be used only for macro processing. Reviewed-by: Matheus Castanho Tested-by: Matheus Castanho Thanks! Matheus Castanho