| bbbd531f | 05-Feb-2026 |
Felix Maurer <fmaurer@redhat.com> |
selftests: hsr: Add more link fault tests for HSR
Run the packet loss and reordering tests also for both HSR versions. Now they can be removed from the hsr_ping tests completely. The timeout needs t
selftests: hsr: Add more link fault tests for HSR
Run the packet loss and reordering tests also for both HSR versions. Now they can be removed from the hsr_ping tests completely. The timeout needs to be increased because there are 15 link fault test cases now, with each of them taking 5-6sec for the test and at most 5sec for the HSR node tables to get merged and we also want some room to make the test runs stable.
Signed-off-by: Felix Maurer <fmaurer@redhat.com> Reviewed-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Link: https://patch.msgid.link/eb6f667d3804ce63d86f0ee3fbc0e0ac9e1a209a.1770299429.git.fmaurer@redhat.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
show more ...
|
| 8908c3c8 | 05-Feb-2026 |
Felix Maurer <fmaurer@redhat.com> |
selftests: hsr: Add tests for more link faults with PRP
Add tests where one link has different rates of packet loss or reorders packets. PRP should still be able to recover from these link faults an
selftests: hsr: Add tests for more link faults with PRP
Add tests where one link has different rates of packet loss or reorders packets. PRP should still be able to recover from these link faults and show no packet loss. However, it is acceptable to receive some level of duplicate packets. This matches the current specification (IEC 62439-3:2021) of the duplicate discard algorithm that requires it to be "designed such that it never rejects a legitimate frame, while occasional acceptance of a duplicate can be tolerated." The rate of acceptable duplicates in this test is intentionally high (10%) to make the test stable, the values I observed in the worst test cases (20% loss) are around 5% duplicates.
The duplicates occur because of the 10ms ping interval in the test. As blocks expire after 400ms based on the timestamp of the first received sequence number in the block, every approx. 40th will lead to a new, clean block being used where the sequence number hasn't been seen before. As this occurs on both nodes in the test (for requests and replies), we observe around 20 duplicate frames.
Signed-off-by: Felix Maurer <fmaurer@redhat.com> Reviewed-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Link: https://patch.msgid.link/7b36506d3a80e53786fe56526cf6046c74dfeee1.1770299429.git.fmaurer@redhat.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
show more ...
|
| ca4a09a9 | 05-Feb-2026 |
Felix Maurer <fmaurer@redhat.com> |
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 func
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>
show more ...
|
| 776b64ba | 05-Feb-2026 |
Felix Maurer <fmaurer@redhat.com> |
selftests: hsr: Check duplicates on HSR with VLAN
Previously the hsr_ping test only checked that all nodes in a VLAN are reachable (using do_ping). Update the test to also check that there is no pac
selftests: hsr: Check duplicates on HSR with VLAN
Previously the hsr_ping test only checked that all nodes in a VLAN are reachable (using do_ping). Update the test to also check that there is no packet loss and no duplicate packets by running the same tests for VLANs as without VLANs (including using do_ping_long). This also adds tests for IPv6 over VLAN. To unify the test code, the topology without VLANs now uses IP addresses from dead:beef:0::/64 to align with the 100.64.0.0/24 range for IPv4. Error messages are updated across the board to make it easier to find what actually failed.
Also update the VLAN test to only run in VLAN 2, as there is no need to check if ping really works with VLAN IDs 2, 3, 4, and 5. This lowers the number of long ping tests on VLANs to keep the overall test runtime in bounds.
It's still necessary to bump the test timeout a bit, though: a ping long tests takes 1sec, do_ping_tests performs 12 of them, do_link_problem_tests 6, and the VLAN tests again 12. With some buffer for setup and waiting and for two protocol versions, 90sec timeout seems reasonable.
Signed-off-by: Felix Maurer <fmaurer@redhat.com> Reviewed-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Link: https://patch.msgid.link/e3ded0e2547b5f720524b62fabeb96debc579697.1770299429.git.fmaurer@redhat.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
show more ...
|
| ed20142e | 03-Jun-2024 |
Lukasz Majewski <lukma@denx.de> |
selftests: hsr: Extend the hsr_ping.sh test to use fixed MAC addresses
Fixed MAC addresses help with debugging as last four bytes identify the network namespace.
Signed-off-by: Lukasz Majewski <luk
selftests: hsr: Extend the hsr_ping.sh test to use fixed MAC addresses
Fixed MAC addresses help with debugging as last four bytes identify the network namespace.
Signed-off-by: Lukasz Majewski <lukma@denx.de> Link: https://lore.kernel.org/r/20240603093322.3150030-1-lukma@denx.de Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
| 542e645c | 23-Apr-2024 |
Lukasz Majewski <lukma@denx.de> |
test: hsr: Add test for HSR RedBOX (HSR-SAN) mode of operation
This patch adds hsr_redbox.sh script to test if HSR-SAN mode of operation works correctly.
Signed-off-by: Lukasz Majewski <lukma@denx.
test: hsr: Add test for HSR RedBOX (HSR-SAN) mode of operation
This patch adds hsr_redbox.sh script to test if HSR-SAN mode of operation works correctly.
Signed-off-by: Lukasz Majewski <lukma@denx.de> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
show more ...
|
| 40b90bf6 | 23-Apr-2024 |
Lukasz Majewski <lukma@denx.de> |
test: hsr: Extract version agnostic information from ping command output
Current code checks if ping command output match hardcoded pattern: "10 packets transmitted, 10 received, 0% packet loss,".
test: hsr: Extract version agnostic information from ping command output
Current code checks if ping command output match hardcoded pattern: "10 packets transmitted, 10 received, 0% packet loss,".
Such approach will work only from one ping program version (for which this test has been originally written). This patch address problem when ping with different summary output like "10 packets transmitted, 10 packets received, 0% packet" is used to run this test - for example one from busybox (as the test system runs in QEMU with rootfs created with buildroot).
The fix is to modify output of ping command to be agnostic to ping version used on the platform.
Signed-off-by: Lukasz Majewski <lukma@denx.de> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
show more ...
|
| 154a82cb | 23-Apr-2024 |
Lukasz Majewski <lukma@denx.de> |
test: hsr: Move common code to hsr_common.sh file
Some of the code already present in the hsr_ping.sh test program can be moved to a separate script file, so it can be reused by other HSR functional
test: hsr: Move common code to hsr_common.sh file
Some of the code already present in the hsr_ping.sh test program can be moved to a separate script file, so it can be reused by other HSR functionality (like HSR-SAN) tests.
Signed-off-by: Lukasz Majewski <lukma@denx.de> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
show more ...
|
| b0e9c3b5 | 15-Sep-2023 |
Sebastian Andrzej Siewior <bigeasy@linutronix.de> |
selftests: hsr: Extend the testsuite to also cover HSRv1.
The testsuite already has simply tests for HSRv0. The testuite would have been able to notice the v1 breakage if it was there at the time.
selftests: hsr: Extend the testsuite to also cover HSRv1.
The testsuite already has simply tests for HSRv0. The testuite would have been able to notice the v1 breakage if it was there at the time.
Extend the testsuite to also cover HSRv1.
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
| d53f23fe | 15-Sep-2023 |
Sebastian Andrzej Siewior <bigeasy@linutronix.de> |
selftests: hsr: Reorder the testsuite.
Move the code and group into functions so it will be easier to extend the test to HSRv1 so that both versions are covered.
Move the ping/test part into do_com
selftests: hsr: Reorder the testsuite.
Move the code and group into functions so it will be easier to extend the test to HSRv1 so that both versions are covered.
Move the ping/test part into do_complete_ping_test() and the interface setup into setup_hsr_interfaces().
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|