In this series from Geliang, there are various improvements in MPTCP
selftests: sharing code, doing actions the same way, colours, etc.
Patch 1 prints all error messages to stdout: what was done in almost all
other MPTCP selftests. This can be now easily changed later if needed.
Patch 2 makes sure the test counter is continuous in mptcp_connect.sh.
Patch 3 aligns the messages that are printed in mptcp_connect.sh.
Patch 4 prints each test results in mptcp_sockopt.sh, similar to what we
have in the TAP output.
Patch 5 moves the different test counters to a single one in
mptcp_lib.sh, to uniform how it is used.
Patch 6 moves how titles are printed from mptcp_join.sh to the lib, to
be reused in patch 7 by all other MPTCP selftests.
Patch 8 uses the '+=' operator to append strings instead of repeating
twice the variable name: that's shorter, easier to read.
Patch 9 adds colours for the [ OK ], [SKIP], [FAIL] and INFO keywords in
all MPTCP selftests.
Patch 10 to 12 are some preparation patches for patch 13: patch 10
modifies how some 'test_fail' helpers, patch 11 moves a helper from
userspace_pm.sh to the lib, and patch 12 changes where titles are
printed in userspace_pm.sh. Patch 13 moves some duplicated helpers from
mptcp_join.sh and userspace_pm.sh to mptcp_lib.sh.
Patch 14 moves duplicated read-only variables from mptcp_join.sh and
userspace_pm.sh to mptcp_lib.sh as well.
Patch 15 uses explicit variables instead of hard-coded numbers for the
exit status.
Signed-off-by: Matthieu Baerts (NGI0) <matttbe(a)kernel.org>
---
Geliang Tang (15):
selftests: mptcp: print all error messages to stdout
selftests: mptcp: connect: add dedicated port counter
selftests: mptcp: connect: fix misaligned output
selftests: mptcp: sockopt: print every test result
selftests: mptcp: export TEST_COUNTER variable
selftests: mptcp: add print_title in mptcp_lib
selftests: mptcp: print test results with counters
selftests: mptcp: use += operator to append strings
selftests: mptcp: print test results with colors
selftests: mptcp: call test_fail without argument
selftests: mptcp: extract mptcp_lib_check_expected
selftests: mptcp: print_test out of verify_listener_events
selftests: mptcp: add mptcp_lib_verify_listener_events
selftests: mptcp: declare event macros in mptcp_lib
selftests: mptcp: use KSFT_SKIP/KSFT_PASS/KSFT_FAIL
tools/testing/selftests/net/mptcp/diag.sh | 19 ++-
tools/testing/selftests/net/mptcp/mptcp_connect.sh | 145 +++++++++++----------
tools/testing/selftests/net/mptcp/mptcp_join.sh | 120 +++++++----------
tools/testing/selftests/net/mptcp/mptcp_lib.sh | 113 ++++++++++++++--
tools/testing/selftests/net/mptcp/mptcp_sockopt.sh | 53 ++++----
tools/testing/selftests/net/mptcp/pm_netlink.sh | 13 +-
tools/testing/selftests/net/mptcp/simult_flows.sh | 18 +--
tools/testing/selftests/net/mptcp/userspace_pm.sh | 117 +++++------------
8 files changed, 312 insertions(+), 286 deletions(-)
---
base-commit: 19cfdc0d57696c92523da8eb26c0f3e092400bee
change-id: 20240308-upstream-net-next-20240308-selftests-mptcp-unification-6df178cc8f6a
Best regards,
--
Matthieu Baerts (NGI0) <matttbe(a)kernel.org>
This patch series introduces a new char misc driver, /dev/ntsync, which is used
to implement Windows NT synchronization primitives.
This was previously submitted as an RFC [1]. Since there were no major changes
requested to the last RFC revision, I've stripped the RFC prefix.
[1] https://lore.kernel.org/lkml/20240131021356.10322-1-zfigura@codeweavers.com/
== Background ==
The Wine project emulates the Windows API in user space. One particular part of
that API, namely the NT synchronization primitives, have historically been
implemented via RPC to a dedicated "kernel" process. However, more recent
applications use these APIs more strenuously, and the overhead of RPC has become
a bottleneck.
The NT synchronization APIs are too complex to implement on top of existing
primitives without sacrificing correctness. Certain operations, such as
NtPulseEvent() or the "wait-for-all" mode of NtWaitForMultipleObjects(), require
direct control over the underlying wait queue, and implementing a wait queue
sufficiently robust for Wine in user space is not possible. This proposed
driver, therefore, implements the problematic interfaces directly in the Linux
kernel.
This driver was presented at Linux Plumbers Conference 2023. For those further
interested in the history of synchronization in Wine and past attempts to solve
this problem in user space, a recording of the presentation can be viewed here:
https://www.youtube.com/watch?v=NjU4nyWyhU8
== Performance ==
The gain in performance varies wildly depending on the application in question
and the user's hardware. For some games NT synchronization is not a bottleneck
and no change can be observed, but for others frame rate improvements of 50 to
150 percent are not atypical. The following table lists frame rate measurements
from a variety of games on a variety of hardware, taken by users Dmitry
Skvortsov, FuzzyQuils, OnMars, and myself:
Game Upstream ntsync improvement
===========================================================================
Anger Foot 69 99 43%
Call of Juarez 99.8 224.1 125%
Dirt 3 110.6 860.7 678%
Forza Horizon 5 108 160 48%
Lara Croft: Temple of Osiris 141 326 131%
Metro 2033 164.4 199.2 21%
Resident Evil 2 26 77 196%
The Crew 26 51 96%
Tiny Tina's Wonderlands 130 360 177%
Total War Saga: Troy 109 146 34%
===========================================================================
== Patches ==
The intended semantics of the patches are broadly intended to match those of the
corresponding Windows functions. For those not already familiar with the Windows
functions (or their undocumented behaviour), patch 31/31 provides a detailed
specification, and individual patches also include a brief description of the
API they are implementing.
The patches making use of this driver in Wine can be retrieved or browsed here:
https://repo.or.cz/wine/zf.git/shortlog/refs/heads/ntsync5
== Implementation ==
Some aspects of the implementation may deserve particular comment:
* In the interest of performance, each object is governed only by a single
spinlock. However, NTSYNC_IOC_WAIT_ALL requires that the state of multiple
objects be changed as a single atomic operation. In order to achieve this, we
first take a device-wide lock ("wait_all_lock") any time we are going to lock
more than one object at a time.
The maximum number of objects that can be used in a vectored wait, and
therefore the maximum that can be locked simultaneously, is 64. This number is
NT's own limit.
The acquisition of multiple spinlocks will degrade performance. This is a
conscious choice, however. Wait-for-all is known to be a very rare operation
in practice, especially with counts that approach the maximum, and it is the
intent of the ntsync driver to optimize wait-for-any at the expense of
wait-for-all as much as possible.
* NT mutexes are tied to their threads on an OS level, and the kernel includes
builtin support for "robust" mutexes. In order to keep the ntsync driver
self-contained and avoid touching more code than necessary, it does not hook
into task exit nor use pids.
Instead, the user space emulator is expected to manage thread IDs and pass
them as an argument to any relevant functions; this is the "owner" field of
ntsync_wait_args and ntsync_mutex_args.
When the emulator detects that a thread dies, it should therefore call
NTSYNC_IOC_MUTEX_KILL on any open mutexes.
* ntsync is module-capable mostly because there was nothing preventing it, and
because it aided development. It is not a hard requirement, though.
== Previous versions ==
Changes from v1:
* Fix a broken rebase that stole part of the Kconfig documentation from the
neighbouring entry, per Randy Dunlap.
* Add my email address to copyright and MODULE_AUTHOR lines, per Randy Dunlap.
* Document the reference counting behaviour more clearly, per Greg
Kroah-Hartman.
* Hopefully submit all the patches this time the right way.
* Link to v1: https://lore.kernel.org/lkml/20240214233645.9273-1-zfigura@codeweavers.com/
* Link to RFC v2: https://lore.kernel.org/lkml/20240131021356.10322-1-zfigura@codeweavers.com/
* Link to RFC v1: https://lore.kernel.org/lkml/20240124004028.16826-1-zfigura@codeweavers.com/
Elizabeth Figura (31):
ntsync: Introduce the ntsync driver and character device.
ntsync: Introduce NTSYNC_IOC_CREATE_SEM.
ntsync: Introduce NTSYNC_IOC_SEM_POST.
ntsync: Introduce NTSYNC_IOC_WAIT_ANY.
ntsync: Introduce NTSYNC_IOC_WAIT_ALL.
ntsync: Introduce NTSYNC_IOC_CREATE_MUTEX.
ntsync: Introduce NTSYNC_IOC_MUTEX_UNLOCK.
ntsync: Introduce NTSYNC_IOC_MUTEX_KILL.
ntsync: Introduce NTSYNC_IOC_CREATE_EVENT.
ntsync: Introduce NTSYNC_IOC_EVENT_SET.
ntsync: Introduce NTSYNC_IOC_EVENT_RESET.
ntsync: Introduce NTSYNC_IOC_EVENT_PULSE.
ntsync: Introduce NTSYNC_IOC_SEM_READ.
ntsync: Introduce NTSYNC_IOC_MUTEX_READ.
ntsync: Introduce NTSYNC_IOC_EVENT_READ.
ntsync: Introduce alertable waits.
ntsync: Allow waits to use the REALTIME clock.
selftests: ntsync: Add some tests for semaphore state.
selftests: ntsync: Add some tests for mutex state.
selftests: ntsync: Add some tests for NTSYNC_IOC_WAIT_ANY.
selftests: ntsync: Add some tests for NTSYNC_IOC_WAIT_ALL.
selftests: ntsync: Add some tests for wakeup signaling with
WINESYNC_IOC_WAIT_ANY.
selftests: ntsync: Add some tests for wakeup signaling with
WINESYNC_IOC_WAIT_ALL.
selftests: ntsync: Add some tests for manual-reset event state.
selftests: ntsync: Add some tests for auto-reset event state.
selftests: ntsync: Add some tests for wakeup signaling with events.
selftests: ntsync: Add tests for alertable waits.
selftests: ntsync: Add some tests for wakeup signaling via alerts.
selftests: ntsync: Add a stress test for contended waits.
maintainers: Add an entry for ntsync.
docs: ntsync: Add documentation for the ntsync uAPI.
Elizabeth Figura (31):
ntsync: Introduce the ntsync driver and character device.
ntsync: Introduce NTSYNC_IOC_CREATE_SEM.
ntsync: Introduce NTSYNC_IOC_SEM_POST.
ntsync: Introduce NTSYNC_IOC_WAIT_ANY.
ntsync: Introduce NTSYNC_IOC_WAIT_ALL.
ntsync: Introduce NTSYNC_IOC_CREATE_MUTEX.
ntsync: Introduce NTSYNC_IOC_MUTEX_UNLOCK.
ntsync: Introduce NTSYNC_IOC_MUTEX_KILL.
ntsync: Introduce NTSYNC_IOC_CREATE_EVENT.
ntsync: Introduce NTSYNC_IOC_EVENT_SET.
ntsync: Introduce NTSYNC_IOC_EVENT_RESET.
ntsync: Introduce NTSYNC_IOC_EVENT_PULSE.
ntsync: Introduce NTSYNC_IOC_SEM_READ.
ntsync: Introduce NTSYNC_IOC_MUTEX_READ.
ntsync: Introduce NTSYNC_IOC_EVENT_READ.
ntsync: Introduce alertable waits.
ntsync: Allow waits to use the REALTIME clock.
selftests: ntsync: Add some tests for semaphore state.
selftests: ntsync: Add some tests for mutex state.
selftests: ntsync: Add some tests for NTSYNC_IOC_WAIT_ANY.
selftests: ntsync: Add some tests for NTSYNC_IOC_WAIT_ALL.
selftests: ntsync: Add some tests for wakeup signaling with
WINESYNC_IOC_WAIT_ANY.
selftests: ntsync: Add some tests for wakeup signaling with
WINESYNC_IOC_WAIT_ALL.
selftests: ntsync: Add some tests for manual-reset event state.
selftests: ntsync: Add some tests for auto-reset event state.
selftests: ntsync: Add some tests for wakeup signaling with events.
selftests: ntsync: Add tests for alertable waits.
selftests: ntsync: Add some tests for wakeup signaling via alerts.
selftests: ntsync: Add a stress test for contended waits.
maintainers: Add an entry for ntsync.
docs: ntsync: Add documentation for the ntsync uAPI.
Documentation/userspace-api/index.rst | 1 +
.../userspace-api/ioctl/ioctl-number.rst | 2 +
Documentation/userspace-api/ntsync.rst | 399 +++++
MAINTAINERS | 9 +
drivers/misc/Kconfig | 11 +
drivers/misc/Makefile | 1 +
drivers/misc/ntsync.c | 1159 ++++++++++++++
include/uapi/linux/ntsync.h | 62 +
tools/testing/selftests/Makefile | 1 +
.../testing/selftests/drivers/ntsync/Makefile | 8 +
tools/testing/selftests/drivers/ntsync/config | 1 +
.../testing/selftests/drivers/ntsync/ntsync.c | 1407 +++++++++++++++++
12 files changed, 3061 insertions(+)
create mode 100644 Documentation/userspace-api/ntsync.rst
create mode 100644 drivers/misc/ntsync.c
create mode 100644 include/uapi/linux/ntsync.h
create mode 100644 tools/testing/selftests/drivers/ntsync/Makefile
create mode 100644 tools/testing/selftests/drivers/ntsync/config
create mode 100644 tools/testing/selftests/drivers/ntsync/ntsync.c
base-commit: 8d11c6d9b14f7a87f65529cb33edc5fed846ed9d
--
2.43.0
Hi Linus,
Please pull the following KUnit next update for Linux 6.8-rc1.
This KUnit next update for Linux 6.9-rc1 consists of:
-- fix to make kunit_bus_type const
-- kunit tool change to Print UML command
-- DRM device creation helpers are now using the new kunit device
creation helpers. This change resulted in DRM helpers switching
from using a platform_device, to a dedicated bus and device type
used by kunit. kunit devices don't set DMA mask and this caused
regression on some drm tests as they can't allocate DMA buffers.
Fix this problem by setting DMA masks on the kunit device during
initialization.
-- KUnit has several macros which accept a log message, which can
contain printf format specifiers. Some of these (the explicit
log macros) already use the __printf() gcc attribute to ensure
the format specifiers are valid, but those which could fail the
test, and hence used __kunit_do_failed_assertion() behind the scenes,
did not.
These include: KUNIT_EXPECT_*_MSG(), KUNIT_ASSERT_*_MSG(), and
KUNIT_FAIL()
A 9 patch series adds the __printf() attribute, and fixes all of
the issues uncovered.
Note:
make allmodconfig x86 passed passed for me on March 4th linux-next
(This could be with Stephen's fix up for the following problem).
Stephen found a problem in drivers/gpu/drm/tests/drm_buddy_test.c
Caused by commit
806cb2270237 ("kunit: Annotate _MSG assertion variants with gnu printf specifiers")
interacting with commit
c70703320e55 ("drm/tests/drm_buddy: add alloc_range_bias test")
from the drm-misc-fixes tree.
Stephen found that the problem is not with the format string types,
but with a missing argument i.e. there is another argument required
by the format string.
It is easier to fix this problem in the drm-misc-fixes tree.
The hope is that the fix to the problem has been sent to you or will
be sent to you before the merge.
If not Stephen's fix up will be necessary.
diff is attached.
thanks,
-- Shuah
----------------------------------------------------------------
The following changes since commit d206a76d7d2726f3b096037f2079ce0bd3ba329b:
Linux 6.8-rc6 (2024-02-25 15:46:06 -0800)
are available in the Git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest tags/linux_kselftest-kunit-6.9-rc1
for you to fetch changes up to 806cb2270237ce2ec672a407d66cee17a07d3aa2:
kunit: Annotate _MSG assertion variants with gnu printf specifiers (2024-02-28 13:07:49 -0700)
----------------------------------------------------------------
linux_kselftest-kunit-6.9-rc1
This KUnit next update for Linux 6.9-rc1 consists of:
-- fix to make kunit_bus_type const
-- kunit tool change to Print UML command
-- DRM device creation helpers are now using the new kunit device
creation helpers. This change resulted in DRM helpers switching
from using a platform_device, to a dedicated bus and device type
used by kunit. kunit devices don't set DMA mask and this caused
regression on some drm tests as they can't allocate DMA buffers.
Fix this problem by setting DMA masks on the kunit device during
initialization.
-- KUnit has several macros which accept a log message, which can
contain printf format specifiers. Some of these (the explicit
log macros) already use the __printf() gcc attribute to ensure
the format specifiers are valid, but those which could fail the
test, and hence used __kunit_do_failed_assertion() behind the scenes,
did not.
These include: KUNIT_EXPECT_*_MSG(), KUNIT_ASSERT_*_MSG(), and
KUNIT_FAIL()
A 9 patch series adds the __printf() attribute, and fixes all of
the issues uncovered.
----------------------------------------------------------------
David Gow (9):
kunit: test: Log the correct filter string in executor_test
lib/cmdline: Fix an invalid format specifier in an assertion msg
lib: memcpy_kunit: Fix an invalid format specifier in an assertion msg
time: test: Fix incorrect format specifier
rtc: test: Fix invalid format specifier.
net: test: Fix printf format specifier in skb_segment kunit test
drm/xe/tests: Fix printf format specifiers in xe_migrate test
drm: tests: Fix invalid printf format specifiers in KUnit tests
kunit: Annotate _MSG assertion variants with gnu printf specifiers
Lucas De Marchi (1):
kunit: Mark filter* params as rw
Maxime Ripard (1):
kunit: Setup DMA masks on the kunit device
Mickaël Salaün (1):
kunit: tool: Print UML command
Ricardo B. Marliere (1):
kunit: make kunit_bus_type const
drivers/gpu/drm/tests/drm_buddy_test.c | 14 +++++++-------
drivers/gpu/drm/tests/drm_mm_test.c | 6 +++---
drivers/gpu/drm/xe/tests/xe_migrate.c | 8 ++++----
drivers/rtc/lib_test.c | 2 +-
include/kunit/test.h | 12 ++++++------
kernel/time/time_test.c | 2 +-
lib/cmdline_kunit.c | 2 +-
lib/kunit/device.c | 6 +++++-
lib/kunit/executor.c | 6 +++---
lib/kunit/executor_test.c | 2 +-
lib/memcpy_kunit.c | 4 ++--
net/core/gso_test.c | 2 +-
tools/testing/kunit/kunit_kernel.py | 1 +
13 files changed, 36 insertions(+), 31 deletions(-)
----------------------------------------------------------------
Hi Linus,
Please pull the following Kselftest update for Linux 6.9-rc1.
This kselftest next update for Linux 6.9-rc1 consists of:
-- livepatch restructuring to move the module out of lib to be
built as a out-of-tree modules during kselftest build. This
change makes it easier change, debug and rebuild the tests by
running make on the selftests/livepatch directory, which is not
currently possible since the modules on lib/livepatch are build
and installed using the main makefile modules target.
-- livepatch restructuring fixes for problems found by kernel test
robot. The change skips the test if kernel-devel isn't installed
(default value of KDIR), or if KDIR variable passed doesn't exists.
-- resctrl test restructuring and new non-contiguous CBMs CAT test
-- new ktap_helpers to print diagnostic messages, pass/fail tests
based on exit code, abort test, and finish the test.
-- a new test verify power supply properties.
-- a new ftrace to exercise function tracer across cpu hotplug.
-- timeout increase for mqueue test to allow the test to run on
i3.metal AWS instances.
-- minor spelling corrections in several tests.
-- missing gitignore files and changes to existing gitignore files.
diff is attached.
thanks,
-- Shuah
----------------------------------------------------------------
The following changes since commit 6613476e225e090cc9aad49be7fa504e290dd33d:
Linux 6.8-rc1 (2024-01-21 14:11:32 -0800)
are available in the Git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest tags/linux_kselftest-next-6.9-rc1
for you to fetch changes up to 5d94da7ff00ef45737a64d947e7ff45aca972782:
kselftest: Add basic test for probing the rust sample modules (2024-03-04 13:13:04 -0700)
----------------------------------------------------------------
linux_kselftest-next-6.9-rc1
This kselftest next update for Linux 6.9-rc1 consists of:
-- livepatch restructuring to move the module out of lib to be
built as a out-of-tree modules during kselftest build. This
change makes it easier change, debug and rebuild the tests by
running make on the selftests/livepatch directory, which is not
currently possible since the modules on lib/livepatch are build
and installed using the main makefile modules target.
-- livepatch restructuring fixes for problems found by kernel test
robot. The change skips the test if kernel-devel isn't installed
(default value of KDIR), or if KDIR variable passed doesn't exists.
-- resctrl test restructuring and new non-contiguous CBMs CAT test
-- new ktap_helpers to print diagnostic messages, pass/fail tests
based on exit code, abort test, and finish the test.
-- a new test verify power supply properties.
-- a new ftrace to exercise function tracer across cpu hotplug.
-- timeout increase for mqueue test to allow the test to run on
i3.metal AWS instances.
-- minor spelling corrections in several tests.
-- missing gitignore files and changes to existing gitignore files.
----------------------------------------------------------------
Ali Zahraee (1):
selftests: ftrace: fix typo in test description
Colin Ian King (1):
selftests: sched: Fix spelling mistake "hiearchy" -> "hierarchy"
Ilpo Järvinen (30):
selftests/resctrl: Convert perror() to ksft_perror() or ksft_print_msg()
selftests/resctrl: Return -1 instead of errno on error
selftests/resctrl: Don't use ctrlc_handler() outside signal handling
selftests/resctrl: Change function comments to say < 0 on error
selftests/resctrl: Split fill_buf to allow tests finer-grained control
selftests/resctrl: Refactor fill_buf functions
selftests/resctrl: Refactor get_cbm_mask() and rename to get_full_cbm()
selftests/resctrl: Mark get_cache_size() cache_type const
selftests/resctrl: Create cache_portion_size() helper
selftests/resctrl: Exclude shareable bits from schemata in CAT test
selftests/resctrl: Split measure_cache_vals()
selftests/resctrl: Split show_cache_info() to test specific and generic parts
selftests/resctrl: Remove unnecessary __u64 -> unsigned long conversion
selftests/resctrl: Remove nested calls in perf event handling
selftests/resctrl: Consolidate naming of perf event related things
selftests/resctrl: Improve perf init
selftests/resctrl: Convert perf related globals to locals
selftests/resctrl: Move cat_val() to cat_test.c and rename to cat_test()
selftests/resctrl: Open perf fd before start & add error handling
selftests/resctrl: Replace file write with volatile variable
selftests/resctrl: Read in less obvious order to defeat prefetch optimizations
selftests/resctrl: Rewrite Cache Allocation Technology (CAT) test
selftests/resctrl: Restore the CPU affinity after CAT test
selftests/resctrl: Create struct for input parameters
selftests/resctrl: Introduce generalized test framework
selftests/resctrl: Pass write_schemata() resource instead of test name
selftests/resctrl: Add helper to convert L2/3 to integer
selftests/resctrl: Rename resource ID to domain ID
selftests/resctrl: Get domain id from cache id
selftests/resctrl: Add test groups and name L3 CAT test L3_CAT
Javier Carrasco (3):
selftests: uevent: add missing gitignore
selftests: thermal: intel: power_floor: add missing gitignore
selftests: thermal: intel: workload_hint: add missing gitignore
Kousik Sanagavarapu (1):
selftest/ftrace: fix typo in ftracetest script
Laura Nao (2):
selftests: Move KTAP bash helpers to selftests common folder
kselftest: Add basic test for probing the rust sample modules
Maciej Wieczor-Retman (4):
selftests/resctrl: Add a helper for the non-contiguous test
selftests/resctrl: Split validate_resctrl_feature_request()
selftests/resctrl: Add resource_info_file_exists()
selftests/resctrl: Add non-contiguous CBMs CAT test
Marcos Paulo de Souza (6):
kselftests: lib.mk: Add TEST_GEN_MODS_DIR variable
livepatch: Move tests from lib/livepatch to selftests/livepatch
selftests: livepatch: Test livepatching a heavily called syscall
selftests: livepatch: Add initial .gitignore
selftests: livepatch: Avoid running the tests if kernel-devel is missing
selftests: lib.mk: Do not process TEST_GEN_MODS_DIR
Mark Brown (1):
selftests: fuxex: Report a unique test name per run of futex_requeue_pi
Naveen N Rao (1):
selftests/ftrace: Add test to exercize function tracer across cpu hotplug
Nícolas F. R. A. Prado (5):
selftests: ktap_helpers: Add helper to print diagnostic messages
selftests: ktap_helpers: Add helper to pass/fail test based on exit code
selftests: ktap_helpers: Add a helper to abort the test
selftests: ktap_helpers: Add a helper to finish the test
selftests: Add test to verify power supply properties
SeongJae Park (1):
selftests/mqueue: Set timeout to 180 seconds
Vincenzo Mezzela (1):
selftest: ftrace: fix minor typo in log
Documentation/dev-tools/kselftest.rst | 4 +
MAINTAINERS | 3 +-
arch/s390/configs/debug_defconfig | 1 -
arch/s390/configs/defconfig | 1 -
lib/Kconfig.debug | 22 --
lib/Makefile | 2 -
lib/livepatch/Makefile | 14 -
tools/testing/selftests/Makefile | 3 +
tools/testing/selftests/dt/Makefile | 2 +-
.../testing/selftests/dt/test_unprobed_devices.sh | 6 +-
tools/testing/selftests/ftrace/ftracetest | 2 +-
.../ftrace/test.d/00basic/test_ownership.tc | 2 +-
.../selftests/ftrace/test.d/ftrace/func_hotplug.tc | 42 ++
.../ftrace/test.d/trigger/trigger-hist-mod.tc | 2 +-
.../selftests/futex/functional/futex_requeue_pi.c | 13 +-
.../selftests/{dt => kselftest}/ktap_helpers.sh | 45 ++-
tools/testing/selftests/lib.mk | 23 +-
tools/testing/selftests/livepatch/.gitignore | 1 +
tools/testing/selftests/livepatch/Makefile | 5 +-
tools/testing/selftests/livepatch/README | 25 +-
tools/testing/selftests/livepatch/config | 1 -
tools/testing/selftests/livepatch/functions.sh | 47 ++-
.../testing/selftests/livepatch/test-callbacks.sh | 50 +--
tools/testing/selftests/livepatch/test-ftrace.sh | 6 +-
.../testing/selftests/livepatch/test-livepatch.sh | 10 +-
.../selftests/livepatch/test-shadow-vars.sh | 2 +-
tools/testing/selftests/livepatch/test-state.sh | 18 +-
tools/testing/selftests/livepatch/test-syscall.sh | 53 +++
tools/testing/selftests/livepatch/test-sysfs.sh | 6 +-
.../selftests/livepatch/test_klp-call_getpid.c | 44 +++
.../selftests/livepatch/test_modules/Makefile | 26 ++
.../test_modules}/test_klp_atomic_replace.c | 0
.../test_modules}/test_klp_callbacks_busy.c | 0
.../test_modules}/test_klp_callbacks_demo.c | 0
.../test_modules}/test_klp_callbacks_demo2.c | 0
.../test_modules}/test_klp_callbacks_mod.c | 0
.../livepatch/test_modules}/test_klp_livepatch.c | 0
.../livepatch/test_modules}/test_klp_shadow_vars.c | 0
.../livepatch/test_modules}/test_klp_state.c | 0
.../livepatch/test_modules}/test_klp_state2.c | 0
.../livepatch/test_modules}/test_klp_state3.c | 0
.../livepatch/test_modules/test_klp_syscall.c | 116 ++++++
tools/testing/selftests/mqueue/setting | 1 +
tools/testing/selftests/power_supply/Makefile | 4 +
tools/testing/selftests/power_supply/helpers.sh | 178 +++++++++
.../power_supply/test_power_supply_properties.sh | 114 ++++++
tools/testing/selftests/resctrl/cache.c | 287 ++++----------
tools/testing/selftests/resctrl/cat_test.c | 421 +++++++++++++++------
tools/testing/selftests/resctrl/cmt_test.c | 80 +++-
tools/testing/selftests/resctrl/fill_buf.c | 132 +++----
tools/testing/selftests/resctrl/mba_test.c | 30 +-
tools/testing/selftests/resctrl/mbm_test.c | 34 +-
tools/testing/selftests/resctrl/resctrl.h | 145 +++++--
tools/testing/selftests/resctrl/resctrl_tests.c | 207 +++++-----
tools/testing/selftests/resctrl/resctrl_val.c | 138 ++++---
tools/testing/selftests/resctrl/resctrlfs.c | 405 ++++++++++++++------
tools/testing/selftests/rust/Makefile | 4 +
tools/testing/selftests/rust/config | 5 +
tools/testing/selftests/rust/test_probe_samples.sh | 41 ++
tools/testing/selftests/sched/cs_prctl_test.c | 2 +-
.../selftests/thermal/intel/power_floor/.gitignore | 1 +
.../thermal/intel/workload_hint/.gitignore | 1 +
tools/testing/selftests/uevent/.gitignore | 1 +
63 files changed, 1945 insertions(+), 883 deletions(-)
delete mode 100644 lib/livepatch/Makefile
create mode 100644 tools/testing/selftests/ftrace/test.d/ftrace/func_hotplug.tc
rename tools/testing/selftests/{dt => kselftest}/ktap_helpers.sh (66%)
create mode 100644 tools/testing/selftests/livepatch/.gitignore
create mode 100755 tools/testing/selftests/livepatch/test-syscall.sh
create mode 100644 tools/testing/selftests/livepatch/test_klp-call_getpid.c
create mode 100644 tools/testing/selftests/livepatch/test_modules/Makefile
rename {lib/livepatch => tools/testing/selftests/livepatch/test_modules}/test_klp_atomic_replace.c (100%)
rename {lib/livepatch => tools/testing/selftests/livepatch/test_modules}/test_klp_callbacks_busy.c (100%)
rename {lib/livepatch => tools/testing/selftests/livepatch/test_modules}/test_klp_callbacks_demo.c (100%)
rename {lib/livepatch => tools/testing/selftests/livepatch/test_modules}/test_klp_callbacks_demo2.c (100%)
rename {lib/livepatch => tools/testing/selftests/livepatch/test_modules}/test_klp_callbacks_mod.c (100%)
rename {lib/livepatch => tools/testing/selftests/livepatch/test_modules}/test_klp_livepatch.c (100%)
rename {lib/livepatch => tools/testing/selftests/livepatch/test_modules}/test_klp_shadow_vars.c (100%)
rename {lib/livepatch => tools/testing/selftests/livepatch/test_modules}/test_klp_state.c (100%)
rename {lib/livepatch => tools/testing/selftests/livepatch/test_modules}/test_klp_state2.c (100%)
rename {lib/livepatch => tools/testing/selftests/livepatch/test_modules}/test_klp_state3.c (100%)
create mode 100644 tools/testing/selftests/livepatch/test_modules/test_klp_syscall.c
create mode 100644 tools/testing/selftests/mqueue/setting
create mode 100644 tools/testing/selftests/power_supply/Makefile
create mode 100644 tools/testing/selftests/power_supply/helpers.sh
create mode 100755 tools/testing/selftests/power_supply/test_power_supply_properties.sh
create mode 100644 tools/testing/selftests/rust/Makefile
create mode 100644 tools/testing/selftests/rust/config
create mode 100755 tools/testing/selftests/rust/test_probe_samples.sh
create mode 100644 tools/testing/selftests/thermal/intel/power_floor/.gitignore
create mode 100644 tools/testing/selftests/thermal/intel/workload_hint/.gitignore
create mode 100644 tools/testing/selftests/uevent/.gitignore
----------------------------------------------------------------
Hi,
In the vanilla net-next tree build of v6.8-rc7-2348-g75c2946db360, with up-to-date
iproute2 built tools, fcnal-test.sh reports certain failures:
--------------------------------------------------------------------------------------
# TEST: ping local, VRF bind - VRF IP [FAIL]
# TEST: ping local, device bind - ns-A IP [FAIL]
# TEST: ping local, VRF bind - VRF IP [FAIL]
# TEST: ping local, device bind - ns-A IP [FAIL]
--------------------------------------------------------------------------------------
Please find the config and the complete fncal-test.log attached.
The environment is Ubuntu 22.04 hwe.
There is also some simultaneous error report in syslog:
Mar 9 18:44:57 defiant kernel: [73380.243954] TCP: Unexpected MD5 Hash found for 172.16.1.2.42448->172.16.1.1.12345 [S]
Mar 9 18:44:58 defiant kernel: [73381.273950] TCP: Unexpected MD5 Hash found for 172.16.1.2.42448->172.16.1.1.12345 [S]
Mar 9 18:44:59 defiant kernel: [73382.297899] TCP: Unexpected MD5 Hash found for 172.16.1.2.42448->172.16.1.1.12345 [S]
Mar 9 18:45:00 defiant kernel: [73383.325779] TCP: Unexpected MD5 Hash found for 172.16.1.2.42448->172.16.1.1.12345 [S]
Mar 9 18:45:05 defiant kernel: [73388.295882] TCP: MD5 Hash failed for 172.16.1.2.53330->172.16.1.1.12345 [S] L3 index 0
Mar 9 18:45:06 defiant kernel: [73389.305408] TCP: MD5 Hash failed for 172.16.1.2.53330->172.16.1.1.12345 [S] L3 index 0
Mar 9 18:45:07 defiant kernel: [73390.329303] TCP: MD5 Hash failed for 172.16.1.2.53330->172.16.1.1.12345 [S] L3 index 0
Mar 9 18:45:08 defiant kernel: [73391.353347] TCP: MD5 Hash failed for 172.16.1.2.53330->172.16.1.1.12345 [S] L3 index 0
Mar 9 18:45:13 defiant kernel: [73396.344291] TCP: Unexpected MD5 Hash found for 172.16.1.2.35884->172.16.1.1.12345 [S]
Mar 9 18:45:14 defiant kernel: [73397.368916] TCP: Unexpected MD5 Hash found for 172.16.1.2.35884->172.16.1.1.12345 [S]
Mar 9 18:45:15 defiant kernel: [73398.392957] TCP: Unexpected MD5 Hash found for 172.16.1.2.35884->172.16.1.1.12345 [S]
Mar 9 18:45:16 defiant kernel: [73399.416742] TCP: Unexpected MD5 Hash found for 172.16.1.2.35884->172.16.1.1.12345 [S]
Mar 9 18:45:24 defiant kernel: [73407.444173] TCP: MD5 Hash failed for 172.16.1.2.45728->172.16.1.1.12345 [S] L3 index 0
Mar 9 18:45:25 defiant kernel: [73408.472269] TCP: MD5 Hash failed for 172.16.1.2.45728->172.16.1.1.12345 [S] L3 index 0
Mar 9 18:45:26 defiant kernel: [73409.495976] TCP: MD5 Hash failed for 172.16.1.2.45728->172.16.1.1.12345 [S] L3 index 0
Mar 9 18:45:27 defiant kernel: [73410.519916] TCP: MD5 Hash failed for 172.16.1.2.45728->172.16.1.1.12345 [S] L3 index 0
Mar 9 18:45:32 defiant kernel: [73415.494615] TCP: Unexpected MD5 Hash found for 172.16.2.2.12345->172.16.1.1.12345 [S]
Mar 9 18:45:33 defiant kernel: [73416.503460] TCP: Unexpected MD5 Hash found for 172.16.2.2.12345->172.16.1.1.12345 [S]
Mar 9 18:45:34 defiant kernel: [73417.531394] TCP: Unexpected MD5 Hash found for 172.16.2.2.12345->172.16.1.1.12345 [S]
Mar 9 18:45:35 defiant kernel: [73418.551315] TCP: Unexpected MD5 Hash found for 172.16.2.2.12345->172.16.1.1.12345 [S]
Mar 9 18:47:22 defiant kernel: [73525.350213] TCP: Unexpected MD5 Hash found for 172.16.1.2.54736->172.16.1.1.12345 [S]
Mar 9 18:47:23 defiant kernel: [73526.351780] TCP: Unexpected MD5 Hash found for 172.16.1.2.54736->172.16.1.1.12345 [S]
Mar 9 18:47:24 defiant kernel: [73527.375971] TCP: Unexpected MD5 Hash found for 172.16.1.2.54736->172.16.1.1.12345 [S]
Mar 9 18:47:25 defiant kernel: [73528.399632] TCP: Unexpected MD5 Hash found for 172.16.1.2.54736->172.16.1.1.12345 [S]
Mar 9 18:47:30 defiant kernel: [73533.402162] TCP: MD5 Hash failed for 172.16.1.2.38472->172.16.1.1.12345 [S] L3 index 0
Mar 9 18:47:31 defiant kernel: [73534.415271] TCP: MD5 Hash failed for 172.16.1.2.38472->172.16.1.1.12345 [S] L3 index 0
Mar 9 18:47:32 defiant kernel: [73535.439362] TCP: MD5 Hash failed for 172.16.1.2.38472->172.16.1.1.12345 [S] L3 index 0
Mar 9 18:47:33 defiant kernel: [73536.463119] TCP: MD5 Hash failed for 172.16.1.2.38472->172.16.1.1.12345 [S] L3 index 0
Mar 9 18:47:38 defiant kernel: [73541.453876] TCP: Unexpected MD5 Hash found for 172.16.1.2.56654->172.16.1.1.12345 [S]
Mar 9 18:47:39 defiant kernel: [73542.478746] TCP: Unexpected MD5 Hash found for 172.16.1.2.56654->172.16.1.1.12345 [S]
Mar 9 18:47:40 defiant kernel: [73543.502677] TCP: Unexpected MD5 Hash found for 172.16.1.2.56654->172.16.1.1.12345 [S]
Mar 9 18:47:41 defiant kernel: [73544.526523] TCP: Unexpected MD5 Hash found for 172.16.1.2.56654->172.16.1.1.12345 [S]
Mar 9 18:47:49 defiant kernel: [73552.553526] TCP: MD5 Hash failed for 172.16.1.2.40748->172.16.1.1.12345 [S] L3 index 0
Mar 9 18:47:50 defiant kernel: [73553.582003] TCP: MD5 Hash failed for 172.16.1.2.40748->172.16.1.1.12345 [S] L3 index 0
Mar 9 18:47:51 defiant kernel: [73554.605820] TCP: MD5 Hash failed for 172.16.1.2.40748->172.16.1.1.12345 [S] L3 index 0
Mar 9 18:47:52 defiant kernel: [73555.629936] TCP: MD5 Hash failed for 172.16.1.2.40748->172.16.1.1.12345 [S] L3 index 0
Mar 9 18:47:57 defiant kernel: [73560.604885] TCP: Unexpected MD5 Hash found for 172.16.2.2.12345->172.16.1.1.12345 [S]
Mar 9 18:47:58 defiant kernel: [73561.613434] TCP: Unexpected MD5 Hash found for 172.16.2.2.12345->172.16.1.1.12345 [S]
Mar 9 18:47:59 defiant kernel: [73562.637270] TCP: Unexpected MD5 Hash found for 172.16.2.2.12345->172.16.1.1.12345 [S]
Mar 9 18:48:01 defiant kernel: [73563.661162] TCP: Unexpected MD5 Hash found for 172.16.2.2.12345->172.16.1.1.12345 [S]
Mar 9 18:49:03 defiant kernel: [73626.193643] TCP: Unexpected MD5 Hash found for 172.16.1.2.52230->172.16.1.1.12345 [S]
Mar 9 18:49:04 defiant kernel: [73627.208926] TCP: Unexpected MD5 Hash found for 172.16.1.2.52230->172.16.1.1.12345 [S]
Mar 9 18:49:05 defiant kernel: [73628.232916] TCP: Unexpected MD5 Hash found for 172.16.1.2.52230->172.16.1.1.12345 [S]
Mar 9 18:49:06 defiant kernel: [73629.260834] TCP: Unexpected MD5 Hash found for 172.16.1.2.52230->172.16.1.1.12345 [S]
Mar 9 18:49:11 defiant kernel: [73634.242440] TCP: MD5 Hash failed for 172.16.1.2.52242->172.16.1.1.12345 [S] L3 index 13
Mar 9 18:49:12 defiant kernel: [73635.272436] TCP: MD5 Hash failed for 172.16.1.2.52242->172.16.1.1.12345 [S] L3 index 13
Mar 9 18:49:13 defiant kernel: [73636.296146] TCP: MD5 Hash failed for 172.16.1.2.52242->172.16.1.1.12345 [S] L3 index 13
Mar 9 18:49:14 defiant kernel: [73637.324079] TCP: MD5 Hash failed for 172.16.1.2.52242->172.16.1.1.12345 [S] L3 index 13
Mar 9 18:49:19 defiant kernel: [73642.294261] TCP: Unexpected MD5 Hash found for 172.16.1.2.37122->172.16.1.1.12345 [S]
Mar 9 18:49:20 defiant kernel: [73643.303623] TCP: Unexpected MD5 Hash found for 172.16.1.2.37122->172.16.1.1.12345 [S]
Mar 9 18:49:21 defiant kernel: [73644.327778] TCP: Unexpected MD5 Hash found for 172.16.1.2.37122->172.16.1.1.12345 [S]
Mar 9 18:49:22 defiant kernel: [73645.351652] TCP: Unexpected MD5 Hash found for 172.16.1.2.37122->172.16.1.1.12345 [S]
Mar 9 18:49:30 defiant kernel: [73653.393242] TCP: MD5 Hash failed for 172.16.1.2.51856->172.16.1.1.12345 [S] L3 index 13
Mar 9 18:49:31 defiant kernel: [73654.407017] TCP: MD5 Hash failed for 172.16.1.2.51856->172.16.1.1.12345 [S] L3 index 13
Mar 9 18:49:32 defiant kernel: [73655.431009] TCP: MD5 Hash failed for 172.16.1.2.51856->172.16.1.1.12345 [S] L3 index 13
Mar 9 18:49:33 defiant kernel: [73656.454706] TCP: MD5 Hash failed for 172.16.1.2.51856->172.16.1.1.12345 [S] L3 index 13
Mar 9 18:49:38 defiant kernel: [73661.445570] TCP: Unexpected MD5 Hash found for 172.16.2.2.12345->172.16.1.1.12345 [S]
Mar 9 18:49:39 defiant kernel: [73662.470408] TCP: Unexpected MD5 Hash found for 172.16.2.2.12345->172.16.1.1.12345 [S]
Mar 9 18:49:40 defiant kernel: [73663.494193] TCP: Unexpected MD5 Hash found for 172.16.2.2.12345->172.16.1.1.12345 [S]
Mar 9 18:49:41 defiant kernel: [73664.518144] TCP: Unexpected MD5 Hash found for 172.16.2.2.12345->172.16.1.1.12345 [S]
Mar 9 18:49:52 defiant kernel: [73675.595812] TCP: MD5 Hash failed for 172.16.1.2.36204->172.16.1.1.12345 [S] L3 index 0
Mar 9 18:49:53 defiant kernel: [73676.613479] TCP: MD5 Hash failed for 172.16.1.2.36204->172.16.1.1.12345 [S] L3 index 0
Mar 9 18:49:54 defiant kernel: [73677.637422] TCP: MD5 Hash failed for 172.16.1.2.36204->172.16.1.1.12345 [S] L3 index 0
Mar 9 18:49:56 defiant kernel: [73678.661142] TCP: MD5 Hash failed for 172.16.1.2.36204->172.16.1.1.12345 [S] L3 index 0
Mar 9 18:50:01 defiant kernel: [73683.649033] TCP: MD5 Hash failed for 172.16.1.2.52420->172.16.1.1.12345 [S] L3 index 13
Mar 9 18:50:02 defiant kernel: [73684.676836] TCP: MD5 Hash failed for 172.16.1.2.52420->172.16.1.1.12345 [S] L3 index 13
Mar 9 18:50:03 defiant kernel: [73685.700640] TCP: MD5 Hash failed for 172.16.1.2.52420->172.16.1.1.12345 [S] L3 index 13
Mar 9 18:50:04 defiant kernel: [73686.728654] TCP: MD5 Hash failed for 172.16.1.2.52420->172.16.1.1.12345 [S] L3 index 13
Mar 9 18:50:15 defiant kernel: [73697.793250] TCP: MD5 Hash failed for 172.16.1.2.49974->172.16.1.1.12345 [S] L3 index 0
Mar 9 18:50:16 defiant kernel: [73698.823735] TCP: MD5 Hash failed for 172.16.1.2.49974->172.16.1.1.12345 [S] L3 index 0
Mar 9 18:50:17 defiant kernel: [73699.843890] TCP: MD5 Hash failed for 172.16.1.2.49974->172.16.1.1.12345 [S] L3 index 0
Mar 9 18:50:18 defiant kernel: [73700.867574] TCP: MD5 Hash failed for 172.16.1.2.49974->172.16.1.1.12345 [S] L3 index 0
Mar 9 18:50:23 defiant kernel: [73705.846725] TCP: MD5 Hash failed for 172.16.1.2.55498->172.16.1.1.12345 [S] L3 index 13
Mar 9 18:50:24 defiant kernel: [73706.851167] TCP: MD5 Hash failed for 172.16.1.2.55498->172.16.1.1.12345 [S] L3 index 13
Mar 9 18:50:25 defiant kernel: [73707.875095] TCP: MD5 Hash failed for 172.16.1.2.55498->172.16.1.1.12345 [S] L3 index 13
Mar 9 18:50:26 defiant kernel: [73708.899061] TCP: MD5 Hash failed for 172.16.1.2.55498->172.16.1.1.12345 [S] L3 index 13
Mar 9 18:50:41 defiant kernel: [73724.087381] TCP: Unexpected MD5 Hash found for 172.16.1.2.53952->172.16.1.1.12345 [S]
Mar 9 18:50:42 defiant kernel: [73725.093871] TCP: Unexpected MD5 Hash found for 172.16.1.2.53952->172.16.1.1.12345 [S]
Mar 9 18:50:43 defiant kernel: [73726.113996] TCP: Unexpected MD5 Hash found for 172.16.1.2.53952->172.16.1.1.12345 [S]
Mar 9 18:50:44 defiant kernel: [73727.137924] TCP: Unexpected MD5 Hash found for 172.16.1.2.53952->172.16.1.1.12345 [S]
Mar 9 19:11:09 defiant kernel: [74951.775994] TCP: Unexpected MD5 Hash found for [2001:db8:1::2].39444->[2001:db8:1::1].12345 [S]
Mar 9 19:11:10 defiant kernel: [74952.784159] TCP: Unexpected MD5 Hash found for [2001:db8:1::2].39444->[2001:db8:1::1].12345 [S]
Mar 9 19:11:11 defiant kernel: [74953.804459] TCP: Unexpected MD5 Hash found for [2001:db8:1::2].39444->[2001:db8:1::1].12345 [S]
Mar 9 19:11:12 defiant kernel: [74954.828025] TCP: Unexpected MD5 Hash found for [2001:db8:1::2].39444->[2001:db8:1::1].12345 [S]
Mar 9 19:11:17 defiant kernel: [74959.828366] TCP: MD5 Hash mismatch for [2001:db8:1::2].42684->[2001:db8:1::1].12345 [S]L3 index 0
Mar 9 19:11:18 defiant kernel: [74960.843597] TCP: MD5 Hash mismatch for [2001:db8:1::2].42684->[2001:db8:1::1].12345 [S]L3 index 0
Mar 9 19:11:19 defiant kernel: [74961.867330] TCP: MD5 Hash mismatch for [2001:db8:1::2].42684->[2001:db8:1::1].12345 [S]L3 index 0
Mar 9 19:11:20 defiant kernel: [74962.891257] TCP: MD5 Hash mismatch for [2001:db8:1::2].42684->[2001:db8:1::1].12345 [S]L3 index 0
Mar 9 19:11:25 defiant kernel: [74967.881665] TCP: Unexpected MD5 Hash found for [2001:db8:1::2].53174->[2001:db8:1::1].12345 [S]
Mar 9 19:11:26 defiant kernel: [74968.906826] TCP: Unexpected MD5 Hash found for [2001:db8:1::2].53174->[2001:db8:1::1].12345 [S]
Mar 9 19:11:27 defiant kernel: [74969.934750] TCP: Unexpected MD5 Hash found for [2001:db8:1::2].53174->[2001:db8:1::1].12345 [S]
Mar 9 19:11:28 defiant kernel: [74970.954668] TCP: Unexpected MD5 Hash found for [2001:db8:1::2].53174->[2001:db8:1::1].12345 [S]
Mar 9 19:11:36 defiant kernel: [74978.977619] TCP: MD5 Hash mismatch for [2001:db8:1::2].37514->[2001:db8:1::1].12345 [S]L3 index 0
Mar 9 19:11:37 defiant kernel: [74979.978269] TCP: MD5 Hash mismatch for [2001:db8:1::2].37514->[2001:db8:1::1].12345 [S]L3 index 0
Mar 9 19:11:38 defiant kernel: [74981.002187] TCP: MD5 Hash mismatch for [2001:db8:1::2].37514->[2001:db8:1::1].12345 [S]L3 index 0
Mar 9 19:11:39 defiant kernel: [74982.026108] TCP: MD5 Hash mismatch for [2001:db8:1::2].37514->[2001:db8:1::1].12345 [S]L3 index 0
Mar 9 19:11:44 defiant kernel: [74987.030453] TCP: Unexpected MD5 Hash found for [2001:db8:2::2].12345->[2001:db8:1::1].12345 [S]
Mar 9 19:11:45 defiant kernel: [74988.041473] TCP: Unexpected MD5 Hash found for [2001:db8:2::2].12345->[2001:db8:1::1].12345 [S]
Mar 9 19:11:46 defiant kernel: [74989.065610] TCP: Unexpected MD5 Hash found for [2001:db8:2::2].12345->[2001:db8:1::1].12345 [S]
Mar 9 19:11:47 defiant kernel: [74990.089331] TCP: Unexpected MD5 Hash found for [2001:db8:2::2].12345->[2001:db8:1::1].12345 [S]
Mar 9 19:13:12 defiant kernel: [75075.490782] TCP: Unexpected MD5 Hash found for [2001:db8:1::2].52610->[2001:db8:1::1].12345 [S]
Mar 9 19:13:13 defiant kernel: [75076.515324] TCP: Unexpected MD5 Hash found for [2001:db8:1::2].52610->[2001:db8:1::1].12345 [S]
Mar 9 19:13:14 defiant kernel: [75077.543210] TCP: Unexpected MD5 Hash found for [2001:db8:1::2].52610->[2001:db8:1::1].12345 [S]
Mar 9 19:13:16 defiant kernel: [75078.563335] TCP: Unexpected MD5 Hash found for [2001:db8:1::2].52610->[2001:db8:1::1].12345 [S]
Mar 9 19:13:20 defiant kernel: [75083.543761] TCP: MD5 Hash mismatch for [2001:db8:1::2].48578->[2001:db8:1::1].12345 [S]L3 index 0
Mar 9 19:13:22 defiant kernel: [75084.546751] TCP: MD5 Hash mismatch for [2001:db8:1::2].48578->[2001:db8:1::1].12345 [S]L3 index 0
Mar 9 19:13:23 defiant kernel: [75085.570652] TCP: MD5 Hash mismatch for [2001:db8:1::2].48578->[2001:db8:1::1].12345 [S]L3 index 0
Mar 9 19:13:24 defiant kernel: [75086.598593] TCP: MD5 Hash mismatch for [2001:db8:1::2].48578->[2001:db8:1::1].12345 [S]L3 index 0
Mar 9 19:13:29 defiant kernel: [75091.593893] TCP: Unexpected MD5 Hash found for [2001:db8:1::2].36456->[2001:db8:1::1].12345 [S]
Mar 9 19:13:30 defiant kernel: [75092.610368] TCP: Unexpected MD5 Hash found for [2001:db8:1::2].36456->[2001:db8:1::1].12345 [S]
Mar 9 19:13:31 defiant kernel: [75093.638092] TCP: Unexpected MD5 Hash found for [2001:db8:1::2].36456->[2001:db8:1::1].12345 [S]
Mar 9 19:13:32 defiant kernel: [75094.662014] TCP: Unexpected MD5 Hash found for [2001:db8:1::2].36456->[2001:db8:1::1].12345 [S]
Mar 9 19:13:40 defiant kernel: [75102.693857] TCP: MD5 Hash mismatch for [2001:db8:1::2].38306->[2001:db8:1::1].12345 [S]L3 index 0
Mar 9 19:13:41 defiant kernel: [75103.713385] TCP: MD5 Hash mismatch for [2001:db8:1::2].38306->[2001:db8:1::1].12345 [S]L3 index 0
Mar 9 19:13:42 defiant kernel: [75104.737346] TCP: MD5 Hash mismatch for [2001:db8:1::2].38306->[2001:db8:1::1].12345 [S]L3 index 0
Mar 9 19:13:43 defiant kernel: [75105.761249] TCP: MD5 Hash mismatch for [2001:db8:1::2].38306->[2001:db8:1::1].12345 [S]L3 index 0
Mar 9 19:13:48 defiant kernel: [75110.744898] TCP: Unexpected MD5 Hash found for [2001:db8:2::2].12345->[2001:db8:1::1].12345 [S]
Mar 9 19:13:49 defiant kernel: [75111.748815] TCP: Unexpected MD5 Hash found for [2001:db8:2::2].12345->[2001:db8:1::1].12345 [S]
Mar 9 19:13:50 defiant kernel: [75112.768970] TCP: Unexpected MD5 Hash found for [2001:db8:2::2].12345->[2001:db8:1::1].12345 [S]
Mar 9 19:13:51 defiant kernel: [75113.792707] TCP: Unexpected MD5 Hash found for [2001:db8:2::2].12345->[2001:db8:1::1].12345 [S]
Mar 9 19:14:38 defiant kernel: [75161.124752] TCP: Unexpected MD5 Hash found for [2001:db8:1::2].37782->[2001:db8:1::1].12345 [S]
Mar 9 19:14:39 defiant kernel: [75162.145544] TCP: Unexpected MD5 Hash found for [2001:db8:1::2].37782->[2001:db8:1::1].12345 [S]
Mar 9 19:14:40 defiant kernel: [75163.165429] TCP: Unexpected MD5 Hash found for [2001:db8:1::2].37782->[2001:db8:1::1].12345 [S]
Mar 9 19:14:41 defiant kernel: [75164.189139] TCP: Unexpected MD5 Hash found for [2001:db8:1::2].37782->[2001:db8:1::1].12345 [S]
Mar 9 19:14:46 defiant kernel: [75169.176267] TCP: MD5 Hash mismatch for [2001:db8:1::2].39638->[2001:db8:1::1].12345 [S]L3 index 13
Mar 9 19:14:47 defiant kernel: [75170.204719] TCP: MD5 Hash mismatch for [2001:db8:1::2].39638->[2001:db8:1::1].12345 [S]L3 index 13
Mar 9 19:14:48 defiant kernel: [75171.228872] TCP: MD5 Hash mismatch for [2001:db8:1::2].39638->[2001:db8:1::1].12345 [S]L3 index 13
Mar 9 19:14:49 defiant kernel: [75172.252601] TCP: MD5 Hash mismatch for [2001:db8:1::2].39638->[2001:db8:1::1].12345 [S]L3 index 13
Mar 9 19:14:54 defiant kernel: [75177.228866] TCP: Unexpected MD5 Hash found for [2001:db8:1::2].50904->[2001:db8:1::1].12345 [S]
Mar 9 19:14:55 defiant kernel: [75178.236182] TCP: Unexpected MD5 Hash found for [2001:db8:1::2].50904->[2001:db8:1::1].12345 [S]
Mar 9 19:14:56 defiant kernel: [75179.260291] TCP: Unexpected MD5 Hash found for [2001:db8:1::2].50904->[2001:db8:1::1].12345 [S]
Mar 9 19:14:57 defiant kernel: [75180.284286] TCP: Unexpected MD5 Hash found for [2001:db8:1::2].50904->[2001:db8:1::1].12345 [S]
Mar 9 19:15:05 defiant kernel: [75188.328452] TCP: MD5 Hash mismatch for [2001:db8:1::2].58614->[2001:db8:1::1].12345 [S]L3 index 13
Mar 9 19:15:06 defiant kernel: [75189.339612] TCP: MD5 Hash mismatch for [2001:db8:1::2].58614->[2001:db8:1::1].12345 [S]L3 index 13
Mar 9 19:15:07 defiant kernel: [75190.363319] TCP: MD5 Hash mismatch for [2001:db8:1::2].58614->[2001:db8:1::1].12345 [S]L3 index 13
Mar 9 19:15:08 defiant kernel: [75191.387271] TCP: MD5 Hash mismatch for [2001:db8:1::2].58614->[2001:db8:1::1].12345 [S]L3 index 13
Mar 9 19:15:13 defiant kernel: [75196.380149] TCP: Unexpected MD5 Hash found for [2001:db8:2::2].12345->[2001:db8:1::1].12345 [S]
Mar 9 19:15:14 defiant kernel: [75197.402810] TCP: Unexpected MD5 Hash found for [2001:db8:2::2].12345->[2001:db8:1::1].12345 [S]
Mar 9 19:15:15 defiant kernel: [75198.426966] TCP: Unexpected MD5 Hash found for [2001:db8:2::2].12345->[2001:db8:1::1].12345 [S]
Mar 9 19:15:16 defiant kernel: [75199.454656] TCP: Unexpected MD5 Hash found for [2001:db8:2::2].12345->[2001:db8:1::1].12345 [S]
Mar 9 19:15:27 defiant kernel: [75210.528697] TCP: MD5 Hash mismatch for [2001:db8:1::2].35600->[2001:db8:1::1].12345 [S]L3 index 0
Mar 9 19:15:29 defiant kernel: [75211.545862] TCP: MD5 Hash mismatch for [2001:db8:1::2].35600->[2001:db8:1::1].12345 [S]L3 index 0
Mar 9 19:15:30 defiant kernel: [75212.569765] TCP: MD5 Hash mismatch for [2001:db8:1::2].35600->[2001:db8:1::1].12345 [S]L3 index 0
Mar 9 19:15:31 defiant kernel: [75213.593913] TCP: MD5 Hash mismatch for [2001:db8:1::2].35600->[2001:db8:1::1].12345 [S]L3 index 0
Mar 9 19:15:36 defiant kernel: [75218.580169] TCP: MD5 Hash mismatch for [2001:db8:1::2].35178->[2001:db8:1::1].12345 [S]L3 index 13
Mar 9 19:15:37 defiant kernel: [75219.609478] TCP: MD5 Hash mismatch for [2001:db8:1::2].35178->[2001:db8:1::1].12345 [S]L3 index 13
Mar 9 19:15:38 defiant kernel: [75220.633204] TCP: MD5 Hash mismatch for [2001:db8:1::2].35178->[2001:db8:1::1].12345 [S]L3 index 13
Mar 9 19:15:39 defiant kernel: [75221.657325] TCP: MD5 Hash mismatch for [2001:db8:1::2].35178->[2001:db8:1::1].12345 [S]L3 index 13
Mar 9 19:15:50 defiant kernel: [75232.724491] TCP: MD5 Hash mismatch for [2001:db8:1::2].53452->[2001:db8:1::1].12345 [S]L3 index 0
Mar 9 19:15:51 defiant kernel: [75233.752288] TCP: MD5 Hash mismatch for [2001:db8:1::2].53452->[2001:db8:1::1].12345 [S]L3 index 0
Mar 9 19:15:52 defiant kernel: [75234.780411] TCP: MD5 Hash mismatch for [2001:db8:1::2].53452->[2001:db8:1::1].12345 [S]L3 index 0
Mar 9 19:15:53 defiant kernel: [75235.804135] TCP: MD5 Hash mismatch for [2001:db8:1::2].53452->[2001:db8:1::1].12345 [S]L3 index 0
Mar 9 19:15:58 defiant kernel: [75240.777430] TCP: MD5 Hash mismatch for [2001:db8:1::2].48658->[2001:db8:1::1].12345 [S]L3 index 13
Mar 9 19:15:59 defiant kernel: [75241.783727] TCP: MD5 Hash mismatch for [2001:db8:1::2].48658->[2001:db8:1::1].12345 [S]L3 index 13
Mar 9 19:16:00 defiant kernel: [75242.807858] TCP: MD5 Hash mismatch for [2001:db8:1::2].48658->[2001:db8:1::1].12345 [S]L3 index 13
Mar 9 19:16:01 defiant kernel: [75243.831587] TCP: MD5 Hash mismatch for [2001:db8:1::2].48658->[2001:db8:1::1].12345 [S]L3 index 13
Hope this helps.
Best regards,
Mirsad Todorovac
This series fixes a bug in the complete phase of UDP in GRO, in which
socket lookup fails due to using network_header when parsing encapsulated
packets. The fix is to pass p_off parameter in *_gro_complete.
Next, the fields network_offset and inner_network_offset are added to
napi_gro_cb, and are both set during the receive phase of GRO. This is then
leveraged in the next commit to remove flush_id state from napi_gro_cb, and
stateful code in {ipv6,inet}_gro_receive which may be unnecessarily
complicated due to encapsulation support in GRO.
In addition, udpgro_fwd selftest is adjusted to include the socket lookup
case for vxlan. This selftest will test its supposed functionality once
local bind support is merged (https://lore.kernel.org/netdev/df300a49-7811-4126-a56a-a77100c8841b@gmail.c…).
v2 -> v3:
- Use napi_gro_cb instead of skb->{offset}
- v2:
https://lore.kernel.org/netdev/2ce1600b-e733-448b-91ac-9d0ae2b866a4@gmail.c…
v1 -> v2:
- Pass p_off in *_gro_complete to fix UDP bug
- Remove more conditionals and memory fetches from inet_gro_flush
- v1:
https://lore.kernel.org/netdev/e1d22505-c5f8-4c02-a997-64248480338b@gmail.c…
Richard Gobert (4):
net: gro: add p_off param in *_gro_complete
selftests/net: add local address bind in vxlan selftest
net: gro: add {inner_}network_offset to napi_gro_cb
net: gro: move L3 flush checks to tcp_gro_receive
drivers/net/geneve.c | 7 +-
drivers/net/vxlan/vxlan_core.c | 11 ++--
include/linux/etherdevice.h | 2 +-
include/linux/netdevice.h | 3 +-
include/linux/udp.h | 2 +-
include/net/gro.h | 36 +++++++----
include/net/inet_common.h | 2 +-
include/net/tcp.h | 6 +-
include/net/udp.h | 8 +--
include/net/udp_tunnel.h | 2 +-
net/8021q/vlan_core.c | 6 +-
net/core/gro.c | 6 +-
net/ethernet/eth.c | 5 +-
net/ipv4/af_inet.c | 49 ++------------
net/ipv4/fou_core.c | 9 +--
net/ipv4/gre_offload.c | 6 +-
net/ipv4/tcp_offload.c | 79 ++++++++++++++++++-----
net/ipv4/udp.c | 3 +-
net/ipv4/udp_offload.c | 26 ++++----
net/ipv6/ip6_offload.c | 41 +++++-------
net/ipv6/tcpv6_offload.c | 7 +-
net/ipv6/udp.c | 3 +-
net/ipv6/udp_offload.c | 13 ++--
tools/testing/selftests/net/udpgro_fwd.sh | 10 ++-
24 files changed, 187 insertions(+), 155 deletions(-)
--
2.36.1
Some unit tests intentionally trigger warning backtraces by passing bad
parameters to kernel API functions. Such unit tests typically check the
return value from such calls, not the existence of the warning backtrace.
Such intentionally generated warning backtraces are neither desirable
nor useful for a number of reasons.
- They can result in overlooked real problems.
- A warning that suddenly starts to show up in unit tests needs to be
investigated and has to be marked to be ignored, for example by
adjusting filter scripts. Such filters are ad-hoc because there is
no real standard format for warnings. On top of that, such filter
scripts would require constant maintenance.
One option to address problem would be to add messages such as "expected
warning backtraces start / end here" to the kernel log. However, that
would again require filter scripts, it might result in missing real
problematic warning backtraces triggered while the test is running, and
the irrelevant backtrace(s) would still clog the kernel log.
Solve the problem by providing a means to identify and suppress specific
warning backtraces while executing test code. Support suppressing multiple
backtraces while at the same time limiting changes to generic code to the
absolute minimum. Architecture specific changes are kept at minimum by
retaining function names only if both CONFIG_DEBUG_BUGVERBOSE and
CONFIG_KUNIT are enabled.
The first patch of the series introduces the necessary infrastructure.
The second patch marks the warning message in drm_calc_scale() in the DRM
subsystem as intentional where warranted. This patch is intended to serve
as an example for the use of the functionality introduced with this series.
The last three patches in the series introduce the necessary architecture
specific changes for x86, arm64, and loongarch.
This series is based on the RFC patch and subsequent discussion at
https://patchwork.kernel.org/project/linux-kselftest/patch/02546e59-1afe-4b…
and offers a more comprehensive solution of the problem discussed there.
Checkpatch note:
Remaining checkpatch errors and warnings were deliberately ignored.
Some are triggered by matching coding style or by comments interpreted
as code, others by assembler macros which are disliked by checkpatch.
Suggestions for improvements are welcome.
Some questions:
- Is the general approach promising ? If not, are there other possible
solutions ?
- Function pointers are only added to the __bug_table section if both
CONFIG_KUNIT and CONFIG_DEBUG_BUGVERBOSE are enabled. This avoids image
size increases if CONFIG_KUNIT=n. Downside is slightly more complex
architecture specific assembler code. If function pointers were always
added to the __bug_table section, vmlinux image size would increase by
approximately 0.6-0.7%. Is the increased complexity in assembler code
worth the reduced image size ? I think so, but I would like to hear
other opinions.
- There are additional possibilities associated with storing the bug
function name in the __bug_table section. It could be independent of
KUNIT, it could be a configuration flag, and/or it could be used to
display the name of the offending function in BUG/WARN messages.
Is any of those of interest ?
----------------------------------------------------------------
Guenter Roeck (5):
bug: Core support for suppressing warning backtraces
drm: Suppress intentional warning backtraces in scaling unit tests
x86: Add support for suppressing warning tracebacks
arm64: Add support for suppressing warning tracebacks
loongarch: Add support for suppressing warning tracebacks
arch/arm64/include/asm/asm-bug.h | 29 +++++++++++++-------
arch/arm64/include/asm/bug.h | 8 +++++-
arch/loongarch/include/asm/bug.h | 38 ++++++++++++++++++--------
arch/x86/include/asm/bug.h | 21 +++++++++++----
drivers/gpu/drm/tests/drm_rect_test.c | 6 +++++
include/asm-generic/bug.h | 16 ++++++++---
include/kunit/bug.h | 51 +++++++++++++++++++++++++++++++++++
include/linux/bug.h | 13 +++++++++
lib/bug.c | 51 ++++++++++++++++++++++++++++++++---
lib/kunit/Makefile | 6 +++--
lib/kunit/bug.c | 40 +++++++++++++++++++++++++++
11 files changed, 243 insertions(+), 36 deletions(-)
create mode 100644 include/kunit/bug.h
create mode 100644 lib/kunit/bug.c
This series fixes a bug in the complete phase of UDP in GRO, in which
socket lookup fails due to using network_header when parsing encapsulated
packets. The fix is to pass p_off parameter in *_gro_complete.
Next, inner_network_header is always set in the receive phase of GRO,
this is then leveraged in the next commit to remove some state from
napi_gro_cb, and stateful code in {ipv6,inet}_gro_receive which may be
unnecessarily complicated due to encapsulation support in GRO.
In addition, udpgro_fwd selftest is adjusted to include the socket lookup
case for vxlan. This selftest will test its supposed functionality once
local bind support is merged (https://lore.kernel.org/netdev/df300a49-7811-4126-a56a-a77100c8841b@gmail.c…).
v1 -> v2:
- Pass p_off in *_gro_complete to fix UDP bug
- Remove more conditionals and memory fetches from inet_gro_flush
- v1:
https://lore.kernel.org/netdev/e1d22505-c5f8-4c02-a997-64248480338b@gmail.c…
Richard Gobert (4):
net: gro: add p_off param in *_gro_complete
selftests/net: add local address bind in vxlan selftest
net: gro: set inner_network_header in receive phase
net: gro: move L3 flush checks to tcp_gro_receive
drivers/net/geneve.c | 7 +-
drivers/net/vxlan/vxlan_core.c | 11 ++--
include/linux/etherdevice.h | 2 +-
include/linux/netdevice.h | 3 +-
include/linux/udp.h | 2 +-
include/net/gro.h | 33 ++++++----
include/net/inet_common.h | 2 +-
include/net/tcp.h | 6 +-
include/net/udp.h | 8 +--
include/net/udp_tunnel.h | 2 +-
net/8021q/vlan_core.c | 9 ++-
net/core/gro.c | 5 +-
net/ethernet/eth.c | 5 +-
net/ipv4/af_inet.c | 53 ++-------------
net/ipv4/fou_core.c | 9 +--
net/ipv4/gre_offload.c | 6 +-
net/ipv4/tcp_offload.c | 80 ++++++++++++++++++-----
net/ipv4/udp.c | 3 +-
net/ipv4/udp_offload.c | 26 ++++----
net/ipv6/ip6_offload.c | 45 +++++--------
net/ipv6/tcpv6_offload.c | 7 +-
net/ipv6/udp.c | 3 +-
net/ipv6/udp_offload.c | 13 ++--
tools/testing/selftests/net/udpgro_fwd.sh | 10 ++-
24 files changed, 188 insertions(+), 162 deletions(-)
--
2.36.1