Message ID | 20230805073809.1753462-6-usama.anjum@collabora.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:c44e:0:b0:3f2:4152:657d with SMTP id w14csp340953vqr; Sat, 5 Aug 2023 01:39:07 -0700 (PDT) X-Google-Smtp-Source: AGHT+IElHk3BKm4ZnF/PWfoy1bXE6e8XMt9FaK8lGpk2s7OwBnvGJUcREDBxnoAqxaxc15dvct18 X-Received: by 2002:a05:6a20:ce83:b0:138:1980:1837 with SMTP id if3-20020a056a20ce8300b0013819801837mr4969859pzb.13.1691224746893; Sat, 05 Aug 2023 01:39:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691224746; cv=none; d=google.com; s=arc-20160816; b=Eml3T0mckX3SRUKBJQa6Yf4/m15IybTlDk+2byFCnTmaYum1e5cgYg75eB5IecirN1 Gu6KF4tVmBPFNWXp3Tqed1Kx6e4fXn1APRo16MND9itbadKXYwhsWvP/pJeaPlacOysR qBCI/WJrXP/0B9v0RmlCq0L0KyCXNee/WWEzWx6b25xyALTnN15fEgU/Q6vFAhbn7DZH vnqwwQL+Tz4ym19ney4MCGCixKI5v3hAKv5ieYepKJlJbzihI/JkEbI3FfRM1EOgEPAa Fwcq/u0USQNWnItgjIr/I0tXgM9ZyjwKWYNUBkeg3RAkRPf9W2e36fNdPc7Kz6MUEiEm 961g== 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=SWYuMmvQxrE0C2Q58b7iOlLYsdHsEmARPJwt1wpumhg=; fh=PcoZMbcKYbKmj+QmqQl6TrBMUkld9iGMF6z7OuX15w8=; b=07RcaJ26ZmjlKdOiW5B3SdizV7IDILYQ9gxCgox/iIJw22rWOdkTIfvDidz2BcMMUn wJn6MiujwDusHk3Cgzwh0TYmE7Z+Jo7MJzVh5m3rRG3YCUSOpZoNe91vhw7fkzN5CDd+ 60sK4uu4mgxl2XuSpEapxUgA1VWspAnrku598bB2pWxmsOJZOKmlU5ikxE47z3gIkfvD T7OXWxYXvQ59aV13BrkVMZqHoLxuXR64GdhfxjG34PsDLDtb8bkC1ttt9ekQlfo0Hi5I MSbckEBM549CNlKoBmPgPQs+WL7FxxgO5siJNi78TNyAOwjXdeMbWaVZlwi6r/gWTnC/ /zOg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b="A74+WQJ/"; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g30-20020a63201e000000b00560132689ccsi2916193pgg.349.2023.08.05.01.38.53; Sat, 05 Aug 2023 01:39:06 -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="A74+WQJ/"; 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 S229990AbjHEHja (ORCPT <rfc822;liqunnana@gmail.com> + 99 others); Sat, 5 Aug 2023 03:39:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48534 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229919AbjHEHjH (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Sat, 5 Aug 2023 03:39:07 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 95C565592; Sat, 5 Aug 2023 00:38:45 -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 321B166071AB; Sat, 5 Aug 2023 08:38:41 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1691221123; bh=4K168XhtWURZ6JEq6/gnWN5amqD8CeZn6UF+Ktx7Q20=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=A74+WQJ/WMODJfBalTyPaAa6GodeMw339LFqEmP4CeJ/6BboV/8J+rpjplbyYsiJZ 1Za/TOXWRIumCHlFWFQmaqlGWGBwu0ay2UmP314XlpovQfG06uTA3qbpR40YEa4Ryn BU4u8JuSkLgg5QaMOTM6J6NazqR9rznUe6Xc2jhHYFx9GdxmMs30scpV35XlZ5nnhK K7giYk+HzPm758h83+syov82tH52Hs8qx/oV/M6x3RaHMzFFc7X2rsuMIB5Z9hhY1X KPZY/NxOx4lmxiBtMfNJhH28b2O0SSWd9r4KYI/f4trW/iXj4OtJ0BpGoKFk1It1vY waW74pbtMBiLg== From: Muhammad Usama Anjum <usama.anjum@collabora.com> To: Thomas Gleixner <tglx@linutronix.de>, Ingo Molnar <mingo@redhat.com>, Peter Zijlstra <peterz@infradead.org>, Darren Hart <dvhart@infradead.org>, Davidlohr Bueso <dave@stgolabs.net>, =?utf-8?q?Andr=C3=A9_Almeida?= <andrealmeid@igalia.com>, Shuah Khan <shuah@kernel.org>, Muhammad Usama Anjum <usama.anjum@collabora.com> Cc: kernel@collabora.com, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org Subject: [PATCH 6/6] selftests: futex: remove duplicate unneeded defines Date: Sat, 5 Aug 2023 12:38:04 +0500 Message-Id: <20230805073809.1753462-6-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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1773377680016847936 X-GMAIL-MSGID: 1773377680016847936 |
Series |
[1/6] selftests: capabilities: remove duplicate unneeded defines
|
|
Commit Message
Muhammad Usama Anjum
Aug. 5, 2023, 7:38 a.m. UTC
Kselftests are kernel tests and must be build with kernel headers from
same source version. These duplicate defines should automatically
picked up from kernel headers. Use KHDR_INCLUDES to add kernel header
files.
Signed-off-by: Muhammad Usama Anjum <usama.anjum@collabora.com>
---
.../selftests/futex/include/futextest.h | 22 -------------------
1 file changed, 22 deletions(-)
Comments
* Muhammad Usama Anjum <usama.anjum@collabora.com> wrote: > Kselftests are kernel tests and must be build with kernel headers from > same source version. These duplicate defines should automatically > picked up from kernel headers. Use KHDR_INCLUDES to add kernel header > files. > > Signed-off-by: Muhammad Usama Anjum <usama.anjum@collabora.com> > --- > .../selftests/futex/include/futextest.h | 22 ------------------- > 1 file changed, 22 deletions(-) > > diff --git a/tools/testing/selftests/futex/include/futextest.h b/tools/testing/selftests/futex/include/futextest.h > index ddbcfc9b7bac4..59f66af3a6d10 100644 > --- a/tools/testing/selftests/futex/include/futextest.h > +++ b/tools/testing/selftests/futex/include/futextest.h > @@ -25,28 +25,6 @@ > typedef volatile u_int32_t futex_t; > #define FUTEX_INITIALIZER 0 > > -/* Define the newer op codes if the system header file is not up to date. */ > -#ifndef FUTEX_WAIT_BITSET > -#define FUTEX_WAIT_BITSET 9 > -#endif > -#ifndef FUTEX_WAKE_BITSET > -#define FUTEX_WAKE_BITSET 10 > -#endif > -#ifndef FUTEX_WAIT_REQUEUE_PI > -#define FUTEX_WAIT_REQUEUE_PI 11 > -#endif > -#ifndef FUTEX_CMP_REQUEUE_PI > -#define FUTEX_CMP_REQUEUE_PI 12 > -#endif > -#ifndef FUTEX_WAIT_REQUEUE_PI_PRIVATE > -#define FUTEX_WAIT_REQUEUE_PI_PRIVATE (FUTEX_WAIT_REQUEUE_PI | \ > - FUTEX_PRIVATE_FLAG) > -#endif > -#ifndef FUTEX_REQUEUE_PI_PRIVATE > -#define FUTEX_CMP_REQUEUE_PI_PRIVATE (FUTEX_CMP_REQUEUE_PI | \ > - FUTEX_PRIVATE_FLAG) > -#endif AFAICT I cannot really pick this up into the locking tree as-is, as this patch relies on the KHDR_INCLUDES change in patch #1, so that all self-tests get the kernel headers included, correct? Thanks, Ingo
On 10/3/23 1:46 PM, Ingo Molnar wrote: > > * Muhammad Usama Anjum <usama.anjum@collabora.com> wrote: > >> Kselftests are kernel tests and must be build with kernel headers from >> same source version. These duplicate defines should automatically >> picked up from kernel headers. Use KHDR_INCLUDES to add kernel header >> files. >> >> Signed-off-by: Muhammad Usama Anjum <usama.anjum@collabora.com> >> --- >> .../selftests/futex/include/futextest.h | 22 ------------------- >> 1 file changed, 22 deletions(-) >> >> diff --git a/tools/testing/selftests/futex/include/futextest.h b/tools/testing/selftests/futex/include/futextest.h >> index ddbcfc9b7bac4..59f66af3a6d10 100644 >> --- a/tools/testing/selftests/futex/include/futextest.h >> +++ b/tools/testing/selftests/futex/include/futextest.h >> @@ -25,28 +25,6 @@ >> typedef volatile u_int32_t futex_t; >> #define FUTEX_INITIALIZER 0 >> >> -/* Define the newer op codes if the system header file is not up to date. */ >> -#ifndef FUTEX_WAIT_BITSET >> -#define FUTEX_WAIT_BITSET 9 >> -#endif >> -#ifndef FUTEX_WAKE_BITSET >> -#define FUTEX_WAKE_BITSET 10 >> -#endif >> -#ifndef FUTEX_WAIT_REQUEUE_PI >> -#define FUTEX_WAIT_REQUEUE_PI 11 >> -#endif >> -#ifndef FUTEX_CMP_REQUEUE_PI >> -#define FUTEX_CMP_REQUEUE_PI 12 >> -#endif >> -#ifndef FUTEX_WAIT_REQUEUE_PI_PRIVATE >> -#define FUTEX_WAIT_REQUEUE_PI_PRIVATE (FUTEX_WAIT_REQUEUE_PI | \ >> - FUTEX_PRIVATE_FLAG) >> -#endif >> -#ifndef FUTEX_REQUEUE_PI_PRIVATE >> -#define FUTEX_CMP_REQUEUE_PI_PRIVATE (FUTEX_CMP_REQUEUE_PI | \ >> - FUTEX_PRIVATE_FLAG) >> -#endif > > AFAICT I cannot really pick this up into the locking tree as-is, as this patch > relies on the KHDR_INCLUDES change in patch #1, so that all self-tests get the > kernel headers included, correct? No this patch is self contained and doesn't depend on the patch #1. KHDR_INCLUDES was included several releases back in kselftest's Makefile and in kselftests of futex. Correct headers are being included already. In this patch, I'm removing just the un-needed dead code. Other patches were already picked up by other maintainers. > > Thanks, > > Ingo
* Muhammad Usama Anjum <usama.anjum@collabora.com> wrote: > On 10/3/23 1:46 PM, Ingo Molnar wrote: > > > > * Muhammad Usama Anjum <usama.anjum@collabora.com> wrote: > > > >> Kselftests are kernel tests and must be build with kernel headers from > >> same source version. These duplicate defines should automatically > >> picked up from kernel headers. Use KHDR_INCLUDES to add kernel header > >> files. > >> > >> Signed-off-by: Muhammad Usama Anjum <usama.anjum@collabora.com> > >> --- > >> .../selftests/futex/include/futextest.h | 22 ------------------- > >> 1 file changed, 22 deletions(-) > >> > >> diff --git a/tools/testing/selftests/futex/include/futextest.h b/tools/testing/selftests/futex/include/futextest.h > >> index ddbcfc9b7bac4..59f66af3a6d10 100644 > >> --- a/tools/testing/selftests/futex/include/futextest.h > >> +++ b/tools/testing/selftests/futex/include/futextest.h > >> @@ -25,28 +25,6 @@ > >> typedef volatile u_int32_t futex_t; > >> #define FUTEX_INITIALIZER 0 > >> > >> -/* Define the newer op codes if the system header file is not up to date. */ > >> -#ifndef FUTEX_WAIT_BITSET > >> -#define FUTEX_WAIT_BITSET 9 > >> -#endif > >> -#ifndef FUTEX_WAKE_BITSET > >> -#define FUTEX_WAKE_BITSET 10 > >> -#endif > >> -#ifndef FUTEX_WAIT_REQUEUE_PI > >> -#define FUTEX_WAIT_REQUEUE_PI 11 > >> -#endif > >> -#ifndef FUTEX_CMP_REQUEUE_PI > >> -#define FUTEX_CMP_REQUEUE_PI 12 > >> -#endif > >> -#ifndef FUTEX_WAIT_REQUEUE_PI_PRIVATE > >> -#define FUTEX_WAIT_REQUEUE_PI_PRIVATE (FUTEX_WAIT_REQUEUE_PI | \ > >> - FUTEX_PRIVATE_FLAG) > >> -#endif > >> -#ifndef FUTEX_REQUEUE_PI_PRIVATE > >> -#define FUTEX_CMP_REQUEUE_PI_PRIVATE (FUTEX_CMP_REQUEUE_PI | \ > >> - FUTEX_PRIVATE_FLAG) > >> -#endif > > > > AFAICT I cannot really pick this up into the locking tree as-is, as this patch > > relies on the KHDR_INCLUDES change in patch #1, so that all self-tests get the > > kernel headers included, correct? > No this patch is self contained and doesn't depend on the patch #1. > KHDR_INCLUDES was included several releases back in kselftest's Makefile > and in kselftests of futex. Correct headers are being included already. In > this patch, I'm removing just the un-needed dead code. Other patches were > already picked up by other maintainers. So the changelog does not match that characterization, it talks about KHDR_INCLUDES in the present tense, and patch #1 adds the KHDR_INCLUDES, which further suggested a dependency to me: > >> Kselftests are kernel tests and must be build with kernel headers from > >> same source version. These duplicate defines should automatically > >> picked up from kernel headers. Use KHDR_INCLUDES to add kernel header ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > >> files. ^^^^^^ Could you please re-send it with the changelog updated that makes it clear that this patch works fine standalone against current mainline kernels? Thanks, Ingo
On 10/6/23 1:25 AM, Ingo Molnar wrote: > > * Muhammad Usama Anjum <usama.anjum@collabora.com> wrote: > >> On 10/3/23 1:46 PM, Ingo Molnar wrote: >>> >>> * Muhammad Usama Anjum <usama.anjum@collabora.com> wrote: >>> >>>> Kselftests are kernel tests and must be build with kernel headers from >>>> same source version. These duplicate defines should automatically >>>> picked up from kernel headers. Use KHDR_INCLUDES to add kernel header >>>> files. >>>> >>>> Signed-off-by: Muhammad Usama Anjum <usama.anjum@collabora.com> >>>> --- >>>> .../selftests/futex/include/futextest.h | 22 ------------------- >>>> 1 file changed, 22 deletions(-) >>>> >>>> diff --git a/tools/testing/selftests/futex/include/futextest.h b/tools/testing/selftests/futex/include/futextest.h >>>> index ddbcfc9b7bac4..59f66af3a6d10 100644 >>>> --- a/tools/testing/selftests/futex/include/futextest.h >>>> +++ b/tools/testing/selftests/futex/include/futextest.h >>>> @@ -25,28 +25,6 @@ >>>> typedef volatile u_int32_t futex_t; >>>> #define FUTEX_INITIALIZER 0 >>>> >>>> -/* Define the newer op codes if the system header file is not up to date. */ >>>> -#ifndef FUTEX_WAIT_BITSET >>>> -#define FUTEX_WAIT_BITSET 9 >>>> -#endif >>>> -#ifndef FUTEX_WAKE_BITSET >>>> -#define FUTEX_WAKE_BITSET 10 >>>> -#endif >>>> -#ifndef FUTEX_WAIT_REQUEUE_PI >>>> -#define FUTEX_WAIT_REQUEUE_PI 11 >>>> -#endif >>>> -#ifndef FUTEX_CMP_REQUEUE_PI >>>> -#define FUTEX_CMP_REQUEUE_PI 12 >>>> -#endif >>>> -#ifndef FUTEX_WAIT_REQUEUE_PI_PRIVATE >>>> -#define FUTEX_WAIT_REQUEUE_PI_PRIVATE (FUTEX_WAIT_REQUEUE_PI | \ >>>> - FUTEX_PRIVATE_FLAG) >>>> -#endif >>>> -#ifndef FUTEX_REQUEUE_PI_PRIVATE >>>> -#define FUTEX_CMP_REQUEUE_PI_PRIVATE (FUTEX_CMP_REQUEUE_PI | \ >>>> - FUTEX_PRIVATE_FLAG) >>>> -#endif >>> >>> AFAICT I cannot really pick this up into the locking tree as-is, as this patch >>> relies on the KHDR_INCLUDES change in patch #1, so that all self-tests get the >>> kernel headers included, correct? >> No this patch is self contained and doesn't depend on the patch #1. >> KHDR_INCLUDES was included several releases back in kselftest's Makefile >> and in kselftests of futex. Correct headers are being included already. In >> this patch, I'm removing just the un-needed dead code. Other patches were >> already picked up by other maintainers. > > So the changelog does not match that characterization, it talks about > KHDR_INCLUDES in the present tense, and patch #1 adds the KHDR_INCLUDES, > which further suggested a dependency to me: Sorry, so the working of the change-log isn't clear enough. I'll send the patch separately and with better wording. > >>>> Kselftests are kernel tests and must be build with kernel headers from >>>> same source version. These duplicate defines should automatically >>>> picked up from kernel headers. Use KHDR_INCLUDES to add kernel header > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >>>> files. > ^^^^^^ > > Could you please re-send it with the changelog updated that makes it clear > that this patch works fine standalone against current mainline kernels? > > Thanks, > > Ingo
* Muhammad Usama Anjum <usama.anjum@collabora.com> wrote: > Sorry, so the working of the change-log isn't clear enough. I'll send the > patch separately and with better wording. Thank you! Ingo
diff --git a/tools/testing/selftests/futex/include/futextest.h b/tools/testing/selftests/futex/include/futextest.h index ddbcfc9b7bac4..59f66af3a6d10 100644 --- a/tools/testing/selftests/futex/include/futextest.h +++ b/tools/testing/selftests/futex/include/futextest.h @@ -25,28 +25,6 @@ typedef volatile u_int32_t futex_t; #define FUTEX_INITIALIZER 0 -/* Define the newer op codes if the system header file is not up to date. */ -#ifndef FUTEX_WAIT_BITSET -#define FUTEX_WAIT_BITSET 9 -#endif -#ifndef FUTEX_WAKE_BITSET -#define FUTEX_WAKE_BITSET 10 -#endif -#ifndef FUTEX_WAIT_REQUEUE_PI -#define FUTEX_WAIT_REQUEUE_PI 11 -#endif -#ifndef FUTEX_CMP_REQUEUE_PI -#define FUTEX_CMP_REQUEUE_PI 12 -#endif -#ifndef FUTEX_WAIT_REQUEUE_PI_PRIVATE -#define FUTEX_WAIT_REQUEUE_PI_PRIVATE (FUTEX_WAIT_REQUEUE_PI | \ - FUTEX_PRIVATE_FLAG) -#endif -#ifndef FUTEX_REQUEUE_PI_PRIVATE -#define FUTEX_CMP_REQUEUE_PI_PRIVATE (FUTEX_CMP_REQUEUE_PI | \ - FUTEX_PRIVATE_FLAG) -#endif - /** * futex() - SYS_futex syscall wrapper * @uaddr: address of first futex