Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp3211600pxb; Thu, 10 Feb 2022 15:18:37 -0800 (PST) X-Google-Smtp-Source: ABdhPJyiTTbbX8SsDVbieAzbC5dPQqkJZhz0wDuv/daTI15FTwTZgaZvbM3SOqwCDMv9PFwVEHqw X-Received: by 2002:a17:902:b586:: with SMTP id a6mr9481165pls.150.1644535117417; Thu, 10 Feb 2022 15:18:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644535117; cv=none; d=google.com; s=arc-20160816; b=0eBHhEPgbWTGVu/8o0V5GRXRzXLdVaMQUJCAZcbcmlyntOS0L/UrtmG53POKvw9nJ/ e0YMb+GlNnFbQHbPFxQDedMA6I8Ollk/pcfLVxkzvh48/QZ7xlAWLF19HWYLLmfinGvs z2yUzvlV7ttDF3Q8MxU19iPdDX8Hk2YGbQ6FD7Z4Bf32UryuOFrfn81Lzu0AkgIo7r7w poet8WNaLp0oyhXbCks6O0p7FyVN3KfgABT5sOHR+YeDr4SNPJetIKzxhY6iRYLfE9ue rPudQ2P97foYpQ3Xb7GIlyaC9GssKrOeFxqCBhGAjbXT71oPmpqR7teRiMsZe3XKLfW9 1TRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:to:content-language:subject:cc:user-agent:mime-version :date:message-id:dkim-signature; bh=HerbsU/kZzr4EooCUFRtd+Pv9dnzK/DzIzkZdjGCv7M=; b=LB6FtJmpi/c0i9wZXZc7slsmrxYnfmEnUpsM4frAFfvjoC0vn1RAzRCKJgdW9Gu7kV bEuoSWnbuE9xIeQMALVSK/AhyruvPaaAuKpvKSU3WAN58nGDW/PLUclS1ixegbK0MQki IshABU0kJus4a7ohI6iejroENTKZTI1/GsecKf6Wmy/1RsH7S4vtkB5qQB9TSDEmUDF7 dAGuSV45Tvz8Oi31mpz40xPH4ejXCDx5p8dUxNOm7MK3B09EFlh3cwM2OJPaIovFVfF4 RH3pvSiIwqWfI4riaQHW+p2ptE9p30JqpWhl7IGY26Ydap9dGuARFN8+uNG9LnVPikXx 8pEA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=OWjwy7eP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b9si11600016pfl.10.2022.02.10.15.18.24; Thu, 10 Feb 2022 15:18:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=OWjwy7eP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345542AbiBJXOb (ORCPT + 99 others); Thu, 10 Feb 2022 18:14:31 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:33798 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345532AbiBJXOa (ORCPT ); Thu, 10 Feb 2022 18:14:30 -0500 Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [46.235.227.227]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 296D25F45; Thu, 10 Feb 2022 15:14:31 -0800 (PST) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: usama.anjum) with ESMTPSA id 2EC861F469B4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1644534869; bh=o9q78kTwG5UmK6/5Bu7ra/nY0WB8DC6T1nn3SDr51bM=; h=Date:Cc:Subject:To:References:From:In-Reply-To:From; b=OWjwy7ePObdQwYLGZ827EpObqOzhn+TNJ4HTTUKnn02v1nnpHj7SkPSXT1I4fdEG6 M8vNVbqFqLR948xyhEoi27Bd5Z1pNZ1/6ipD/Eg+8AhiTmDdNBb4dABjrmCJEu6PQG KlgcZFLoHY12EEZP7W6gwnHz0KT4YnplsdBOfx0GiGWYkoqKGhjupnXfSeeNRbmFBa +BHqNCbMIdoXYSVEYlyTulOF5bP8/AmGrsjOiXDJWrB+6tzjfeGiNFxoHDDWSHQcN+ AEmsFODOXyjZOQVxJH0prJunaBafHD0423ghUKUWWe2bs+Xv1YH5K2wpX/MGroYU3B 6KNZvMp22yXVQ== Message-ID: <755ec9b2-8781-a75a-4fd0-39fb518fc484@collabora.com> Date: Fri, 11 Feb 2022 04:14:17 +0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Cc: usama.anjum@collabora.com, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, bpf@vger.kernel.org Subject: Re: [PATCH v2] selftests/seccomp: Fix seccomp failure by adding missing headers Content-Language: en-US To: Sherry Yang , skhan@linuxfoundation.org, shuah@kernel.org, keescook@chromium.org, luto@amacapital.net, wad@chromium.org, christian@brauner.io, ast@kernel.org, daniel@iogearbox.net, andrii@kernel.org, kafai@fb.com, songliubraving@fb.com, yhs@fb.com, john.fastabend@gmail.com, kpsingh@kernel.org References: <20220210203049.67249-1-sherry.yang@oracle.com> From: Muhammad Usama Anjum In-Reply-To: <20220210203049.67249-1-sherry.yang@oracle.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,SPF_HELO_PASS, SPF_PASS,T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2/11/22 1:30 AM, Sherry Yang wrote: > seccomp_bpf failed on tests 47 global.user_notification_filter_empty > and 48 global.user_notification_filter_empty_threaded when it's > tested on updated kernel but with old kernel headers. Because old > kernel headers don't have definition of macro __NR_clone3 which is > required for these two tests. Since under selftests/, we can install > headers once for all tests (the default INSTALL_HDR_PATH is > usr/include), fix it by adding usr/include to the list of directories > to be searched. Use "-isystem" to indicate it's a system directory as > the real kernel headers directories are. > > Signed-off-by: Sherry Yang > Tested-by: Sherry Yang > --- > tools/testing/selftests/seccomp/Makefile | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/tools/testing/selftests/seccomp/Makefile b/tools/testing/selftests/seccomp/Makefile > index 0ebfe8b0e147..585f7a0c10cb 100644 > --- a/tools/testing/selftests/seccomp/Makefile > +++ b/tools/testing/selftests/seccomp/Makefile > @@ -1,5 +1,5 @@ > # SPDX-License-Identifier: GPL-2.0 > -CFLAGS += -Wl,-no-as-needed -Wall > +CFLAGS += -Wl,-no-as-needed -Wall -isystem ../../../../usr/include/ "../../../../usr/include/" directory doesn't have header files if different output directory is used for kselftests build like "make -C tools/tests/selftest O=build". Can you try adding recently added variable, KHDR_INCLUDES here which makes this kind of headers inclusion easy and correct for other build combinations as well?