Received: by 2002:a05:7412:da14:b0:e2:908c:2ebd with SMTP id fe20csp272325rdb; Fri, 6 Oct 2023 03:08:17 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF2+Cvm1C2YGeRlSn9ypeAPTel9ViKzVH2KEZg2Kf/3qVUg4zIk8De+pcXAKyFtAnL+kdLN X-Received: by 2002:a05:6e02:1bc7:b0:34f:7e1b:a7a2 with SMTP id x7-20020a056e021bc700b0034f7e1ba7a2mr8951725ilv.13.1696586897500; Fri, 06 Oct 2023 03:08:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696586897; cv=none; d=google.com; s=arc-20160816; b=y7M4OYUr8CmS8pHBncuDHrOXs5Cu9yBPPIYAyHAQVpi/0NDhfTmiAB8+84jyhVhNuF 9j+mSqnsaxMc5oeHb8+NSS2acTdghi6192WmZA5NZ90J17ErBqYlB9DT6a3V7ZCjthCC OWTNdoHTQmnS2VY3g5T/9OQk2VLXoMMwPtozg5i6N7QA3d3jsoJRqwd6U/7v44e2KO73 /z4vhfEN62btd3Ee28pXCGYDR27X42MRy5pArHqtvHNqC67FPLMm7fQLnH3otKRzlQ9T qGmRetAuXgkctDA90JVPTJzUMScDbeOpHDYBo/p5nxxbFQtyFTHg2Pwr3M4rpqFKBMDh L+Sw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=AYEOFevh8dzn09wV3YUqaz1Wg7ArG+bdHXuFbRTpk6k=; fh=3ITA+hG5KH7F/YE3za0C4YE3vOQC6OhXaAYfDI4ufbk=; b=xg5u9yK1xEcd7eIFViPuntJquR1osGRaRb8ZTAUF4kXC7EuROEtgNQIgAc2FJfhDnw psaqAQzzoVQX9/LnEjNRZ7zv5S4JRx3mj71gRxdvo/Lqni8BvL2ynC+MTy8maEDCZmvU zzUFxszgeT8s0nlX86lP2Jupbk6jbDDoWk1YRS8M+7zBcjALEjpk9QrvBKqRegCDcA2Q rWXj863Om3L84j+FYEYWFz44uVYkEC2yrFxyNUq9Iu4QREREav2Iy/ekOfi9td/iO0dM G0DP+83FZVwtNoM4I/msmJMuTkdOqruwCMEY24anC1UGJrNn2wnY7ArwMvsjNv47oO5+ v6bQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=jrP5aWqx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 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 morse.vger.email (morse.vger.email. [2620:137:e000::3:1]) by mx.google.com with ESMTPS id l17-20020a635711000000b005891f74294csi3380442pgb.246.2023.10.06.03.08.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Oct 2023 03:08:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) client-ip=2620:137:e000::3:1; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=jrP5aWqx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 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 morse.vger.email (Postfix) with ESMTP id 9ED45805F2E3; Fri, 6 Oct 2023 03:08:14 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231592AbjJFKIG (ORCPT + 99 others); Fri, 6 Oct 2023 06:08:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40928 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231207AbjJFKIE (ORCPT ); Fri, 6 Oct 2023 06:08:04 -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 CD3EF9F; Fri, 6 Oct 2023 03:08:02 -0700 (PDT) Received: from localhost.localdomain (unknown [39.34.184.141]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 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 54FB96612212; Fri, 6 Oct 2023 11:07:59 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1696586880; bh=/P0lxjquv/ZpR7Ni5SUJUUznYG0dkXXtdTFeHTzDUQo=; h=From:To:Cc:Subject:Date:From; b=jrP5aWqxBLjtDs2aLqN/U/f8VbG2WqcULJYTBjKFFBLvQDcjBxW9tvMx6p7w+1JAI YuIUBqH82skD1jce04v3XMOqMpvQuJti0FPhIq7t4WmHefpTEs8zenu2WlkPt5t3hs xqkLrHYJWvUwuG823jb8wcDLQHpHWaQxG7GuEw1dj0ZCNPCFEOqygjGknF1ymBKqUV RARjFl5dV3h89NAmZJJJwK6YyUbgHuOXt4sGsEvfUHctB9Hug6dgMbl8LfyMsI4+8r 1G/0/hdMZjLgeobtBZQEPNbfhDueSeGxy3rXvbyYgceMhjNZHbGoBmcNsi1WoIbEFC ZsT5y5Q6PwJXg== From: Muhammad Usama Anjum To: Shuah Khan , Muhammad Usama Anjum Cc: kernel@collabora.com, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 1/4] selftests: capabilities: remove duplicate unneeded defines Date: Fri, 6 Oct 2023 15:07:35 +0500 Message-Id: <20231006100743.1631334-1-usama.anjum@collabora.com> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 morse.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 (morse.vger.email [0.0.0.0]); Fri, 06 Oct 2023 03:08:14 -0700 (PDT) X-Spam-Level: ** 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 -- 2.40.1