This was prompted by the discussion about output directory support with
O=.
It seems sometimes we were pulling in system headers making testing
annoying and unreliable.
Signed-off-by: Thomas Weißschuh <linux(a)weissschuh.net>
---
Thomas Weißschuh (2):
tools/nolibc: add stdarg.h header
selftests/nolibc: use -nostdinc for nolibc-test
tools/include/nolibc/Makefile | 1 +
tools/include/nolibc/stdarg.h | 16 ++++++++++++++++
tools/testing/selftests/nolibc/Makefile | 2 +-
3 files changed, 18 insertions(+), 1 deletion(-)
---
base-commit: 556fb7131e03b0283672fb40f6dc2d151752aaa7
change-id: 20230827-nolibc-nostdinc-203908130d67
Best regards,
--
Thomas Weißschuh <linux(a)weissschuh.net>
Hello everyone,
This patch series adds a test attributes framework to KUnit.
There has been interest in filtering out "slow" KUnit tests. Most notably,
a new config, CONFIG_MEMCPY_SLOW_KUNIT_TEST, has been added to exclude a
particularly slow memcpy test
(https://lore.kernel.org/all/20230118200653.give.574-kees@kernel.org/).
This attributes framework can be used to save and access test associated
data, including whether a test is slow. These attributes are reportable
(via KTAP and command line output) and are also filterable.
This framework is designed to allow for the addition of other attributes in
the future. These attributes could include whether the test can be run
concurrently, test file path, etc.
To try out the framework I suggest running:
"./tools/testing/kunit/kunit.py run --filter speed!=slow"
This patch series was originally sent out as an RFC. Here is a link to the
RFC v2:
https://lore.kernel.org/all/20230707210947.1208717-1-rmoar@google.com/
Thanks!
Rae
Rae Moar (9):
kunit: Add test attributes API structure
kunit: Add speed attribute
kunit: Add module attribute
kunit: Add ability to filter attributes
kunit: tool: Add command line interface to filter and report
attributes
kunit: memcpy: Mark tests as slow using test attributes
kunit: time: Mark test as slow using test attributes
kunit: add tests for filtering attributes
kunit: Add documentation of KUnit test attributes
Documentation/dev-tools/kunit/run_wrapper.rst | 12 +
.../dev-tools/kunit/running_tips.rst | 166 +++++++
include/kunit/attributes.h | 50 +++
include/kunit/test.h | 70 ++-
kernel/time/time_test.c | 2 +-
lib/Kconfig.debug | 3 +
lib/kunit/Makefile | 3 +-
lib/kunit/attributes.c | 418 ++++++++++++++++++
lib/kunit/executor.c | 114 ++++-
lib/kunit/executor_test.c | 128 +++++-
lib/kunit/kunit-example-test.c | 9 +
lib/kunit/test.c | 27 +-
lib/memcpy_kunit.c | 8 +-
tools/testing/kunit/kunit.py | 70 ++-
tools/testing/kunit/kunit_kernel.py | 8 +-
tools/testing/kunit/kunit_parser.py | 11 +-
tools/testing/kunit/kunit_tool_test.py | 39 +-
17 files changed, 1062 insertions(+), 76 deletions(-)
create mode 100644 include/kunit/attributes.h
create mode 100644 lib/kunit/attributes.c
base-commit: 64bd4641310c41a1ecf07c13c67bc0ed61045dfd
--
2.41.0.487.g6d72f3e995-goog
Changelog: v1 -> v2
* Rebased on v6.5-rc6
* Moved the test directory to powerpc debugfs
* Minimal code refactoring
RFC v1:
https://lore.kernel.org/all/20210611124154.56427-1-psampat@linux.ibm.com/
Other related RFC:
https://lore.kernel.org/all/20210430082804.38018-1-psampat@linux.ibm.com/
Userspace selftest:
https://lkml.org/lkml/2020/9/2/356
----
A kernel module + userspace driver to estimate the wakeup latency
caused by going into stop states. The motivation behind this program is
to find significant deviations behind advertised latency and residency
values.
The patchset measures latencies for two kinds of events. IPIs and Timers
As this is a software-only mechanism, there will be additional latencies
of the kernel-firmware-hardware interactions. To account for that, the
program also measures a baseline latency on a 100 percent loaded CPU
and the latencies achieved must be in view relative to that.
To achieve this, we introduce a kernel module and expose its control
knobs through the debugfs interface that the selftests can engage with.
The kernel module provides the following interfaces within
/sys/kernel/debug/powerpc/latency_test/ for,
IPI test:
ipi_cpu_dest = Destination CPU for the IPI
ipi_cpu_src = Origin of the IPI
ipi_latency_ns = Measured latency time in ns
Timeout test:
timeout_cpu_src = CPU on which the timer to be queued
timeout_expected_ns = Timer duration
timeout_diff_ns = Difference of actual duration vs expected timer
Sample output is as follows:
# --IPI Latency Test---
# Baseline Avg IPI latency(ns): 2720
# Observed Avg IPI latency(ns) - State snooze: 2565
# Observed Avg IPI latency(ns) - State stop0_lite: 3856
# Observed Avg IPI latency(ns) - State stop0: 3670
# Observed Avg IPI latency(ns) - State stop1: 3872
# Observed Avg IPI latency(ns) - State stop2: 17421
# Observed Avg IPI latency(ns) - State stop4: 1003922
# Observed Avg IPI latency(ns) - State stop5: 1058870
#
# --Timeout Latency Test--
# Baseline Avg timeout diff(ns): 1435
# Observed Avg timeout diff(ns) - State snooze: 1709
# Observed Avg timeout diff(ns) - State stop0_lite: 2028
# Observed Avg timeout diff(ns) - State stop0: 1954
# Observed Avg timeout diff(ns) - State stop1: 1895
# Observed Avg timeout diff(ns) - State stop2: 14556
# Observed Avg timeout diff(ns) - State stop4: 873988
# Observed Avg timeout diff(ns) - State stop5: 959137
Aboorva Devarajan (2):
powerpc/cpuidle: cpuidle wakeup latency based on IPI and timer events
powerpc/selftest: Add support for cpuidle latency measurement
arch/powerpc/Kconfig.debug | 10 +
arch/powerpc/kernel/Makefile | 1 +
arch/powerpc/kernel/test_cpuidle_latency.c | 156 ++++++
tools/testing/selftests/powerpc/Makefile | 1 +
.../powerpc/cpuidle_latency/.gitignore | 2 +
.../powerpc/cpuidle_latency/Makefile | 6 +
.../cpuidle_latency/cpuidle_latency.sh | 443 ++++++++++++++++++
.../powerpc/cpuidle_latency/settings | 1 +
8 files changed, 620 insertions(+)
create mode 100644 arch/powerpc/kernel/test_cpuidle_latency.c
create mode 100644 tools/testing/selftests/powerpc/cpuidle_latency/.gitignore
create mode 100644 tools/testing/selftests/powerpc/cpuidle_latency/Makefile
create mode 100755 tools/testing/selftests/powerpc/cpuidle_latency/cpuidle_latency.sh
create mode 100644 tools/testing/selftests/powerpc/cpuidle_latency/settings
--
2.25.1
Dzień dobry,
zapoznałem się z Państwa ofertą i z przyjemnością przyznaję, że przyciąga uwagę i zachęca do dalszych rozmów.
Pomyślałem, że może mógłbym mieć swój wkład w Państwa rozwój i pomóc dotrzeć z tą ofertą do większego grona odbiorców. Pozycjonuję strony www, dzięki czemu generują świetny ruch w sieci.
Możemy porozmawiać w najbliższym czasie?
Pozdrawiam serdecznie
Adam Charachuta
The sstc_timer selftest is used to validate Sstc timer functionality
in a guest, which sets up periodic timer interrupts and check the
basic interrupt status upon its receipt.
This KVM selftest was ported from aarch64 arch_timer and tested
with Linux v6.5-rc3 on a Qemu riscv64 virt machine.
Haibo Xu (4):
tools: riscv: Add header file csr.h
KVM: riscv: selftests: Add exception handling support
KVM: riscv: selftests: Add guest helper to get vcpu id
KVM: riscv: selftests: Add sstc_timer test
tools/arch/riscv/include/asm/csr.h | 127 ++++++
tools/testing/selftests/kvm/Makefile | 2 +
.../selftests/kvm/include/riscv/processor.h | 76 ++++
.../selftests/kvm/include/riscv/sstc_timer.h | 70 ++++
.../selftests/kvm/lib/riscv/handlers.S | 101 +++++
.../selftests/kvm/lib/riscv/processor.c | 74 ++++
.../testing/selftests/kvm/riscv/sstc_timer.c | 382 ++++++++++++++++++
7 files changed, 832 insertions(+)
create mode 100644 tools/arch/riscv/include/asm/csr.h
create mode 100644 tools/testing/selftests/kvm/include/riscv/sstc_timer.h
create mode 100644 tools/testing/selftests/kvm/lib/riscv/handlers.S
create mode 100644 tools/testing/selftests/kvm/riscv/sstc_timer.c
--
2.34.1
Hi Linus,
Please pull the following Kselftest update for Linux 6.6-rc1.
This Kselftest update for Linux 6.6-rc1 consists of a mix of fixes,
enhancements, and new tests. Bulk of the changes enhance and fix
rseq and resctrl tests. In addition, user_events, dmabuf-heaps and
perf_events are added to default kselftest build and test coverage.
A futex test fix, enhance prctl test coverage, and minor fixes are
included in this update.
diff is attached.
thanks,
-- Shuah
----------------------------------------------------------------
The following changes since commit 6eaae198076080886b9e7d57f4ae06fa782f90ef:
Linux 6.5-rc3 (2023-07-23 15:24:10 -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.6-rc1
for you to fetch changes up to 9b1db732866bee060b9bca9493e5ebf5e8874c48:
selftests: cachestat: use proper syscall number macro (2023-08-16 11:12:44 -0600)
----------------------------------------------------------------
linux-kselftest-next-6.6-rc1
This Kselftest update for Linux 6.6-rc1 consists of a mix of fixes,
enhancements, and new tests. Bulk of the changes enhance and fix
rseq and resctrl tests. In addition, user_events, dmabuf-heaps and
perf_events are added to default kselftest build and test coverage.
A futex test fix, enhance prctl test coverage, and minor fixes are
included in this update.
----------------------------------------------------------------
Andre Przywara (2):
selftests: cachestat: properly link in librt
selftests: cachestat: use proper syscall number macro
Hui Min Mina Chou (1):
selftests/filesystems: Add six consecutive 'x' characters to mktemp
Ilpo Järvinen (19):
selftests/resctrl: Add resctrl.h into build deps
selftests/resctrl: Don't leak buffer in fill_cache()
selftests/resctrl: Unmount resctrl FS if child fails to run benchmark
selftests/resctrl: Close perf value read fd on errors
selftests/resctrl: Unmount resctrl FS before starting the first test
selftests/resctrl: Move resctrl FS mount/umount to higher level
selftests/resctrl: Refactor remount_resctrl(bool mum_resctrlfs) to mount_resctrl()
selftests/resctrl: Remove mum_resctrlfs from struct resctrl_val_param
selftests/resctrl: Convert span to size_t
selftests/resctrl: Express span internally in bytes
selftests/resctrl: Remove duplicated preparation for span arg
selftests/resctrl: Remove "malloc_and_init_memory" param from run_fill_buf()
selftests/resctrl: Remove unnecessary startptr global from fill_buf
selftests/resctrl: Improve parameter consistency in fill_buf
selftests/resctrl: Don't pass test name to fill_buf
selftests/resctrl: Don't use variable argument list for ->setup()
selftests/resctrl: Move CAT/CMT test global vars to function they are used in
selftests/resctrl: Pass the real number of tests to show_cache_info()
selftests/resctrl: Remove test type checks from cat_val()
Mark Brown (2):
selftests/user_events: Reenable build
selftests: Hook more tests into the build infrastructure
Mathieu Desnoyers (4):
selftests/rseq: Fix CID_ID typo in Makefile
selftests/rseq: Implement rseq_unqual_scalar_typeof
selftests/rseq: Fix arm64 buggy load-acquire/store-release macros
selftests/rseq: Use rseq_unqual_scalar_typeof in macros
Nysal Jan K.A (1):
selftests/futex: Order calls to futex_lock_pi
Osama Muhammad (1):
selftests: prctl: Add new prctl test for PR_SET_NAME
Shuah Khan (2):
selftests:prctl: Fix make clean override warning
selftests:prctl: add set-process-name to .gitignore
tools/testing/selftests/Makefile | 4 +
tools/testing/selftests/cachestat/Makefile | 2 +-
tools/testing/selftests/cachestat/test_cachestat.c | 7 +-
.../selftests/filesystems/fat/run_fat_tests.sh | 2 +-
.../futex/functional/futex_wait_timeout.c | 7 ++
tools/testing/selftests/prctl/.gitignore | 1 +
tools/testing/selftests/prctl/Makefile | 4 +-
tools/testing/selftests/prctl/set-process-name.c | 62 +++++++++++++++
tools/testing/selftests/resctrl/Makefile | 2 +-
tools/testing/selftests/resctrl/cache.c | 66 ++++++++--------
tools/testing/selftests/resctrl/cat_test.c | 28 ++-----
tools/testing/selftests/resctrl/cmt_test.c | 29 ++------
tools/testing/selftests/resctrl/fill_buf.c | 87 ++++++++--------------
tools/testing/selftests/resctrl/mba_test.c | 9 +--
tools/testing/selftests/resctrl/mbm_test.c | 17 ++---
tools/testing/selftests/resctrl/resctrl.h | 17 ++---
tools/testing/selftests/resctrl/resctrl_tests.c | 83 ++++++++++++++-------
tools/testing/selftests/resctrl/resctrl_val.c | 7 +-
tools/testing/selftests/resctrl/resctrlfs.c | 64 ++++++++--------
tools/testing/selftests/rseq/Makefile | 2 +-
tools/testing/selftests/rseq/compiler.h | 26 +++++++
tools/testing/selftests/rseq/rseq-arm.h | 4 +-
tools/testing/selftests/rseq/rseq-arm64.h | 58 ++++++++-------
tools/testing/selftests/rseq/rseq-mips.h | 4 +-
tools/testing/selftests/rseq/rseq-ppc.h | 4 +-
tools/testing/selftests/rseq/rseq-riscv.h | 6 +-
tools/testing/selftests/rseq/rseq-s390.h | 4 +-
tools/testing/selftests/rseq/rseq-x86.h | 4 +-
tools/testing/selftests/user_events/Makefile | 8 --
29 files changed, 328 insertions(+), 290 deletions(-)
create mode 100644 tools/testing/selftests/prctl/set-process-name.c
----------------------------------------------------------------