Received: by 2002:a05:6359:6284:b0:131:369:b2a3 with SMTP id se4csp852138rwb; Sat, 5 Aug 2023 02:18:59 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHwOHJh1x7SQp2L3RhhMu7T92pTHg+qpvzFKghf6WnOZs1JFQPX/8VHG/X+1rWQQok0Liag X-Received: by 2002:a17:902:ef8e:b0:1bb:91f2:bb32 with SMTP id iz14-20020a170902ef8e00b001bb91f2bb32mr4210073plb.39.1691227138868; Sat, 05 Aug 2023 02:18:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691227138; cv=none; d=google.com; s=arc-20160816; b=ASsp5OHwWAZpLfZwzdJ02YJtsTVhYib1o2qrgBA0V7UY15nIYLTZH+xRjv4lbxpFdr jUNSYsgKIHYl9A/+g3qj7pubhhjQIRs46Hg8PLotjRKz3dO+GX5v5WOsrW6NJJBw3ndg bmxUurEVIfk2iMd6Xp6qsh71SzCpYcceDspW9W7afkrim2sr06zF4/gX9E9rOlBFMWHV UalUvqkwhTuSK43v+CVeKp57ZhuVey8tJeCY3knMM1DJS+y3yDpJkDQVZ4F5bR5Ja09q nnN8oB+OQMLQqamVVQg77t54PHj0zVC9zoFVHIuk65Bu/RbDYPZTYm21Fg/5M9OF+2No 1YKg== 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=Hd9vPgkBmc6pYje7cUdzVlk0BZYswjjHWxQmKe8kCuk=; fh=75wuEtBkDdM9hKI3tsPHADTGAXOyE0eLpihrSICuDV8=; b=bUAjl64auN6DUwIx/P7cs3UAT22od1RP/xILa0v0UOCot7k85nk0MHFf11bQUnIvE1 msYF96B2ieqh/XRAFZOHHJA9JA6r0FDjXd/zYMM4hGcMvjjtYcaLM413FFLI4fMsBKou Lxd0XvNb7O6RWvyhF8nV/YxQ3Q6d7yFQPtlJdmmxViEGOIwJ9zfbBGvsFbfL6gt6yNsV SIv68nBihT67dA4MhJ08kuIq/giNpfxAYpyJLUuu+YxQ1MSc3q9EABEvhubJFJZDRhBT t32bl/7naeu+GFygW5NJ6ttpXxnfBUn6JbsALMelG/z8SQjUbmihbm1tNwZWYawvbaxg P58Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=mreXjLAs; 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=QUARANTINE sp=QUARANTINE 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 r11-20020a1709028bcb00b001b7f492469dsi2897310plo.434.2023.08.05.02.18.47; Sat, 05 Aug 2023 02:18:58 -0700 (PDT) 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=mreXjLAs; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229816AbjHEHiU (ORCPT + 99 others); Sat, 5 Aug 2023 03:38:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48438 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229379AbjHEHiT (ORCPT ); Sat, 5 Aug 2023 03:38:19 -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 6A8AA4ECB; Sat, 5 Aug 2023 00:38:18 -0700 (PDT) Received: from localhost.localdomain (unknown [59.103.216.172]) (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 8F7D16607185; Sat, 5 Aug 2023 08:38:14 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1691221096; bh=T1gmHJSmBZ1fsUMOMsX2TjrN4WmMi/RdeZt+BUdWBE4=; h=From:To:Cc:Subject:Date:From; b=mreXjLAsnKYryATtZ8P1ASgsHotjTcLRyKzRdkGE00wN3/dkfyl+3tvQGUs56Mfvc VLC6Qpv0dvdXI2fXXpqvC0fZSveMq6zyKreNgexdvPo53zfVr2Vc0zGlVPcFNLsGee JM38/VUtvZttrbKdTof33pwMhmhmaOVhHyqfKoxfxCS683g48OCjbnjdHK8+r7u475 jIAFzk1iSHeYXHrCKcFk9umHtQtWwileMpQyl84mtm6OUwQq46XeoG76/9kgjeSduy nLaTSWuOj5DqVer2G6GzvinziQsVOOfiXKFtKKV8OaIYAKa/UhlaNI0ynKggPKitlN 0ZONSjcbX02dg== 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 1/6] selftests: capabilities: remove duplicate unneeded defines Date: Sat, 5 Aug 2023 12:37:59 +0500 Message-Id: <20230805073809.1753462-1-usama.anjum@collabora.com> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED 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 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.39.2