linux-kselftest.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "tan.shaopeng@fujitsu.com" <tan.shaopeng@fujitsu.com>
To: 'Reinette Chatre' <reinette.chatre@intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>, Shuah Khan <shuah@kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-kselftest@vger.kernel.org"
	<linux-kselftest@vger.kernel.org>
Subject: RE: [PATCH 1/3] selftests/resctrl: Make resctrl_tests run using kselftest framework
Date: Fri, 3 Dec 2021 07:21:41 +0000	[thread overview]
Message-ID: <TYAPR01MB63304F1E1A04D48CA7632C658B6A9@TYAPR01MB6330.jpnprd01.prod.outlook.com> (raw)
In-Reply-To: <6d4eb508-f551-4c12-2e15-34ab9b1dc49f@intel.com>

Hi Reinette,
 
> On 11/30/2021 6:36 PM, tan.shaopeng@fujitsu.com wrote:
> > Hi Reinette
> >
> >> On 11/10/2021 1:33 AM, Shaopeng Tan wrote:
> >>> From: "Tan, Shaopeng" <tan.shaopeng@jp.fujitsu.com>
> >>>
> >>> This commit enables kselftest to be built/run in resctrl framework.
> >>> Build/run resctrl_tests by build/run all tests of kselftest, or by
> >>> using the "TARGETS" variable on the make command line to specify
> >> resctrl_tests.
> >>> To make resctrl_tests run using kselftest framework, this commit
> >>> modified the Makefile of kernel kselftest set and the Makefile of
> >> resctrl_tests.
> >>
> >> The above sentence mentions that changes were made to the resctrl
> >> selftest Makefile but it does not describe what the change accomplish
> >> or why they are needed. Could you please elaborate?
> >
> > Before these changes of Makefile, when we run resctrl test, we need to
> > goto tools/testing/selftests/resctrl/ directory, run "make" to build
> > executable file "resctrl_tests", and run "sudo ./resctrl_tests" to
> > execute the test.
> >
> > With this patch, we can resctrl test in selftest framwork as follow.
> > Run all tests include resctrl:
> >   $ make -C tools/testing/selftests run_tests Run a subset(resctrl) of
> > selftests:
> >   $ make -C tools/testing/selftests TARGETS=resctrl run_tests
> >
> > Linux Kernel Selftests :
> > https://www.kernel.org/doc/html/latest/dev-tools/kselftest.html
> 
> Understood and this is a reasonable change. What you wrote above would be a
> great addition to the changelog. I think it is also important to add to the
> changelog that the changes do not change the existing behavior and users can
> continue to build and run the tests as before.

Thanks for your advice.

> Also, please follow the guidance found in "Separate your changes" in
> Documentation/process/submitting-patches.rst: Logical changes should be
> in separate patches. This patch does too many things. Please consider:
> 1) the license addition is not relevant to this work
> 2) the new comment seems unnecessary as it states the obvious
> 3) where is the "LDLIBS += -lnuma" change coming from and why is it
> needed?

I'm sorry, I made a mistake.
"LDLIBs += -lnuma" is dependent on the following patch.
I will reorganize patch series to include the following patch and
separate Makefile changes appropriately.

https://lore.kernel.org/lkml/20211110082734.3184985-1-tan.shaopeng@jp.fujitsu.com/
[PATCH] selftests/resctrl: Skip MBM&CMT tests when Intel Sub-NUMA

> When logical changes are isolated into separate patches it really makes the
> patches easier to understand.

Thanks for your advice, I will separate patches.

> >>> To ensure the resctrl_tests finish in limited time, this commit
> >>> changed the default limited time(45s) to 120 seconds for
> >>> resctrl_tests by adding "setting" file.
> >>
> >> How is changing the timeout related to the resctrl framework changes?
> >> Is it not a separate change?
> >
> > In selftest framwork, the default limited time of all tests is 45
> > seconds which is specified by common file
> tools/testing/selftests/kselftest/runner.sh.
> > Each test can change the limited time individually by adding a "setting"
> > file into its own directory. I changed the limited time of resctrl
> > to120s because 45s was not enough in my environment.
> 
> Understood. My question was if this can be a separate change with its own
> patch? It seems to me that this deserves its own patch ... but actually it also
> raises an important issue that the resctrl tests are taking a long time.
> 
> I do see a rule for tests in Documentation/dev-tools/kselftest.rst:
> "Don't take too long". This may be a motivation _not_ to include the resctrl tests
> in the regular kselftest targets because when a user wants to run all tests on a
> system it needs to be quick and the resctrl tests are not quick.

I think 120s is not long, there are 6 tests with a limited time over 120s, 
for example, the limited time of net test is set 300s. 


Regards,
Shaopeng Tan

  reply	other threads:[~2021-12-03  7:29 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-10  9:33 [PATCH 0/3] selftests/resctrl: Add resctrl_tests into kselftest set Shaopeng Tan
2021-11-10  9:33 ` [PATCH 1/3] selftests/resctrl: Make resctrl_tests run using kselftest framework Shaopeng Tan
2021-11-29 19:27   ` Reinette Chatre
2021-12-01  2:36     ` tan.shaopeng
2021-12-02  0:18       ` Reinette Chatre
2021-12-03  7:21         ` tan.shaopeng [this message]
2021-12-03 23:08           ` Reinette Chatre
2021-12-06  6:57             ` tan.shaopeng
2021-12-06 15:23               ` Reinette Chatre
2021-11-10  9:33 ` [PATCH 2/3] selftests/resctrl: Return KSFT_SKIP(4) if resctrl filessystem is not supported or resctrl is not run as root Shaopeng Tan
2021-11-29 19:27   ` Reinette Chatre
2021-12-01  2:36     ` tan.shaopeng
2021-12-02  0:39       ` Reinette Chatre
2021-11-10  9:33 ` [PATCH 3/3] selftests/resctrl: Kill the child process created by fork() when the SIGTERM signal comes Shaopeng Tan
2021-11-24 11:00 ` [PATCH 0/3] selftests/resctrl: Add resctrl_tests into kselftest set tan.shaopeng

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=TYAPR01MB63304F1E1A04D48CA7632C658B6A9@TYAPR01MB6330.jpnprd01.prod.outlook.com \
    --to=tan.shaopeng@fujitsu.com \
    --cc=fenghua.yu@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=reinette.chatre@intel.com \
    --cc=shuah@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).