Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp903900pxb; Tue, 1 Feb 2022 12:50:42 -0800 (PST) X-Google-Smtp-Source: ABdhPJxdGA+JDMbnigaDI/Tuu71zYg0Oz4aBW0dBgl3fSFH+8BnnLkvosK8Vq3Dy0ej0gSBoZ3vz X-Received: by 2002:a17:903:1209:: with SMTP id l9mr27328764plh.3.1643748642467; Tue, 01 Feb 2022 12:50:42 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j13si17760589plr.416.2022.02.01.12.50.30; Tue, 01 Feb 2022 12:50:42 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=jt5wG+BR; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1380789AbiAaVU7 (ORCPT + 99 others); Mon, 31 Jan 2022 16:20:59 -0500 Received: from mga18.intel.com ([134.134.136.126]:50103 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1380665AbiAaVU2 (ORCPT ); Mon, 31 Jan 2022 16:20:28 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1643664028; x=1675200028; h=message-id:date:subject:to:cc:references:from: in-reply-to:content-transfer-encoding:mime-version; bh=pziNtz0vPAOyGVwmTRUofncrGFl1uXhRxX1dvbP4T/g=; b=jt5wG+BRQaIWF3kQ1Ph8AYw3av0Rib2Eu2rZxL++V9YQqbdwSsx0btBW RC8xmdHmMS2CPVi5TsnWfkt2aQ4N+6eoc1Gr7hBELXayPgWZRuQhOFtyI EK/Yp7v6p21PowVI3Jgnl808qm7ueEV6bZ86oKDp9wnLggomB1SdWxQUO i/OQ6METRD2M/dGoe6N2pkalxArRWuYnW7Pb7VDKHLLE1KA9dGCWJ9Xaz JFLjoP/RkmQqTFoLQcG716sTFvsVaTSpmv9vlWpM4ZyEDChc2gYSSxAs9 FrydYVOqubL33O4IKPhCfuUpQ8n8OAdCIYy7P1RQHza8oj9agvbeYZq9o Q==; X-IronPort-AV: E=McAfee;i="6200,9189,10244"; a="231123342" X-IronPort-AV: E=Sophos;i="5.88,331,1635231600"; d="scan'208";a="231123342" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Jan 2022 13:20:24 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,331,1635231600"; d="scan'208";a="770903099" Received: from fmsmsx603.amr.corp.intel.com ([10.18.126.83]) by fmsmga005.fm.intel.com with ESMTP; 31 Jan 2022 13:20:24 -0800 Received: from fmsmsx611.amr.corp.intel.com (10.18.126.91) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Mon, 31 Jan 2022 13:20:23 -0800 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx611.amr.corp.intel.com (10.18.126.91) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20 via Frontend Transport; Mon, 31 Jan 2022 13:20:23 -0800 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (104.47.58.104) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.20; Mon, 31 Jan 2022 13:20:23 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=I3+Rye0JvQE5AWzR2PNBateb0fG4SiL119h9Yeu0sWWECEdI9t48RIvqkpjSsRNKwJeJxs8FZw5hFxpc8vyKk3IHxxiq06aoCXUWa/rTK0vqsy5rhvirwBQmjKVqeu03gi3ybAy1C6sk19n/JQ4X2lE8pRaEYe/fWL816kUDr0+pZ2CBWyF24aENeeP48LQygSraSU2wmtmdiAznlAeQX09YugBGjGyijjzibHKIRT17dEPJN5tYFW4Au4dvKIDO3tvuj+i85qkScgYhQxriI8MzN2cnrUbIFQcwM9QwIW1DZRI8qDCG8IW9Ztns46q2HR7fdpjcyERrbVFdw/fNBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=LwwKbPkvAXPWHuQHFvLehaFyKJb38aUPP38HiQsZImI=; b=Oawa9ABr8lTJsAPhzWC2lSn4FL7OB+5O8ffzgJ90yt4x1b50nuoh+gVLdd4CKVQT1Iv+gHAWXDOy9i1RbLMcllqy0CzCpA0iRH+kQr6E+x5lT1I5LLm+ENWraU51RPbE0afq8+svA8mB8Q3HpPKd402EJuof6GOSDMsJMm2eJyzzing4/UgucbhtfKaFUYixNUvzyNnuFdFjE6JEEtovDGJwlKspRd6y7nQCHJCCKqbvfOUAjgyPExXUkSYKVGEjJlNQmFATxEB6yG8yuqW5laYVwbgiUGVBsGoArn1EW2Bx6DvBYxUvBVZ8toCLrp6CvI1asOR9a+KryNtJoPuYuw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from BN0PR11MB5744.namprd11.prod.outlook.com (2603:10b6:408:166::16) by CH0PR11MB5753.namprd11.prod.outlook.com (2603:10b6:610:101::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4930.21; Mon, 31 Jan 2022 21:20:22 +0000 Received: from BN0PR11MB5744.namprd11.prod.outlook.com ([fe80::a113:192a:3201:1e0]) by BN0PR11MB5744.namprd11.prod.outlook.com ([fe80::a113:192a:3201:1e0%9]) with mapi id 15.20.4930.022; Mon, 31 Jan 2022 21:20:22 +0000 Message-ID: <6f9083e2-d633-d483-702e-f974317133b7@intel.com> Date: Mon, 31 Jan 2022 13:20:18 -0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Firefox/91.0 Thunderbird/91.5.1 Subject: Re: [PATCH] docs/kselftest: clarify running mainline tests on stables Content-Language: en-US To: Shuah Khan , , CC: , , References: <20220126201341.55771-1-skhan@linuxfoundation.org> <7ba5e99a-9169-75c4-2324-f9a3ce9a506e@intel.com> From: Reinette Chatre In-Reply-To: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-ClientProxiedBy: CO1PR15CA0075.namprd15.prod.outlook.com (2603:10b6:101:20::19) To BN0PR11MB5744.namprd11.prod.outlook.com (2603:10b6:408:166::16) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: bd8eef9a-9504-4afb-5fb7-08d9e4ff7d72 X-MS-TrafficTypeDiagnostic: CH0PR11MB5753:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:10000; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: L1yWfs1EEuvhxIIR36kydeMV9AAMYAHh2+7McZp6Ti2HPO8RRXgWtTFmsPClHNO67jhN+QqbwKrBMtPoFAd5I7eniZg0z6KgqitY+Z6t/UcCq2zCBJkTXSqILK+tt+HAvVV4qS6iABDaCxmoUxnBgnZswYmxBwrhtDLeCEGE0VgiP5Qvh8BKZg4B0YTNl66CdYH7V/frBHD4qIHJNXDYd1+vIHmhNeaMkHNex2kIcwCeSQOoSskFuL2ff868El80VlK99ZGc3SJ6Z183JIWeVQSgkbSjDDLoU/3yjT7yCATZsfMwruSEkmq59bsOrIg1f0z2iNQpCuHGkZREhDW6wi7ep1ID/XYwJZuVEBkmNfGqtqpZxhid/RnG6nOU7C53qs6W0eGjdABPTd06c2oKJcLaN5C4MHw0wkrGk+JOYAOm9EqdgYGhIy/8zryI4bZ7VKsLVZ8bLFPg9z3qvUTukGsFRySZvGiwc0M/1PSOWFBW0yhh/u/pHkDXhsiwdNIWWjQVCpweaPw+p2FWrSXrqzGswlwb7UvHDfYLoSLTqSJQj4YEwZuwivmoUXp0z0GuG3VXUkD+j2zedIkUG3ZvrKmqBtj+vGB3urBnIh6Zu5mG2Ow2lFgcnt97fFawg2PbBHo833UpeWSgxb/ycCpatdZmM7P6ideDkNvIGVaphQiKHCoRz7klhVZnpmprp3dvsz9T/37tBwdvv6hG0750mg6YcNKZff0LizWnZpBBA1IxHCkUmhdgzDpoVtWgy+SM X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BN0PR11MB5744.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230001)(366004)(4326008)(31686004)(38100700002)(83380400001)(2616005)(44832011)(2906002)(186003)(26005)(316002)(8676002)(8936002)(5660300002)(966005)(6666004)(66476007)(6506007)(508600001)(86362001)(6486002)(36756003)(53546011)(66946007)(66556008)(6512007)(82960400001)(31696002)(43740500002)(45980500001)(20210929001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?cERkeEUvQnB1cjlDMVNJR2ZGZGhYcWNrUVUrZEgraGUzb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?OVZnT2hIcmJDYjNzSEd4TVVYSkN6cXMrdm9jYUVaVDdSbnZDbTJqR1lEVEtw?= =?utf-8?B?WGZJMjByWkRRVEgvMldwckZMdmZHRXFUbjVjcFlzR1hnemFoZnZERVBWM0l5?= =?utf-8?B?d0E4RFE2UUZPMUtSdGg5YjE4cVcvbXlrWmxRSkJSYUFXSmhiYTZOMnpaMzJP?= =?utf-8?B?K2p5TjdyR0xQTWg2VitsNmFBdHRSeVMwZElaekVNZ1dKWkVNS3lRanpBMWVx?= =?utf-8?B?YW9wemE1VE1pVVp2bmVuVjg5Yklpb1pxUEp5OXAzaTFnMUVxWjRtdTZUN3BW?= =?utf-8?B?aDNQNGhYMSsrZnpQMnllL1NYNkRqZGdrQnU0K29JMUJCUzA2dENJWFoyV1Q0?= =?utf-8?B?MVN4UGVlaDdCL0lTYzBLV2dXOUNWTnBYUDRrS0FNUmpqNmdnZWVnU040MnBi?= =?utf-8?Q?VRztf8F3+89Mf9WL0y5OenkYF8TRVza4697NpzvG5k=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: bd8eef9a-9504-4afb-5fb7-08d9e4ff7d72 X-MS-Exchange-CrossTenant-AuthSource: BN0PR11MB5744.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Jan 2022 21:20:22.3964 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: KMpk0H6qJn7pSCg8bchpaKsYNHgJZ7Cxyi62kiTcPqAkZP2JIts83+mlBMsw1FkO0bH02m6C3ZCrteFyyHP2agiyv7VF5P7oCBAmS3/Bo48= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH0PR11MB5753 X-OriginatorOrg: intel.com Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Shuah, On 1/31/2022 12:34 PM, Shuah Khan wrote: > On 1/31/22 12:37 PM, Reinette Chatre wrote: >> On 1/26/2022 12:13 PM, Shuah Khan wrote: >>> Update the document to clarifiy support for running mainline >>> kselftest on stable releases and the reasons for not removing >>> test code that can test older kernels. >>> >>> Signed-off-by: Shuah Khan >>> --- >>>   Documentation/dev-tools/kselftest.rst | 8 ++++++++ >>>   1 file changed, 8 insertions(+) >>> >>> diff --git a/Documentation/dev-tools/kselftest.rst b/Documentation/dev-tools/kselftest.rst >>> index dcefee707ccd..a833ecf12fbc 100644 >>> --- a/Documentation/dev-tools/kselftest.rst >>> +++ b/Documentation/dev-tools/kselftest.rst >>> @@ -7,6 +7,14 @@ directory. These are intended to be small tests to exercise individual code >>>   paths in the kernel. Tests are intended to be run after building, installing >>>   and booting a kernel. >>>   +Kselftest from mainline can be run on older stable kernels. Running tests >>> +from mainline offers the best coverage. Several test rings run mainline >>> +kselftest suite on stable releases. The reason is that when a new test >>> +gets added to test existing code to regression test a bug, we should be >>> +able to run that test on an older kernel. Hence, it is important to keep >>> +code that can still test an older kernel and make sure it skips the test >>> +gracefully on newer releases. >>> + >>>   You can find additional information on Kselftest framework, how to >>>   write new tests using the framework on Kselftest wiki: >>>   >> >> (My apologies if this is already documented, I was not able to find this guidance >> in Documentation/dev-tools/kselftest.rst nor when looking at the >> "Kselftest use-cases..." slides linked from https://kselftest.wiki.kernel.org/) >> >> Could you please clarify what the requirement/expectation is regarding fixes >> to tests? Since the recommendation in the above change is that Kselftest from >> mainline should be run on older stable kernels, is it required to backport >> fixes to the tests themselves to stable kernels? >> > > Couple of things to consider. > > - A new test gets added to regression test a bug in stable and mainline > - A new test gets added to test a kernel module/feature/API that has been >   supported by stable and mainline releases > > In both of these cases, running mainline kselftest on stables gives you the > best coverage. > > Kselftest fixes get pulled into stables like any other kernel fixes. If a few > fixes are missing, it is a good idea to back-port if they fall into above two > categories. If the test is for a new feature then, it doesn't make sense to > back-port. > > Hope this is helpful. This is helpful, thank you very much. In summary I understand this to mean that when testing a stable kernel it is recommended to run tests from mainline, but running the tests from the same stable kernel version as the kernel being tested is also a supported use case and thus fixes to tests should be back-ported. Thank you Reinette