Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp903787pxb; Tue, 1 Feb 2022 12:50:32 -0800 (PST) X-Google-Smtp-Source: ABdhPJzOsGIgXTERr8TFxGQbUplDlVY0Uy8bxxNRr32/hiPLk2ZljHanw8l40Ua6c+XcdGbyCs6B X-Received: by 2002:a17:90b:1647:: with SMTP id il7mr4353609pjb.119.1643748632208; Tue, 01 Feb 2022 12:50:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643748632; cv=none; d=google.com; s=arc-20160816; b=YmbWRaNJ79RaIuKS/Zg0fz3AhZy1UZguVgd4k6BODnUCj6YPKJgUkry7i7CM8Shgn8 dyJD5mKX9NOfWJ3Cp6QWlQ9bTl3B7gKfbBvoT+YC1E8Vv0/0y9RF82IstXx64+7EZtxW UmUMhUQZQqi2bgUJcohZ/ml/sMH89300j4XSHZuBygPqXI2GGRGj1eNXfsc4+I4Q/pmE CPbjP/R6+6QpjUhX1ZbVnLDUaI48SvetrQ90HQp/mJMiwUVg1Fjl3K+rHxMt0u5vDSBf +uQsF9IPNrJHMgGXx09yJLr6XPv/LhfgM0gTzGNp8dKvo8DybXsFA4xjSSBfF3ENs0ZR +nKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=SqlLCj31diSETKI5A6zt06jP40coWDSpw6yL95StcfA=; b=fxIRm2lWSp2prgBXY7lgWRPJSQuDNwkageZxOeWkxcfbA01kwqeOjuDbL76s+YNA0O TiuIsZv+a9XLfbiSSUU6yLKqhbvoQnOR8NnQwWii4X+5ZqcR4DtIcJZqP8uVTe2LIVys 5y/YAGcvthtdFXyGve3gr3TP5hv3bdvHMkkPMqkFOIk1NJzH+iL6jLaqm+qCDJZt1HUH tgnVXBvzaymQCpHDaRfhlCPUPqL/wfWtBY735EYgHX2G+BDYSz5vM8iPQcUiKrNlLnsf GyvSzzbZu3t0tX9KS0XC6WYhsHxd1ov7gCkckS3w4uu5RwICs8wlZGqalHThazF+8+HI YZXA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=google header.b=P30SRyq1; 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=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p8si19526153pfo.306.2022.02.01.12.50.20; Tue, 01 Feb 2022 12:50:32 -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=@linuxfoundation.org header.s=google header.b=P30SRyq1; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343653AbiAaUeb (ORCPT + 99 others); Mon, 31 Jan 2022 15:34:31 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36588 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1378889AbiAaUeW (ORCPT ); Mon, 31 Jan 2022 15:34:22 -0500 Received: from mail-io1-xd2a.google.com (mail-io1-xd2a.google.com [IPv6:2607:f8b0:4864:20::d2a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D339DC061401 for ; Mon, 31 Jan 2022 12:34:21 -0800 (PST) Received: by mail-io1-xd2a.google.com with SMTP id h7so18552299iof.3 for ; Mon, 31 Jan 2022 12:34:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=SqlLCj31diSETKI5A6zt06jP40coWDSpw6yL95StcfA=; b=P30SRyq13MwhIF8XlMuefEe3P67inPXs0nFpbmH/icwIOAQ0aDndG0JIgDdNbCK5yb 0V0iJ6UXoheW8yHtizJ4zFSQAZod/4FTR++npNCWfVzwTVyKX94w8fI2cC3CRX10joOC g4b/gA0SS3wezzev5ypNpF5FpkBkZknJd/plA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=SqlLCj31diSETKI5A6zt06jP40coWDSpw6yL95StcfA=; b=q3P9zMcnLRnfQb76U96vEOeY3TtXEa6uAk6jZAnHLwssrOOQgdlmizK0joQ5irmpmk 4BYMk+65u9YFy6jGPzDAATASR/RwvGE2nbzcXWYE2nT0YqOEp0xPjXqhtdAx2m1J/0v6 WCrh3UudwZG5706v2vqCvVU9ci12QVHxNySTmXKGwYgfT4NQ5M0cWX0GjUGP//OyvCNt wRN09w3cVAi/Q21RSvIy8vUSOj3eclh2NdOyIEW78s9y7vSiNxh9viZJxhTJCy2JgDX1 w1pw9VI5/PkOjnX43yp4Bus6+W9R2eS2m/bz3KdhLIuCY59kTDdCm+BazFjoFhvz95yb QGJw== X-Gm-Message-State: AOAM5313vYN1/uKVBFlhxVyBViV+hGkbWWCewnWu6VYwiTHBkbQHbkta M/WZyOS7ikt37tv3n0DqAW5dtQ== X-Received: by 2002:a05:6602:2e90:: with SMTP id m16mr12378473iow.74.1643661261246; Mon, 31 Jan 2022 12:34:21 -0800 (PST) Received: from [192.168.1.128] ([71.205.29.0]) by smtp.gmail.com with ESMTPSA id b5sm18324029iln.54.2022.01.31.12.34.20 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 31 Jan 2022 12:34:21 -0800 (PST) Subject: Re: [PATCH] docs/kselftest: clarify running mainline tests on stables To: Reinette Chatre , shuah@kernel.org, corbet@lwn.net Cc: linux-kselftest@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Shuah Khan References: <20220126201341.55771-1-skhan@linuxfoundation.org> <7ba5e99a-9169-75c4-2324-f9a3ce9a506e@intel.com> From: Shuah Khan Message-ID: Date: Mon, 31 Jan 2022 13:34:19 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: <7ba5e99a-9169-75c4-2324-f9a3ce9a506e@intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Reinette, On 1/31/22 12:37 PM, Reinette Chatre wrote: > Hi Shuah, > > 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. thanks, -- Shuah