Hi,
At Linux Plumbers, a few dozen of us gathered together to discuss how
to expose what tests subsystem maintainers would like to run for every
patch submitted or when CI runs tests. We agreed on a mock up of a
yaml template to start gathering info. The yaml file could be
temporarily stored on kernelci.org until a more permanent home could
be found. Attached is a template to start the conversation.
Longer story.
The current problem is CI systems are not unanimous about what tests
they run on submitted patches or git branches. This makes it
difficult to figure out why a test failed or how to reproduce.
Further, it isn't always clear what tests a normal contributor should
run before posting patches.
It has been long communicated that the tests LTP, xfstest and/or
kselftests should be the tests to run. However, not all maintainers
use those tests for their subsystems. I am hoping to either capture
those tests or find ways to convince them to add their tests to the
preferred locations.
The goal is for a given subsystem (defined in MAINTAINERS), define a
set of tests that should be run for any contributions to that
subsystem. The hope is the collective CI results can be triaged
collectively (because they are related) and even have the numerous
flakes waived collectively (same reason) improving the ability to
find and debug new test failures. Because the tests and process are
known, having a human help debug any failures becomes easier.
The plan is to put together a minimal yaml template that gets us going
(even if it is not optimized yet) and aim for about a dozen or so
subsystems. At that point we should have enough feedback to promote
this more seriously and talk optimizations.
Feedback encouraged.
Cheers,
Don
---
# List of tests by subsystem
#
# Tests should adhere to KTAP definitions for results
#
# Description of section entries
#
# maintainer: test maintainer - name <email>
# list: mailing list for discussion
# version: stable version of the test
# dependency: necessary distro package for testing
# test:
# path: internal git path or url to fetch from
# cmd: command to run; ability to run locally
# param: additional param necessary to run test
# hardware: hardware necessary for validation
#
# Subsystems (alphabetical)
KUNIT TEST:
maintainer:
- name: name1
email: email1
- name: name2
email: email2
list:
version:
dependency:
- dep1
- dep2
test:
- path: tools/testing/kunit
cmd:
param:
- path:
cmd:
param:
hardware: none
Hi Linus,
Please pull the following kselftest fixes update for Linux 6.13-rc1.
kselftest update for Linux 6.13-rc1
-- timers test - removes duplicates defines
-- timers test - fixes to improve error reporting
-- rtc test - adds check rtc alarm status to alarm test
-- resctrl test - adds array overrun checks during iMC config parsing code
-- resctrl test - adds array overflow checks when reading strings
-- resctrl test - fixes and reorganizing code
Looks like I forgot to mention signal test changes in my tag
message. :(
diff is attached.
Tests passed on my kselftest next branch:
- Individual test runs of signal, timers, rtc, and resctrl
thanks,
-- Shuah
----------------------------------------------------------------
The following changes since commit 8e929cb546ee42c9a61d24fae60605e9e3192354:
Linux 6.12-rc3 (2024-10-13 14:33:32 -0700)
are available in the Git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest tags/linux_kselftest-next-6.13-rc1
for you to fetch changes up to a44c26d7fa74a5f4d2795a5c55a2d6ec1ebf1e38:
selftests/resctrl: Replace magic constants used as array size (2024-11-04 17:02:03 -0700)
----------------------------------------------------------------
linux_kselftest-next-6.13-rc1
kselftest update for Linux 6.13-rc1
-- timers test - removes duplicates defines
-- timers test - fixes to improve error reporting
-- rtc test - adds check rtc alarm status to alarm test
-- resctrl test - adds array overrun checks during iMC config parsing code
-- resctrl test - adds array overflow checks when reading strings
-- resctrl test - fixes and reorganizing code
----------------------------------------------------------------
Chen Ni (1):
selftests: timers: Remove unneeded semicolon
Dev Jain (2):
selftests: Rename sigaltstack to generic signal
selftests: Add a test mangling with uc_sigmask
Gianfranco Trad (1):
selftests: timers: improve timer_create failure message
Joseph Jang (1):
selftest: rtc: Add to check rtc alarm status for alarm related test
Nícolas F. R. A. Prado (1):
docs: dev-tools: Add documentation for the device focused kselftests
Reinette Chatre (15):
selftests/resctrl: Make functions only used in same file static
selftests/resctrl: Print accurate buffer size as part of MBM results
selftests/resctrl: Fix memory overflow due to unhandled wraparound
selftests/resctrl: Protect against array overrun during iMC config parsing
selftests/resctrl: Protect against array overflow when reading strings
selftests/resctrl: Make wraparound handling obvious
selftests/resctrl: Remove "once" parameter required to be false
selftests/resctrl: Only support measured read operation
selftests/resctrl: Remove unused measurement code
selftests/resctrl: Make benchmark parameter passing robust
selftests/resctrl: Ensure measurements skip initialization of default benchmark
selftests/resctrl: Use cache size to determine "fill_buf" buffer size
selftests/resctrl: Do not compare performance counters and resctrl at low bandwidth
selftests/resctrl: Keep results from first test run
selftests/resctrl: Replace magic constants used as array size
Shuah Khan (2):
selftests: timers: Remove local NSEC_PER_SEC and USEC_PER_SEC defines
selftests:timers: remove local CLOCKID defines
Documentation/dev-tools/kselftest.rst | 9 +
Documentation/dev-tools/testing-devices.rst | 47 +++
tools/testing/selftests/Makefile | 2 +-
tools/testing/selftests/resctrl/cmt_test.c | 37 +-
tools/testing/selftests/resctrl/fill_buf.c | 45 +--
tools/testing/selftests/resctrl/mba_test.c | 54 ++-
tools/testing/selftests/resctrl/mbm_test.c | 37 +-
tools/testing/selftests/resctrl/resctrl.h | 79 +++-
tools/testing/selftests/resctrl/resctrl_tests.c | 95 ++++-
tools/testing/selftests/resctrl/resctrl_val.c | 447 ++++++---------------
tools/testing/selftests/resctrl/resctrlfs.c | 19 +-
tools/testing/selftests/rtc/Makefile | 2 +-
tools/testing/selftests/rtc/rtctest.c | 64 +++
.../selftests/{sigaltstack => signal}/.gitignore | 1 +
.../selftests/{sigaltstack => signal}/Makefile | 3 +-
.../current_stack_pointer.h | 0
tools/testing/selftests/signal/mangle_uc_sigmask.c | 184 +++++++++
.../selftests/{sigaltstack => signal}/sas.c | 0
tools/testing/selftests/timers/Makefile | 2 +-
tools/testing/selftests/timers/adjtick.c | 6 +-
.../testing/selftests/timers/alarmtimer-suspend.c | 22 +-
.../testing/selftests/timers/inconsistency-check.c | 21 +-
tools/testing/selftests/timers/leap-a-day.c | 2 +-
tools/testing/selftests/timers/mqueue-lat.c | 2 +-
tools/testing/selftests/timers/nanosleep.c | 21 +-
tools/testing/selftests/timers/nsleep-lat.c | 22 +-
tools/testing/selftests/timers/posix_timers.c | 15 +-
tools/testing/selftests/timers/raw_skew.c | 4 +-
tools/testing/selftests/timers/set-2038.c | 3 +-
tools/testing/selftests/timers/set-timer-lat.c | 21 +-
tools/testing/selftests/timers/valid-adjtimex.c | 4 +-
31 files changed, 701 insertions(+), 569 deletions(-)
create mode 100644 Documentation/dev-tools/testing-devices.rst
rename tools/testing/selftests/{sigaltstack => signal}/.gitignore (70%)
rename tools/testing/selftests/{sigaltstack => signal}/Makefile (56%)
rename tools/testing/selftests/{sigaltstack => signal}/current_stack_pointer.h (100%)
create mode 100644 tools/testing/selftests/signal/mangle_uc_sigmask.c
rename tools/testing/selftests/{sigaltstack => signal}/sas.c (100%)
----------------------------------------------------------------
Page Detective is a new kernel debugging tool that provides detailed
information about the usage and mapping of physical memory pages.
It is often known that a particular page is corrupted, but it is hard to
extract more information about such a page from live system. Examples
are:
- Checksum failure during live migration
- Filesystem journal failure
- dump_page warnings on the console log
- Unexcpected segfaults
Page Detective helps to extract more information from the kernel, so it
can be used by developers to root cause the associated problem.
It operates through the Linux debugfs interface, with two files: "virt"
and "phys".
The "virt" file takes a virtual address and PID and outputs information
about the corresponding page.
The "phys" file takes a physical address and outputs information about
that page.
The output is presented via kernel log messages (can be accessed with
dmesg), and includes information such as the page's reference count,
mapping, flags, and memory cgroup. It also shows whether the page is
mapped in the kernel page table, and if so, how many times.
Pasha Tatashin (6):
mm: Make get_vma_name() function public
pagewalk: Add a page table walker for init_mm page table
mm: Add a dump_page variant that accept log level argument
misc/page_detective: Introduce Page Detective
misc/page_detective: enable loadable module
selftests/page_detective: Introduce self tests for Page Detective
Documentation/misc-devices/index.rst | 1 +
Documentation/misc-devices/page_detective.rst | 78 ++
MAINTAINERS | 8 +
drivers/misc/Kconfig | 11 +
drivers/misc/Makefile | 1 +
drivers/misc/page_detective.c | 808 ++++++++++++++++++
fs/inode.c | 18 +-
fs/kernfs/dir.c | 1 +
fs/proc/task_mmu.c | 61 --
include/linux/fs.h | 5 +-
include/linux/mmdebug.h | 1 +
include/linux/pagewalk.h | 2 +
kernel/pid.c | 1 +
mm/debug.c | 53 +-
mm/memcontrol.c | 1 +
mm/oom_kill.c | 1 +
mm/pagewalk.c | 32 +
mm/vma.c | 60 ++
tools/testing/selftests/Makefile | 1 +
.../selftests/page_detective/.gitignore | 1 +
.../testing/selftests/page_detective/Makefile | 7 +
tools/testing/selftests/page_detective/config | 4 +
.../page_detective/page_detective_test.c | 727 ++++++++++++++++
23 files changed, 1787 insertions(+), 96 deletions(-)
create mode 100644 Documentation/misc-devices/page_detective.rst
create mode 100644 drivers/misc/page_detective.c
create mode 100644 tools/testing/selftests/page_detective/.gitignore
create mode 100644 tools/testing/selftests/page_detective/Makefile
create mode 100644 tools/testing/selftests/page_detective/config
create mode 100644 tools/testing/selftests/page_detective/page_detective_test.c
--
2.47.0.338.g60cca15819-goog