I tried to split it a bit, maybe I could even go further and split by
TRACE_EVENT_CLASS() changes, but not sure if it adds any value.
But at least all preparation patches are separate.
I wasn't sure if I should just remove tcp_hash_fail() as I did in this
version, or rather put it under CONFIG_TCP_..., making it disabled by
default and with a warning of deprecated, scheduled for removal.
Maybe this won't cause any problems for anybody and I'm just too
cautious of breaking others.
Anyways, version 1, thanks for any reviews!
Signed-off-by: Dmitry Safonov <dima(a)arista.com>
---
Dmitry Safonov (10):
net/tcp: Use static_branch_tcp_{md5,ao} to drop ifdefs
net/tcp: Add a helper tcp_ao_hdr_maclen()
net/tcp: Move tcp_inbound_hash() from headers
net/tcp: Add tcp-md5 and tcp-ao tracepoints
net/tcp: Remove tcp_hash_fail()
selftests/net: Clean-up double assignment
selftests/net: Provide test_snprintf() helper
selftests/net: Be consistnat in kconfig checks
selftests/net: Don't forget to close nsfd after switch_save_ns()
selftest/net: Add trace events matching to tcp_ao
include/net/tcp.h | 79 +-
include/net/tcp_ao.h | 42 +-
include/trace/events/tcp.h | 317 ++++++++
net/ipv4/tcp.c | 86 ++-
net/ipv4/tcp_ao.c | 24 +-
net/ipv4/tcp_input.c | 8 +-
net/ipv4/tcp_ipv4.c | 8 +-
net/ipv4/tcp_output.c | 2 +
tools/testing/selftests/net/tcp_ao/Makefile | 2 +-
tools/testing/selftests/net/tcp_ao/bench-lookups.c | 2 +-
tools/testing/selftests/net/tcp_ao/connect-deny.c | 18 +-
tools/testing/selftests/net/tcp_ao/connect.c | 2 +-
tools/testing/selftests/net/tcp_ao/icmps-discard.c | 2 +-
.../testing/selftests/net/tcp_ao/key-management.c | 18 +-
tools/testing/selftests/net/tcp_ao/lib/aolib.h | 150 +++-
tools/testing/selftests/net/tcp_ao/lib/ftrace.c | 846 +++++++++++++++++++++
tools/testing/selftests/net/tcp_ao/lib/kconfig.c | 31 +-
tools/testing/selftests/net/tcp_ao/lib/setup.c | 15 +-
tools/testing/selftests/net/tcp_ao/lib/sock.c | 1 -
tools/testing/selftests/net/tcp_ao/lib/utils.c | 26 +
tools/testing/selftests/net/tcp_ao/restore.c | 18 +-
tools/testing/selftests/net/tcp_ao/rst.c | 2 +-
tools/testing/selftests/net/tcp_ao/self-connect.c | 19 +-
tools/testing/selftests/net/tcp_ao/seq-ext.c | 10 +-
.../selftests/net/tcp_ao/setsockopt-closed.c | 2 +-
tools/testing/selftests/net/tcp_ao/unsigned-md5.c | 28 +-
26 files changed, 1576 insertions(+), 182 deletions(-)
---
base-commit: d662c5b3ce6dbed9d0991bc83001bbcc4a9bc2f8
change-id: 20240224-tcp-ao-tracepoints-0ea8ba11467a
Best regards,
--
Dmitry Safonov <dima(a)arista.com>
Hi!
When running selftests for our subsystem in our CI we'd like all
tests to pass. Currently some tests use SKIP for cases they
expect to fail, because the kselftest_harness limits the return
codes to pass/fail/skip.
Clean up and support the use of the full range of ksft exit codes
under kselftest_harness.
Merge plan is to put it on top of -rc4 and merge into net-next.
That way others should be able to pull the patches without
any networking changes.
v2: https://lore.kernel.org/all/20240216002619.1999225-1-kuba@kernel.org/
- fix alignment
follow up RFC: https://lore.kernel.org/all/20240216004122.2004689-1-kuba@kernel.org/
v1: https://lore.kernel.org/all/20240213154416.422739-1-kuba@kernel.org/
Jakub Kicinski (11):
selftests: kselftest_harness: pass step via shared memory
selftests: kselftest_harness: use KSFT_* exit codes
selftests: kselftest_harness: generate test name once
selftests: kselftest_harness: save full exit code in metadata
selftests: kselftest_harness: use exit code to store skip
selftests: kselftest: add ksft_test_result_code(), handling all exit
codes
selftests: kselftest_harness: print test name for SKIP
selftests: kselftest_harness: separate diagnostic message with # in
ksft_test_result_code()
selftests: kselftest_harness: let PASS / FAIL provide diagnostic
selftests: kselftest_harness: support using xfail
selftests: ip_local_port_range: use XFAIL instead of SKIP
tools/testing/selftests/kselftest.h | 45 ++++++
tools/testing/selftests/kselftest_harness.h | 148 ++++++++++++------
tools/testing/selftests/landlock/base_test.c | 2 +-
tools/testing/selftests/landlock/common.h | 22 +--
tools/testing/selftests/landlock/fs_test.c | 4 +-
tools/testing/selftests/landlock/net_test.c | 4 +-
.../testing/selftests/landlock/ptrace_test.c | 7 +-
.../selftests/net/ip_local_port_range.c | 6 +-
tools/testing/selftests/net/tls.c | 2 +-
tools/testing/selftests/seccomp/seccomp_bpf.c | 9 +-
10 files changed, 168 insertions(+), 81 deletions(-)
--
2.43.0
Cleaning up after tests is implemented separately for individual tests
and called at the end of each test execution. Since these functions are
very similar and a more generalized test framework was introduced a
function pointer in the resctrl_test struct can be used to reduce the
amount of function calls.
These functions are also all called in the ctrl-c handler because the
handler isn't aware which test is currently running. Since the handler
is implemented with a sigaction no function parameters can be passed
there but information about what test is currently running can be passed
with a global variable.
Changelog v3:
- Make current_test static.
- Add callback NULL check to the ctrl-c handler.
Changelog v2:
- Make current_test a const pointer limited in scope to resctrl_val
file.
- Remove tests_cleanup from resctrl.h.
- Cleanup 'goto out' path and labels in individual test functions.
Older versions of this series:
[v1] https://lore.kernel.org/all/cover.1708434017.git.maciej.wieczor-retman@inte…
[v2] https://lore.kernel.org/all/cover.1708596015.git.maciej.wieczor-retman@inte…
Maciej Wieczor-Retman (3):
selftests/resctrl: Add cleanup function to test framework
selftests/resctrl: Simplify cleanup in ctrl-c handler
selftests/resctrl: Move cleanups out of individual tests
tools/testing/selftests/resctrl/cat_test.c | 8 +++-----
tools/testing/selftests/resctrl/cmt_test.c | 4 ++--
tools/testing/selftests/resctrl/mba_test.c | 8 +++-----
tools/testing/selftests/resctrl/mbm_test.c | 8 +++-----
tools/testing/selftests/resctrl/resctrl.h | 9 +++------
tools/testing/selftests/resctrl/resctrl_tests.c | 16 +++++-----------
tools/testing/selftests/resctrl/resctrl_val.c | 7 +++++--
7 files changed, 24 insertions(+), 36 deletions(-)
--
2.43.2
The RISC-V arch_timer selftests 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 selftests was ported from aarch64 arch_timer and tested
with Linux v6.7-rc8 on a Qemu riscv64 virt machine.
---
Changed since v4:
* Rebased to Linux 6.7-rc8
* Added new patch(2/12) to clean up the data type in struct test_args
* Re-ordered patch(11/11) in v4 to patch(3/12)
* Changed the timer_err_margin_us type from int to uint32_t
Haibo Xu (11):
KVM: arm64: selftests: Data type cleanup for arch_timer test
KVM: arm64: selftests: Enable tuning of error margin in arch_timer
test
KVM: arm64: selftests: Split arch_timer test code
KVM: selftests: Add CONFIG_64BIT definition for the build
tools: riscv: Add header file csr.h
tools: riscv: Add header file vdso/processor.h
KVM: riscv: selftests: Switch to use macro from csr.h
KVM: riscv: selftests: Add exception handling support
KVM: riscv: selftests: Add guest helper to get vcpu id
KVM: riscv: selftests: Change vcpu_has_ext to a common function
KVM: riscv: selftests: Add sstc timer test
Paolo Bonzini (1):
selftests/kvm: Fix issues with $(SPLIT_TESTS)
tools/arch/riscv/include/asm/csr.h | 541 ++++++++++++++++++
tools/arch/riscv/include/asm/vdso/processor.h | 32 ++
tools/testing/selftests/kvm/Makefile | 27 +-
.../selftests/kvm/aarch64/arch_timer.c | 295 +---------
tools/testing/selftests/kvm/arch_timer.c | 259 +++++++++
.../selftests/kvm/include/aarch64/processor.h | 4 -
.../selftests/kvm/include/kvm_util_base.h | 9 +
.../selftests/kvm/include/riscv/arch_timer.h | 71 +++
.../selftests/kvm/include/riscv/processor.h | 65 ++-
.../testing/selftests/kvm/include/test_util.h | 2 +
.../selftests/kvm/include/timer_test.h | 45 ++
.../selftests/kvm/lib/riscv/handlers.S | 101 ++++
.../selftests/kvm/lib/riscv/processor.c | 87 +++
.../testing/selftests/kvm/riscv/arch_timer.c | 111 ++++
.../selftests/kvm/riscv/get-reg-list.c | 11 +-
15 files changed, 1353 insertions(+), 307 deletions(-)
create mode 100644 tools/arch/riscv/include/asm/csr.h
create mode 100644 tools/arch/riscv/include/asm/vdso/processor.h
create mode 100644 tools/testing/selftests/kvm/arch_timer.c
create mode 100644 tools/testing/selftests/kvm/include/riscv/arch_timer.h
create mode 100644 tools/testing/selftests/kvm/include/timer_test.h
create mode 100644 tools/testing/selftests/kvm/lib/riscv/handlers.S
create mode 100644 tools/testing/selftests/kvm/riscv/arch_timer.c
--
2.34.1