From 5309a7aa976a1dd5c1a6a99736ea0f6ccdc0ead4 Mon Sep 17 00:00:00 2001 From: Viacheslav Mitrofanov Date: Thu, 8 Sep 2022 14:59:05 +0300 Subject: test/py: add a ping6 test Add a simple ICMPv6 echo request test Signed-off-by: Viacheslav Mitrofanov Reviewed-by: Simon Glass --- 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 9ca6743..bd3d607 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 +@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. -- cgit v1.1