Received: by 2002:a05:7412:da14:b0:e2:908c:2ebd with SMTP id fe20csp272962rdb; Fri, 6 Oct 2023 03:09:30 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHI6Acirwtm+9u+ckb2jlHRJXpygAOcHIs8p3d8qa5WBUZMjsjLGuSvhvzbuirsCwCXDz3W X-Received: by 2002:a05:6a20:8f0c:b0:13f:9cee:ff42 with SMTP id b12-20020a056a208f0c00b0013f9ceeff42mr9171452pzk.41.1696586969994; Fri, 06 Oct 2023 03:09:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696586969; cv=none; d=google.com; s=arc-20160816; b=DdRQ+QirahafoTcE4babYEJz+i7ck/qiRqX0kSnrg1HMdc12s+gyaWCxzzi7B5o26H ga0393TMIDbowMp/qo1nY6GKUeoC5MyLRzDrwDraWycuqR/+UYHMYP76Ycu0kzGhRVyB Ls6NOmcj2KmPxdzjI1+8XQfQjp2B5iDbZuJYq6xkL1NfAiIIElzy1mJ4z4RSW2N6HGZH BC9qvunDK8VT6wMnYby3G13llvwxSPi0fVY3+Xf4kGcJeLfT9e4hP08SxXQSQXixnPvu AtZWS7BPnRMUMjv0ShK2m/Tsku3/sNZSDw9uL1nF9IoKSk7G90PkD80L3M0mYEc6wRMO vmNA== 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=y19beCQCgh2K8MF4OslJQWg9iGOEqlDgMyGXYCVCUZM=; fh=OIYsgAT3/Ks2jkixISZXfMI9EfQwWDeTsXfm9b8xKng=; b=qmJ2nUcUJ11o115WfMBlLZErw/FMWfy7J9zbze1rcKMo1IABrC+SstRFGTVZN8zN/i iY6AxQ50tjUJmUIhSLhZLocGydr52o2A4y75DRuJFIBMmwwXbAeq/GwbY+qeVa4gdziD JgIj5bTIIErx9483iB7caRRcTrmNY4sSfcB33XVd0VWESCo7eTRUfvwaKnWya+X+FNcq 0tRBXAF7SBRbIz0TcWHbuhuIy6116Oz5JokEnEnI2DeNYfp6J9KpqRcgx2QYaszEp0qW k5RmDvKaC3gE0GRAQA1MxbfLhwy8F0pBitDToeEohs1bI1APA206gTBumYqzdaBuqyTx v3Dg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=WN7ek4hw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Return-Path: Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id b10-20020a170902d50a00b001bf1d1d99b0si3700745plg.568.2023.10.06.03.09.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Oct 2023 03:09:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=WN7ek4hw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id AE25C80A9140; Fri, 6 Oct 2023 03:09:26 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231696AbjJFKJQ (ORCPT + 99 others); Fri, 6 Oct 2023 06:09:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52002 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231670AbjJFKJN (ORCPT ); Fri, 6 Oct 2023 06:09:13 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e5ab]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 85F8FD6; Fri, 6 Oct 2023 03:09:10 -0700 (PDT) Received: from [192.168.100.7] (unknown [39.34.184.141]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: usama.anjum) by madras.collabora.co.uk (Postfix) with ESMTPSA id 18EB86612212; Fri, 6 Oct 2023 11:09:07 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1696586949; bh=TzX85ikGFiA+2MMrjYo1iLdJ7uy0EZdxUXB9E/ajsGk=; h=Date:Cc:Subject:To:References:From:In-Reply-To:From; b=WN7ek4hwJWyvJFwkBjKVWGSSuG4rb9/mqTBzz2Gst0QshDrFX8MVC84O9jo+HJ+mR qOz3mvu203NDMo1+TCGJhdi2kuU5+1s9mdvJuuRuwWQZ9KwsS69il3i5+GkY4Dpo6r E6J/V9+499f/Po5A4fg7784Z9cZAT6T+POWIvI1E5FT8zDEwzXGyGesViWFRKRCCbg gWlsseGRjRBEX+LTNl74g8yvlzz6TmEbDYSi6zBW1vHNai+8k7ujNBZ67NfYgKj9gY iWOmMKXWtMu56DjgZb1ApLqDjkaczwAOCZtY0OfGyooIR6UOJqCyrqg+fItFobAjLo FAI/V8LtLGCHg== Message-ID: <369f876c-be07-41d9-b2fb-ec7d629f2d9b@collabora.com> Date: Fri, 6 Oct 2023 15:09:04 +0500 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Cc: Muhammad Usama Anjum , kernel@collabora.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/6] selftests: capabilities: remove duplicate unneeded defines Content-Language: en-US To: Shuah Khan , linux-kselftest@vger.kernel.org References: <20230805073809.1753462-1-usama.anjum@collabora.com> <95fc0e92-79ed-4748-a565-a82469d087f6@collabora.com> <9c0dae5b-a7ee-4399-abf3-883a5946f2f6@collabora.com> <1c0ce608-20a4-4b72-8d5e-5308e119959b@collabora.com> From: Muhammad Usama Anjum In-Reply-To: <1c0ce608-20a4-4b72-8d5e-5308e119959b@collabora.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=2.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Fri, 06 Oct 2023 03:09:26 -0700 (PDT) X-Spam-Level: ** On 10/6/23 1:33 PM, Muhammad Usama Anjum wrote: > On 9/4/23 3:48 PM, Muhammad Usama Anjum wrote: >> On 8/22/23 1:57 PM, Muhammad Usama Anjum wrote: >>> Hi Shuah, >>> >>> Christian Brauner had picked [PATCH 4/6]. Others are still not picked. >>> Please have a look. > Shuah, I thought you had picked up these patches. But I'm unable to find > them in the linux-next. I'll be re-sending 6th patch separately. Can you > please pick up patch number 1, 2, 3 and 5 to your tree? Sent v2 for your ease. It has same patches. https://lore.kernel.org/all/20231006100743.1631334-1-usama.anjum@collabora.com > > Thanks > >> Soft reminder >> >>> >>> Thanks, >>> Usama >>> >>> On 8/5/23 12:37 PM, Muhammad Usama Anjum wrote: >>>> These duplicate defines should automatically be picked up from kernel >>>> headers. Use KHDR_INCLUDES to add kernel header files. >>>> >>>> Signed-off-by: Muhammad Usama Anjum >>>> --- >>>> tools/testing/selftests/capabilities/Makefile | 2 +- >>>> tools/testing/selftests/capabilities/test_execve.c | 8 -------- >>>> tools/testing/selftests/capabilities/validate_cap.c | 8 -------- >>>> 3 files changed, 1 insertion(+), 17 deletions(-) >>>> >>>> diff --git a/tools/testing/selftests/capabilities/Makefile b/tools/testing/selftests/capabilities/Makefile >>>> index 6e9d98d457d5b..411ac098308f1 100644 >>>> --- a/tools/testing/selftests/capabilities/Makefile >>>> +++ b/tools/testing/selftests/capabilities/Makefile >>>> @@ -2,7 +2,7 @@ >>>> TEST_GEN_FILES := validate_cap >>>> TEST_GEN_PROGS := test_execve >>>> >>>> -CFLAGS += -O2 -g -std=gnu99 -Wall >>>> +CFLAGS += -O2 -g -std=gnu99 -Wall $(KHDR_INCLUDES) >>>> LDLIBS += -lcap-ng -lrt -ldl >>>> >>>> include ../lib.mk >>>> diff --git a/tools/testing/selftests/capabilities/test_execve.c b/tools/testing/selftests/capabilities/test_execve.c >>>> index df0ef02b40367..e3a352b020a79 100644 >>>> --- a/tools/testing/selftests/capabilities/test_execve.c >>>> +++ b/tools/testing/selftests/capabilities/test_execve.c >>>> @@ -20,14 +20,6 @@ >>>> >>>> #include "../kselftest.h" >>>> >>>> -#ifndef PR_CAP_AMBIENT >>>> -#define PR_CAP_AMBIENT 47 >>>> -# define PR_CAP_AMBIENT_IS_SET 1 >>>> -# define PR_CAP_AMBIENT_RAISE 2 >>>> -# define PR_CAP_AMBIENT_LOWER 3 >>>> -# define PR_CAP_AMBIENT_CLEAR_ALL 4 >>>> -#endif >>>> - >>>> static int nerrs; >>>> static pid_t mpid; /* main() pid is used to avoid duplicate test counts */ >>>> >>>> diff --git a/tools/testing/selftests/capabilities/validate_cap.c b/tools/testing/selftests/capabilities/validate_cap.c >>>> index cdfc94268fe6e..60b4e7b716a75 100644 >>>> --- a/tools/testing/selftests/capabilities/validate_cap.c >>>> +++ b/tools/testing/selftests/capabilities/validate_cap.c >>>> @@ -9,14 +9,6 @@ >>>> >>>> #include "../kselftest.h" >>>> >>>> -#ifndef PR_CAP_AMBIENT >>>> -#define PR_CAP_AMBIENT 47 >>>> -# define PR_CAP_AMBIENT_IS_SET 1 >>>> -# define PR_CAP_AMBIENT_RAISE 2 >>>> -# define PR_CAP_AMBIENT_LOWER 3 >>>> -# define PR_CAP_AMBIENT_CLEAR_ALL 4 >>>> -#endif >>>> - >>>> #if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) >>>> # define HAVE_GETAUXVAL >>>> #endif >>> >> > -- BR, Muhammad Usama Anjum