Received: by 2002:a05:6359:6284:b0:131:369:b2a3 with SMTP id se4csp825860rwb; Sat, 5 Aug 2023 01:39:40 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHlAUfJ8V6eT3wArtnmIEklrTd0zK/IJl/7sI4+kS0udYeLmQgsEJawPJWOeBOJ4IrQRggS X-Received: by 2002:aca:1007:0:b0:3a7:372f:c1b1 with SMTP id 7-20020aca1007000000b003a7372fc1b1mr4968245oiq.48.1691224780317; Sat, 05 Aug 2023 01:39:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691224780; cv=none; d=google.com; s=arc-20160816; b=iDu7SMAsoSTNvePNyd4SgxVTt/PJd4fFEQsB2fDm5udcTR1QvQzu4ZLaH/c68PQSfA aM75qCdda2SJdUt23Vdmj5yz00bMCYc+h3uD/Pd5yb0HMTyiJX5kqbpDKf/s4zdvb3lI 3ZSugMfW+5rqa7qhFV3VuORULtUHBWvTYZte0jq44ubfDTfBEtOk0QieirtMhO4v13aw LIyUvZGVh1M9gSvjgJa5jR4ICV9LtX2ovnE2b7rH23l83pzfFvcfEu67RoO2snVadEB4 odcPvUJtCh5jgB0WkOgEvCnCi2CmuKt7Hr8AsQMbEdzCB4x2tbBY2wqGGFOtZtaXieYL pt0w== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=S5AjKy5qIrHlbL/+UyCAifBaMGr51UpcmV+C78x4ZUY=; fh=izMzeQwcxs3fwHhUwsXigBC2gYv79e9bOKvyRHGWFxE=; b=gHlTwtda8NBeE2Ag6vxaHm4Ozpdt55tUErUWG4/u7i/WFcdqrbeDLQhQlqQ5pxGCu3 Wm8FglQ8aIw112wLszE/aoCjCuLfXD719M+k0/OCZPHOk4F4dYxyvpu1Os/RpVzXMwvD mjJmvttpQcqUcqxICRIjFfTBcxQqeKFki/j/fi437TvHSAw6WnIzRGOYxZk/wxnf3bZG Q8EQTDJLSfA4kbH8NJZ4XRlKkegG0y8nnpuJdlVijbQ/v1ryErnX/vNUs1mKfjJrpG5D QYTjlmv7h4NDbcHYtitotUkCg9tpbpq4FVO8u+NYFJkh+hZZEip5CIYDGyuHbjJwSTjl 7GYg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=h48Ay0pR; 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 185-20020a6300c2000000b00563d791d978si2918130pga.750.2023.08.05.01.39.28; Sat, 05 Aug 2023 01:39:40 -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=h48Ay0pR; 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 S229639AbjHEHiW (ORCPT + 99 others); Sat, 5 Aug 2023 03:38:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48444 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229493AbjHEHiU (ORCPT ); Sat, 5 Aug 2023 03:38:20 -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 94F794EC9; Sat, 5 Aug 2023 00:38:19 -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 1FE4D66071AA; Sat, 5 Aug 2023 08:38:16 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1691221098; bh=GzjRATlgGitRF0V9m5rFod6Kq8RaT1OYHkP3KnFTooY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=h48Ay0pR0UV9/WSwc4+0lMrsMwIUfCl4GzGUXn6+PaSV4BSkhZvp9unn2QFxEO0SG iVlRR7jpaWuWBVd8wvBUfEbicVVmKv5AdYxyCVJP1ZLqJSiLl+wwl49r/OlzKvjFhB b+5LJlGcYAtFPP8s2bJjwu/8BGNYGyk2JmCEtKn0KeBxP4ldes+bPXd1iNRTnQ8pJu j98RGmG9ByHCj8jSZCtm+AeJSRcX769NyJVLUsAO90NF5RuHdOJ7NFA4xeYHYgWFCN CR5VXJIwxAgHYXpA9uRbTnftmxpzTqjMF1pfZGdlLMUc69ikKYmCcg4oZR4GE3VnnY wpl2g3/jyVRxw== From: Muhammad Usama Anjum To: Christian Brauner , Shuah Khan Cc: usama.anjum@collabora.com, kernel@collabora.com, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org Subject: [PATCH 2/6] selftests: clone3: remove duplicate defines Date: Sat, 5 Aug 2023 12:38:00 +0500 Message-Id: <20230805073809.1753462-2-usama.anjum@collabora.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230805073809.1753462-1-usama.anjum@collabora.com> References: <20230805073809.1753462-1-usama.anjum@collabora.com> 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 Remove duplicate defines which are included in kernel headers. MAX_PID_NS_LEVEL macro is used inside kernel only. It isn't exposed to userspace. So it is never defined in test application. Remove #ifndef in this case. Signed-off-by: Muhammad Usama Anjum --- .../clone3/clone3_cap_checkpoint_restore.c | 2 -- .../testing/selftests/clone3/clone3_clear_sighand.c | 4 ---- tools/testing/selftests/clone3/clone3_selftests.h | 13 ------------- tools/testing/selftests/clone3/clone3_set_tid.c | 2 -- 4 files changed, 21 deletions(-) diff --git a/tools/testing/selftests/clone3/clone3_cap_checkpoint_restore.c b/tools/testing/selftests/clone3/clone3_cap_checkpoint_restore.c index 52d3f0364bdaa..31b56d6256550 100644 --- a/tools/testing/selftests/clone3/clone3_cap_checkpoint_restore.c +++ b/tools/testing/selftests/clone3/clone3_cap_checkpoint_restore.c @@ -27,9 +27,7 @@ #include "../kselftest_harness.h" #include "clone3_selftests.h" -#ifndef MAX_PID_NS_LEVEL #define MAX_PID_NS_LEVEL 32 -#endif static void child_exit(int ret) { diff --git a/tools/testing/selftests/clone3/clone3_clear_sighand.c b/tools/testing/selftests/clone3/clone3_clear_sighand.c index 47a8c0fc3676b..54a8b2445be99 100644 --- a/tools/testing/selftests/clone3/clone3_clear_sighand.c +++ b/tools/testing/selftests/clone3/clone3_clear_sighand.c @@ -16,10 +16,6 @@ #include "../kselftest.h" #include "clone3_selftests.h" -#ifndef CLONE_CLEAR_SIGHAND -#define CLONE_CLEAR_SIGHAND 0x100000000ULL -#endif - static void nop_handler(int signo) { } diff --git a/tools/testing/selftests/clone3/clone3_selftests.h b/tools/testing/selftests/clone3/clone3_selftests.h index e81ffaaee02ba..3d2663fe50ba5 100644 --- a/tools/testing/selftests/clone3/clone3_selftests.h +++ b/tools/testing/selftests/clone3/clone3_selftests.h @@ -15,10 +15,6 @@ #define ptr_to_u64(ptr) ((__u64)((uintptr_t)(ptr))) -#ifndef CLONE_INTO_CGROUP -#define CLONE_INTO_CGROUP 0x200000000ULL /* Clone into a specific cgroup given the right permissions. */ -#endif - #ifndef __NR_clone3 #define __NR_clone3 -1 #endif @@ -32,18 +28,9 @@ struct __clone_args { __aligned_u64 stack; __aligned_u64 stack_size; __aligned_u64 tls; -#ifndef CLONE_ARGS_SIZE_VER0 -#define CLONE_ARGS_SIZE_VER0 64 /* sizeof first published struct */ -#endif __aligned_u64 set_tid; __aligned_u64 set_tid_size; -#ifndef CLONE_ARGS_SIZE_VER1 -#define CLONE_ARGS_SIZE_VER1 80 /* sizeof second published struct */ -#endif __aligned_u64 cgroup; -#ifndef CLONE_ARGS_SIZE_VER2 -#define CLONE_ARGS_SIZE_VER2 88 /* sizeof third published struct */ -#endif }; static pid_t sys_clone3(struct __clone_args *args, size_t size) diff --git a/tools/testing/selftests/clone3/clone3_set_tid.c b/tools/testing/selftests/clone3/clone3_set_tid.c index 0229e9ebb995e..ed785afb60770 100644 --- a/tools/testing/selftests/clone3/clone3_set_tid.c +++ b/tools/testing/selftests/clone3/clone3_set_tid.c @@ -23,9 +23,7 @@ #include "../kselftest.h" #include "clone3_selftests.h" -#ifndef MAX_PID_NS_LEVEL #define MAX_PID_NS_LEVEL 32 -#endif static int pipe_1[2]; static int pipe_2[2]; -- 2.39.2