[PATCH 17/17] test/py: add a ping6 test

Viacheslav Mitrofanov v.v.mitrofanov at yadro.com
Tue Aug 30 14:31:04 CEST 2022


Add a simple ICMPv6 echo request test

Signed-off-by: Viacheslav Mitrofanov <v.v.mitrofanov at yadro.com>
---
 test/py/tests/test_net.py | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/test/py/tests/test_net.py b/test/py/tests/test_net.py
index 9ca6743afd..bd3d60774b 100644
--- a/test/py/tests/test_net.py
+++ b/test/py/tests/test_net.py
@@ -126,6 +126,21 @@ def test_net_ping(u_boot_console):
     output = u_boot_console.run_command('ping $serverip')
     assert 'is alive' in output
 
+ at pytest.mark.buildconfigspec('cmd_ping6')
+def test_net_ping6(u_boot_console):
+    """Test the ping6 command.
+
+    The $serverip6 (as set up by test_net_setup_static) is pinged.
+    The test validates that the host is alive, as reported by the
+    ping6 command's output.
+    """
+
+    if not net_set_up:
+        pytest.skip('Network not initialized')
+
+    output = u_boot_console.run_command('ping6 $serverip6')
+    assert 'is alive' in output
+
 @pytest.mark.buildconfigspec('cmd_net')
 def test_net_tftpboot(u_boot_console):
     """Test the tftpboot command.
-- 
2.25.1



More information about the U-Boot mailing list