[PATCH 0/3] selftests/resctrl: Add resctrl_tests into kselftest set

From: Shaopeng Tan
Date: Wed Nov 10 2021 - 04:33:57 EST


Hello,

Resctrl_tests is in the kselftest directory, but it cannot use kselftest
framework. The aim of this series is to make resctrl_tests run by using
kselftest framework and to fix some bug/setting of resctrl_tests when
use kselftest framework.

In kselftest framework, we can build/run resctrl_tests by build/run
all tests of kselftest, and we also can use the "TARGETS" variable
on the make command line to specify resctrl_tests to build/run.

To ensure the resctrl_tests finish in limited time(which is specified
by timeout command), set the limited time for resctrl_tests to 120 seconds.
When resctrl filesystem is not supported or resctrl_tests is not run as
root, return skip code of kselftest. If it is not finish in limited time,
terminate resctrl_tests same as when executing ctrl+c.

Thanks,

Tan, Shaopeng (3):
selftests/resctrl: Make resctrl_tests run using kselftest framework
selftests/resctrl: Return KSFT_SKIP(4) if resctrl filessystem is not
supported or resctrl is not run as root
selftests/resctrl: Kill the child process created by fork() when the
SIGTERM signal comes

tools/testing/selftests/Makefile | 1 +
tools/testing/selftests/resctrl/Makefile | 21 +++++++++------------
tools/testing/selftests/resctrl/resctrl_tests.c | 4 ++--
tools/testing/selftests/resctrl/resctrl_val.c | 1 +
tools/testing/selftests/resctrl/settings | 1 +
5 files changed, 14 insertions(+), 14 deletions(-)
create mode 100644 tools/testing/selftests/resctrl/settings

--
1.8.3.1