]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
selftests: hsr: Add tests for faulty links
authorFelix Maurer <fmaurer@redhat.com>
Thu, 5 Feb 2026 13:57:30 +0000 (14:57 +0100)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 10 Feb 2026 11:02:28 +0000 (12:02 +0100)
commitca4a09a950d27909a16cebe512544bb01b8ce2e5
tree22c2fd6f1b37dfe00412ce91a78705907b6e0589
parent776b64ba12e7e2be393b3df07979c825fed47931
selftests: hsr: Add tests for faulty links

Add a test case that can support different types of faulty links for all
protocol versions (HSRv0, HSRv1, PRPv1). It starts with a baseline with
fully functional links. The first faulty case is one link being cut during
the ping. This test uses a different function for ping that sends more
packets in shorter intervals to stress the duplicate detection algorithms a
bit more and allow for future tests with other link faults (packet loss,
reordering, etc.).

As the link fault tests now cover the cut link for HSR and PRP, it can be
removed from the hsr_ping test. Note that the removed cut link test did not
really test the fault because do_ping_long takes about 1sec while the link
is only cut after a 3sec sleep.

Signed-off-by: Felix Maurer <fmaurer@redhat.com>
Reviewed-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Link: https://patch.msgid.link/dad52276e2c349ecb96168bef7e3001bf7becc81.1770299429.git.fmaurer@redhat.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
tools/testing/selftests/net/hsr/Makefile
tools/testing/selftests/net/hsr/hsr_ping.sh
tools/testing/selftests/net/hsr/link_faults.sh [new file with mode: 0755]