From patchwork Thu Jan 30 20:40:29 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lorenzo Stoakes X-Patchwork-Id: 13954960 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id ED3ABC0218D for ; Thu, 30 Jan 2025 20:41:05 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id D8A7D2802B1; Thu, 30 Jan 2025 15:41:04 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id D3A98280058; Thu, 30 Jan 2025 15:41:04 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id AA24A2802B1; Thu, 30 Jan 2025 15:41:04 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 88A6B280058 for ; Thu, 30 Jan 2025 15:41:04 -0500 (EST) Received: from smtpin02.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 7678F1C6A3A for ; Thu, 30 Jan 2025 20:40:59 +0000 (UTC) X-FDA: 83065287438.02.3774DCD Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by imf15.hostedemail.com (Postfix) with ESMTP id 0B700A0009 for ; Thu, 30 Jan 2025 20:40:55 +0000 (UTC) Authentication-Results: imf15.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-11-20 header.b="S/91QAB0"; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=Wp+4QXZ6; spf=pass (imf15.hostedemail.com: domain of lorenzo.stoakes@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=lorenzo.stoakes@oracle.com; arc=pass ("microsoft.com:s=arcselector10001:i=1"); dmarc=pass (policy=reject) header.from=oracle.com ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1738269656; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=KeWPgFb/fq7YdqcyVIZUKRTbdDD+ChS7+ubYputWHNo=; b=UpxJnoV4Ya1ut6FD4Wbs9GqUSgZXvjT5D9qxQQDzmln3Cfg405BuKKKUb8iOIqlpb1bP1b CeAaDybM5q4/RPUs1cCMlkGD+yVx1FFtTUE5G/oJTevq6p5OyL+5EVdNcFpCWzs4y8yaqG 6CBUh3WMayFlz9rrkM/2LNcpkbZYaa4= ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1738269656; a=rsa-sha256; cv=pass; b=U4HdPbc4IpSbxeUc2ClK3CosPaWglm5mSQdUzL2GjObB/zbq4KgCHyhE9pfDf9Tv/xKsz+ z2D77QA4M3dwOl7QbA3QmmFsM9bBmheeI9pFhfIIJ3apnTq21D/+LTKNGTovpIhzIaO752 QNNOT6eTtCo4lG0Eqbf7A8+YSYfH5Ec= ARC-Authentication-Results: i=2; imf15.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-11-20 header.b="S/91QAB0"; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=Wp+4QXZ6; spf=pass (imf15.hostedemail.com: domain of lorenzo.stoakes@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=lorenzo.stoakes@oracle.com; arc=pass ("microsoft.com:s=arcselector10001:i=1"); dmarc=pass (policy=reject) header.from=oracle.com Received: from pps.filterd (m0246632.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 50UJic59009892; Thu, 30 Jan 2025 20:40:50 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=cc :content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s= corp-2023-11-20; bh=KeWPgFb/fq7YdqcyVIZUKRTbdDD+ChS7+ubYputWHNo=; b= S/91QAB0qPKpyCF5MoFE1pb3f0VW2Gl5yu5OM06gHbEib2hg9jCYJ57cK3X3U+sb APBUptTuncKbsMqCxZOA/k2o8O6n/YOTJY4gOgCD803K1MhwS7hhhsG3rxdXjXAE yDiFTiBkGfZDYakOJOE3PzYjEVKDjeHNiF0C7Ldx7vRDm2RpbUkRt4OMwVIEsxZe /UX9lXr4J7azkVY+UXQcWwV8Lb6pgAtMkJqZ936kFVuAUL6h7Yg7SwJ1RgEH5QLv /9Hyn54AfA0kkxjqTQYdNnO7gXljKcyQ/d8s3c7YD3ijZeRH7qt06ssghkBzkSd7 mVrPNNaaC+4llmdDCL8gyg== Received: from iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta01.appoci.oracle.com [130.35.100.223]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 44gf8206yy-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 30 Jan 2025 20:40:49 +0000 (GMT) Received: from pps.filterd (iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (8.18.1.2/8.18.1.2) with ESMTP id 50UKDfVN028297; Thu, 30 Jan 2025 20:40:49 GMT Received: from nam12-mw2-obe.outbound.protection.outlook.com (mail-mw2nam12lp2044.outbound.protection.outlook.com [104.47.66.44]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 44g0vbm9gb-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 30 Jan 2025 20:40:49 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=lfOHk74WTHBJWDLXTEgkK2rwBJEE74pR0byktm/4xwEthMJCx6Isy86dO4/4R7nkWahIxVOrkKs3Q10AULylUwZMghXWJBvJuIanmJqq3u9Zw6R9/5g1FATR+xc5ypF+EF1+6vYs8ovdOuKbeDQsZZox9ZWaPdgyOn+IKc+96y+xyH5oKuj7uheV3NpT8IbXVRaN+B66Q6Vtk/T/pWD9d+qe0t87MqGv/Xh0hD9Dh0OExCMHlre8tpO+iS2Uu2rnr04aNixGWZBWaqPDmeEWVhLl1HCcB64VlXZrwIzBrPbyxARwqrYT2II+bmBte8mTxIzZ7ceVUgG62V+8KcjI/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=KeWPgFb/fq7YdqcyVIZUKRTbdDD+ChS7+ubYputWHNo=; b=ZSYrOypdxb4zWjtsCXm435FN19/BrMyRp1K7kV0CD4awwEtl+t+BSGHTNIbbg3/SHBU//kASklh5CO7qXzol44+sLU3l+l/jGTWexadcvcbcjTgZgYq+mFCmCtOKr9Y8CwmTifpPrpquY5h8vSmZ6tgQOEvSdw0HbQ2k9m3Qul+cOfhcZOO/MGqXRVkPlwVHQj5+/gdbc8OEXDhjtVUEML/PywzfvsvAffFBYgxRnq2Oe6db/QGhD6N5qnp1o93Wf25GzWcWX0A3pVC4Nbs1HN/uzr+sNDMGKu4LVokmX8Yo/mw/wQt1/YShkPfoJdPQtJjU7SJMGea9T9UfDYlLog== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=KeWPgFb/fq7YdqcyVIZUKRTbdDD+ChS7+ubYputWHNo=; b=Wp+4QXZ623Z00JVmstXJepllzqWLfF1/N/jJo7pz4MIhcxqvqATTzncwx0f1bNCRb6Rj7qziBWy58e4GLBXVSRZnuvxRjHdEjoLWPf3kqeqvoDaSEpSesroTStQ57Cen3Ivb235zKwO5hxLj1wFNURYt6ByRej1cIQFRKjSbIVQ= Received: from BYAPR10MB3366.namprd10.prod.outlook.com (2603:10b6:a03:14f::25) by SN7PR10MB6547.namprd10.prod.outlook.com (2603:10b6:806:2aa::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8377.23; Thu, 30 Jan 2025 20:40:46 +0000 Received: from BYAPR10MB3366.namprd10.prod.outlook.com ([fe80::baf2:dff1:d471:1c9]) by BYAPR10MB3366.namprd10.prod.outlook.com ([fe80::baf2:dff1:d471:1c9%6]) with mapi id 15.20.8398.018; Thu, 30 Jan 2025 20:40:46 +0000 From: Lorenzo Stoakes To: Christian Brauner Cc: Shuah Khan , "Liam R . Howlett" , Suren Baghdasaryan , Vlastimil Babka , pedro.falcato@gmail.com, linux-kselftest@vger.kernel.org, linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, linux-api@vger.kernel.org, linux-kernel@vger.kernel.org, Oliver Sang , John Hubbard , Tejun Heo , Johannes Weiner , Michal Koutny , Andrew Morton , Shakeel Butt Subject: [PATCH v7 4/6] selftests: pidfd: add pidfd.h UAPI wrapper Date: Thu, 30 Jan 2025 20:40:29 +0000 Message-ID: <751907a39349d0a1526f6f63f4270e4a5700e244.1738268370.git.lorenzo.stoakes@oracle.com> X-Mailer: git-send-email 2.48.1 In-Reply-To: References: X-ClientProxiedBy: LNXP265CA0044.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:5c::32) To BYAPR10MB3366.namprd10.prod.outlook.com (2603:10b6:a03:14f::25) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BYAPR10MB3366:EE_|SN7PR10MB6547:EE_ X-MS-Office365-Filtering-Correlation-Id: d6c91255-2f9b-453b-44a5-08dd416e5f88 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|7416014|366016|1800799024; X-Microsoft-Antispam-Message-Info: YUcABkNnYa32CWSmZj9YcqZ+vKqJ51yqFvg52gzh1/56dmhLRgEaonvm6OCZCwL5hjPIkmvDwURGeFxlYF8URPz9mUyOBSym/4Tt41Bd/dmfr54SQg6s2IItESsbVNaEuNONLbzF/OY1TtSZCmTtBJXDT68BSELK5msYCsodAjIUR8wJXzJcZW6USiBJtHTQOEaZ5QtNUq6IKPXs8Z+ntus7Uye+i3LI8+x3qt47iqQ5O/ATLIarMjIR+gk/yJEVm5QQJHigXw8PJqNzxF3Rnzxy/6w//BzH5VVoyx2a6fEOdWIAuB45tsLt8h4ajzL5hAMvcqw+FLalPtYIj0rrVuCO2lrQtxD2WkR42C30xg/3gPy5dc+DS3G2rH6JbujSmPO9yOw6y9KaB49qYp4V3pSxY1yRlIL5BJlP6CcPpK1sVo9OpQiGqNIxJ6V3XWdvc608gHpILIzsURoH30Zc4Ia0jSAhuUUTO2ZFjJHH0OKed6poNcQjoBOMVczWaeD5IMRTFjCaUMGurYtT0SL/hgv7BP9/8PZ978PN+qP4ptkognFkXqjI0WATTXBCNR/fVPbSdy3FSZmJFqry+Uz1LS6ZNTrD4wW4lbiFk+4TlrnneK8D97MhUw96G/sLCC5bTyeoh2L4RWKNLd2nYj/1sK1XteB85yXO1RtjcvjPJqCk7kO6bsuloFIjZvK5Fym4HTpa+I2t3OVBN8s/dW/2Wv9vF0jloSxWMgvGueQ41NW8MUHMcK4SBiHlZWAKdA3tzIDB8tRErD7Jyr3GwQZv48TtQadW16ZbVhzAQ1vLSEHAkiuE0MzTLoDp/+P20zCPGwWzX6QssQjN0pGZWbuXODP+ooU9fxJpin+geBNlrJL7+6hk0T3h+YOxMMIQei0kgUZMhgNgnruy815QLoSfSdAFO1UpOPshglkHXde00KQ/sVK6wwxv1prfimKmTRjNlRmwjxTeP5LUjYGat5hUPlWp5ZNxtZ1PD+Cx8iK9y72nuB/Rq2ZlHypOZqydk8qSMKD54T0E6PoetyUIBF2Xdy/bbJO7JisqPCTbkJutsFT5gGYX7VCVrYDqNEtqZXfpeEZmkrBGc905ITKwAKyCqlpuYdJg6Ys4XLzw7MQw4QFHtABZOdgiIw0X989dRexjAG2W3XgGCY4IgePuunnEDDKarhJkwMufBlg9q6rD0H+yjpHURIBAMCKpQAAkloc3FGTRSlOPUpgNLqUJsy2dzF2gOTPzRLpueutxJeT60zkGFlJonPM6Vp0pynSUhVu74WqQtOT7oHbEgFKqfqiOrVHgkTEvp40Gk4kGUvwejlK3XXYmbFpC5cb4Bii1ZRq49riPLECcNLw63m2L80RHKhRF7oAvLyybMzdHy5X4Db05sN1GExhvOq419UQw97nZ X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BYAPR10MB3366.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(376014)(7416014)(366016)(1800799024);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: XHoPLt+xamfoSL6Ro6XFl4OUfXsjVl+j2fSdYa7Hlt1cTUWJoMZgTFStqM0GdNLjtTPxYdRPQ9PyEgaSo0i/xtsUD2cguJ1zzAKiNeMgpSOLspV+sLVoMcrrXYrSggVLdBHA9hUdocGi1DXKaCd2vYFFmrpQDm/Catr7TNoGWDy4i3goD6BJlaj0iAVzINMsb6SRqMoAqNl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SBR8JMM7Sa6vaSFLZDB74F6h5QyEnUP9EY41K6HGu8v0mLG9jXijCtHxufliafpzgcvH3sT3M3PkX6MIVZxFYOo3lfNF/nW7/uIVRYoOpc8wr5k3BI8WCYlPc2rQKTwfE18SNxMwR+cWXnzU9Dya4B0QUzx055jZwrKydncPfLZoozo0qv9PHfMvZx3xs6yB/kV7VC7jyxR7bIGHK/xsdZTOZT/Vm1hyJDXw6+/HiI6TjVhs6UH+oxrPyK20eWV7wmRrM86n4SISmUhkDaMAPaKPQklV5VLtukqP6rj98L692jThJL9s568dYSeXAExlitT3pa8SsU50R/FUQ+yoHEUTgG5rQ== X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: LnaABLgQGbeN45VmKOopqOmIWoL55ox8BtMDYJYAiy5BRT4j1KDnRFQDo2xMnM6ru8MEW6PTZVt9VPUskk7q6WHFORJW3cUAhqcJ5jtIDc8jROlEqkV6ntVPwR/0eKZQJzWWYSk86IoZbyWD2nw7KD6qQ99FDJVPVVkmaJOWMxD24vZks5xaVv5Ik3Zvy7oGUOf1zIg+oJlz0Wf+ESezXPfbWrvAQDjY+deiJ+y3WniSesT37GD/ZR7D5GygEQeoSuWZ+g6jc+z6imrzSkxA1Djx8CIRVDKSV1zxQEYaxo+fadMIbV+Ru95iFMXkxO4lT3BEANRaFMfUvT3C6pfKBdRjM+Fn1G2PIPS46eDjcPZggo2/JahJxiUlfIP0EyhC37HfSIGN0fhZ2xLePfJ9wbioJqSnAO8M540lvReJaB5UlZJZZa3N7nWv14j0oPnZkSeLRM/pAMBjk6GOPSevbGqyLML4StrXO674A+mweBzvzNilDhqOmI7dnlTLgB1aFzFaGOcdPHMjHJraoqsiQbJDvxRZveQViwxGtfSvqMpJjRW9t9Yxi9+Wz5KWGymveAHpYorfGWj4zh8715psB9lWetYEYKaFgnxE09obr6E= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: d6c91255-2f9b-453b-44a5-08dd416e5f88 X-MS-Exchange-CrossTenant-AuthSource: BYAPR10MB3366.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Jan 2025 20:40:46.2427 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: nIdLRajGtTtP8InUuKVE11YRW6PJ+xCRKtBElqu7fJ/qRR+T4mBrlUW+1EPmMINQuINB6N5+U/HyZym6ArMqmSrjZUY4Qk/TeB+MsZkLj1g= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN7PR10MB6547 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1057,Hydra:6.0.680,FMLib:17.12.68.34 definitions=2025-01-30_09,2025-01-30_01,2024-11-22_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxscore=0 mlxlogscore=999 spamscore=0 phishscore=0 bulkscore=0 malwarescore=0 adultscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2411120000 definitions=main-2501300158 X-Proofpoint-GUID: XfV_9gjByChqX8bkpM8-xht-m0EjaK7R X-Proofpoint-ORIG-GUID: XfV_9gjByChqX8bkpM8-xht-m0EjaK7R X-Stat-Signature: tyamrxptd1ayk634ducmdzaptwm7eurb X-Rspam-User: X-Rspamd-Queue-Id: 0B700A0009 X-Rspamd-Server: rspam03 X-HE-Tag: 1738269655-396932 X-HE-Meta: U2FsdGVkX18IIlVHpdvvwZ9F36i/wg4MM7oOAxvfnvL0cqa8/aaxVu+jDdunZFppf8puxegzD+HcNX9bG1IFLjwcofFof+yUxf1eVDwygIYazFhXO6A3W2FnlK5trZoW+wg5jexyN6ij6YbYjBHK7P2ZaK849Eu5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qQBY3MZ4aYezz+B5WQD0bS8smWvh3ggA3XzyhNu0EkkQwA0nLVlQUJzRIkZxWNP5m9usjDN0x0Q8iaVPb0BKROM2LuJ66vrKUMunc6I+InTsdVYTctisBVq6HSGbNLF6beijGeKuXbipyLEtJjqtgChP/f6pi8X0KnWtX1y80cE1LYU5juGepxIXZaKgEXaUsZcZhBwqUPTZC15/riGKSvtho3ts+cPzYtaOphS9WH4Nos8PjH+Z/d0LkfAkSrzyKQKGTJF7JdwcRBbl/b7dtoY7VacV1NiNHRDcyBVok0hr3SyLNy1CEsMzPpjwtdbaGguFWdZuho5gTa/xRv/NmfMNx3QjGstHxnjtjNWO8jV/Jboz+YPNxW86BfB12GbkAxLkJ3qsxKNSrvEm0drB8FaqsfAGKhtBWhxJpsBfJpf1Spt/xyJ1hcqQmWggQxWljqvPLTGHpy/U= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000573, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Conflicts can arise between system fcntl.h and linux/fcntl.h, imported by the linux/pidfd.h UAPI header. Work around this by adding a wrapper for linux/pidfd.h to tools/include/ which sets the linux/fcntl.h header guard ahead of importing the pidfd.h header file. Adjust the pidfd selftests Makefile to reference this include directory and put it at a higher precidence than any make header installed headers to ensure the wrapper is preferred. This way we can directly import the UAPI header file without issue, use the latest system header file without having to duplicate anything. Reviewed-by: Shuah Khan Signed-off-by: Lorenzo Stoakes --- tools/include/linux/pidfd.h | 14 ++++++++++++++ tools/testing/selftests/pidfd/Makefile | 3 +-- 2 files changed, 15 insertions(+), 2 deletions(-) create mode 100644 tools/include/linux/pidfd.h diff --git a/tools/include/linux/pidfd.h b/tools/include/linux/pidfd.h new file mode 100644 index 000000000000..113c8023072d --- /dev/null +++ b/tools/include/linux/pidfd.h @@ -0,0 +1,14 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +#ifndef _TOOLS_LINUX_PIDFD_H +#define _TOOLS_LINUX_PIDFD_H + +/* + * Some systems have issues with the linux/fcntl.h import in linux/pidfd.h, so + * work around this by setting the header guard. + */ +#define _LINUX_FCNTL_H +#include "../../../include/uapi/linux/pidfd.h" +#undef _LINUX_FCNTL_H + +#endif /* _TOOLS_LINUX_PIDFD_H */ diff --git a/tools/testing/selftests/pidfd/Makefile b/tools/testing/selftests/pidfd/Makefile index 301343a11b62..5363d5ab27a4 100644 --- a/tools/testing/selftests/pidfd/Makefile +++ b/tools/testing/selftests/pidfd/Makefile @@ -1,9 +1,8 @@ # SPDX-License-Identifier: GPL-2.0-only -CFLAGS += -g $(KHDR_INCLUDES) -pthread -Wall +CFLAGS += -g -isystem $(top_srcdir)/tools/include $(KHDR_INCLUDES) -pthread -Wall TEST_GEN_PROGS := pidfd_test pidfd_fdinfo_test pidfd_open_test \ pidfd_poll_test pidfd_wait pidfd_getfd_test pidfd_setns_test \ pidfd_file_handle_test pidfd_bind_mount include ../lib.mk -