From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oa1-x2e.google.com (mail-oa1-x2e.google.com [IPv6:2001:4860:4864:20::2e]) by sourceware.org (Postfix) with ESMTPS id AFF0F3857BBC for ; Wed, 1 Jun 2022 18:49:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org AFF0F3857BBC Received: by mail-oa1-x2e.google.com with SMTP id 586e51a60fabf-d39f741ba0so3838271fac.13 for ; Wed, 01 Jun 2022 11:49:08 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=VviKJX+DhggXgh0hy1RPqDMhucs5vKbaZ+4S3sV7eWg=; b=WwgnzW0WIEg2I1dKEvVKkrdOu1qeaHNlxn7/qogNjvjkj19i++bR46GldozM0nuerA qvNbIqRuowUZ9kMOkJ+yN8natoNKIGMz6USR/heRrT2WI5mKSbByXifOscp1JOdnQZMI ZabMl2bkHWrftCQpKxYVlv60hDasGAGY/mxv38egV2GkpYD0JHWqc1+LEQz1VqNoHRwd GXqXSM4wHanZs89aUMU17Uy+rfB/pgEt8DxZjNLYaOKy60ABF4nDg8FGf9xmg8OqGKv2 PfmfctfczuP8b6XqTcf1vacumUCloEj1meOdWHkH1L1AXyYAL6npilg4xuolsDe6HENS UMuA== X-Gm-Message-State: AOAM531T5mmsr0Ib3zcavQpeRITp34pFP8Zm2zPLhtGm4HLd74GyXOsy tTseTT5lLGROI5yiqK7k45UY/kmE+hUSlg== X-Google-Smtp-Source: ABdhPJzhKOQXJXSRq3TlbvyU0Smp03TNSXN+IJ0BDOeJMTdN6D3PzwaOu92v3YWvomN3gukHiSqlHg== X-Received: by 2002:a05:6870:350:b0:e2:6f65:b91f with SMTP id n16-20020a056870035000b000e26f65b91fmr17949384oaf.192.1654109348007; Wed, 01 Jun 2022 11:49:08 -0700 (PDT) Received: from ?IPV6:2804:431:c7ca:e39c:a183:7f80:9e50:177b? ([2804:431:c7ca:e39c:a183:7f80:9e50:177b]) by smtp.gmail.com with ESMTPSA id bg10-20020a056820080a00b0040e6e53f6bfsm1402743oob.15.2022.06.01.11.49.06 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 01 Jun 2022 11:49:07 -0700 (PDT) Message-ID: <33467020-1749-e30e-5f38-8d046525e1dc@linaro.org> Date: Wed, 1 Jun 2022 15:49:05 -0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.10.0 Subject: Re: [PATCH v2 01/15] linux: Add pidfd_open Content-Language: en-US To: Matheus Castanho Cc: libc-alpha@sourceware.org References: <20220207174431.360355-1-adhemerval.zanella@linaro.org> <20220207174431.360355-2-adhemerval.zanella@linaro.org> <87y1yg2r6n.fsf@linux.ibm.com> From: Adhemerval Zanella In-Reply-To: <87y1yg2r6n.fsf@linux.ibm.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-13.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, 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 18:49:12 -0000 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()