From e90167b993124e3131bf0100cd58ee1657e3410f Mon Sep 17 00:00:00 2001 From: MrKevinWeiss Date: Tue, 17 Oct 2023 14:27:31 +0200 Subject: [PATCH] spec04: task4/5 use openmote-b Since the lille firefly boards seem to be down, we need to switch to something available --- 04-single-hop-6lowpan-icmp/test_spec04.py | 12 ++++++------ testutils/shell.py | 10 ++++++++-- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/04-single-hop-6lowpan-icmp/test_spec04.py b/04-single-hop-6lowpan-icmp/test_spec04.py index 4950fd1..2f065cf 100644 --- a/04-single-hop-6lowpan-icmp/test_spec04.py +++ b/04-single-hop-6lowpan-icmp/test_spec04.py @@ -123,7 +123,7 @@ def test_task04(riot_ctrl): # nodes and iotlab_site passed to riot_ctrl fixture @pytest.mark.parametrize( 'nodes, iotlab_site', - [pytest.param(['samr21-xpro', 'firefly'], "lille")], + [pytest.param(['iotlab-m3', 'openmote-b'], "strasbourg")], indirect=['nodes', 'iotlab_site'], ) def test_task05(riot_ctrl): @@ -138,9 +138,9 @@ def test_task05(riot_ctrl): # pylint: disable=C0301 "https://github.com/RIOT-OS/Release-Specs/pull/198#issuecomment-756756109" # noqa: E501 ) - pinged_netif, _ = lladdr(pinged.ifconfig_list()) + pinged_netif, _ = lladdr(pinged.ifconfig_list(), ignore_chan_0=True) pinged.ifconfig_set(pinged_netif, "channel", 17) - pinger_netif, _ = lladdr(pinger.ifconfig_list()) + pinger_netif, _ = lladdr(pinger.ifconfig_list(), ignore_chan_0=True) pinger.ifconfig_set(pinger_netif, "channel", 17) res = ping6(pinger, "ff02::1", count=1000, interval=100, packet_size=50) @@ -154,7 +154,7 @@ def test_task05(riot_ctrl): # nodes and iotlab_site passed to riot_ctrl fixture @pytest.mark.parametrize( 'nodes, iotlab_site', - [pytest.param(['samr21-xpro', 'firefly'], "lille")], + [pytest.param(['iotlab-m3', 'openmote-b'], "strasbourg")], indirect=['nodes', 'iotlab_site'], ) def test_task06(riot_ctrl): @@ -169,10 +169,10 @@ def test_task06(riot_ctrl): # pylint: disable=C0301 "https://github.com/RIOT-OS/Release-Specs/pull/198#issuecomment-758522278" # noqa: E501 ) - pinged_netif, pinged_addr = lladdr(pinged.ifconfig_list()) + pinged_netif, pinged_addr = lladdr(pinged.ifconfig_list(), ignore_chan_0=True) pinged.ifconfig_set(pinged_netif, "channel", 26) assert pinged_addr.startswith("fe80::") - pinger_netif, _ = lladdr(pinger.ifconfig_list()) + pinger_netif, _ = lladdr(pinger.ifconfig_list(), ignore_chan_0=True) pinger.ifconfig_set(pinger_netif, "channel", 26) res = ping6(pinger, pinged_addr, count=1000, interval=100, packet_size=100) diff --git a/testutils/shell.py b/testutils/shell.py index da39e1b..0aaeee7 100644 --- a/testutils/shell.py +++ b/testutils/shell.py @@ -203,13 +203,19 @@ def first_netif_and_addr_by_scope(ifconfig_out, scope, ignore_chan_0=False): if not ignore_chan_0 or netif.get("channel", -1) != 0: return ( key, - [addr["addr"] for addr in netif["ipv6_addrs"] if addr["scope"] == scope][0], + [ + addr["addr"] + for addr in netif["ipv6_addrs"] + if addr["scope"] == scope + ][0], ) raise RuntimeError(f"For valid netifs found in {netifs}") def lladdr(ifconfig_out, ignore_chan_0=False): - return first_netif_and_addr_by_scope(ifconfig_out, "link", ignore_chan_0=ignore_chan_0) + return first_netif_and_addr_by_scope( + ifconfig_out, "link", ignore_chan_0=ignore_chan_0 + ) def global_addr(ifconfig_out):