tests/gnrc_netif: check if if_pid is set correctly in header
Previously this was not tested and excepted KERNEL_PID_UNDEF == 0 as legal value for received `gnrc_netif_hdr`s (which except for the loopback interface is wrong)
This commit is contained in:
parent
006f10c2af
commit
b8b1e4c0fb
@ -81,7 +81,8 @@ def testfunc(child):
|
||||
child.expect("PKTDUMP: data received:")
|
||||
child.expect(r"~~ SNIP 0 - size: 0 byte, type: NETTYPE_UNDEF \(0\)")
|
||||
child.expect(r"00000000~~ SNIP 1 - size: \d+ byte, type: NETTYPE_NETIF \(-1\)")
|
||||
child.expect(r"if_pid: \d+ rssi: -?\d+ lqi: \d+")
|
||||
child.expect(r"if_pid: (\d+) rssi: -?\d+ lqi: \d+")
|
||||
assert 0 < int(child.match.group(1))
|
||||
child.expect("flags: 0x0")
|
||||
child.expect("src_l2addr: 3E:E6:B5:22:FD:0B")
|
||||
child.expect("dst_l2addr: 3E:E6:B5:22:FD:0A")
|
||||
@ -91,7 +92,8 @@ def testfunc(child):
|
||||
child.expect("PKTDUMP: data received:")
|
||||
child.expect(r"~~ SNIP 0 - size: 0 byte, type: NETTYPE_UNDEF \(0\)")
|
||||
child.expect(r"00000000~~ SNIP 1 - size: \d+ byte, type: NETTYPE_NETIF \(-1\)")
|
||||
child.expect(r"if_pid: \d+ rssi: -?\d+ lqi: \d+")
|
||||
child.expect(r"if_pid: (\d+) rssi: -?\d+ lqi: \d+")
|
||||
assert 0 < int(child.match.group(1))
|
||||
child.expect("flags: 0x0")
|
||||
child.expect("src_l2addr: 3E:E6:B5:0F:19:22:FD:0B")
|
||||
child.expect("dst_l2addr: 3E:E6:B5:0F:19:22:FD:0A")
|
||||
@ -102,7 +104,8 @@ def testfunc(child):
|
||||
child.expect(r"~~ SNIP 0 - size: 4 byte, type: NETTYPE_UNDEF \(0\)")
|
||||
child.expect("00000000 12 34 45 56")
|
||||
child.expect(r"~~ SNIP 1 - size: \d+ byte, type: NETTYPE_NETIF \(-1\)")
|
||||
child.expect(r"if_pid: \d+ rssi: -?\d+ lqi: \d+")
|
||||
child.expect(r"if_pid: (\d+) rssi: -?\d+ lqi: \d+")
|
||||
assert 0 < int(child.match.group(1))
|
||||
child.expect("flags: 0x0")
|
||||
child.expect("src_l2addr: 3E:E6:B5:22:FD:0B")
|
||||
child.expect("dst_l2addr: 3E:E6:B5:22:FD:0A")
|
||||
@ -113,7 +116,8 @@ def testfunc(child):
|
||||
child.expect(r"~~ SNIP 0 - size: 4 byte, type: NETTYPE_UNDEF \(0\)")
|
||||
child.expect("00000000 12 34 45 56")
|
||||
child.expect(r"~~ SNIP 1 - size: \d+ byte, type: NETTYPE_NETIF \(-1\)")
|
||||
child.expect(r"if_pid: \d+ rssi: -?\d+ lqi: \d+")
|
||||
child.expect(r"if_pid: (\d+) rssi: -?\d+ lqi: \d+")
|
||||
assert 0 < int(child.match.group(1))
|
||||
child.expect("flags: 0x0")
|
||||
child.expect("src_l2addr: 3E:E6:B5:0F:19:22:FD:0B")
|
||||
child.expect("dst_l2addr: 3E:E6:B5:0F:19:22:FD:0A")
|
||||
@ -130,7 +134,8 @@ def testfunc(child):
|
||||
child.expect("source address: fe80::3fe6:b5ff:fe22:fd0a")
|
||||
child.expect("destination address: fe80::3fe6:b5ff:fe22:fd0b")
|
||||
child.expect(r"~~ SNIP 1 - size: \d+ byte, type: NETTYPE_NETIF \(-1\)")
|
||||
child.expect(r"if_pid: \d+ rssi: -?\d+ lqi: \d+")
|
||||
child.expect(r"if_pid: (\d+) rssi: -?\d+ lqi: \d+")
|
||||
assert 0 < int(child.match.group(1))
|
||||
child.expect("flags: 0x0")
|
||||
child.expect("src_l2addr: 3E:E6:B5:22:FD:0B")
|
||||
child.expect("dst_l2addr: 3E:E6:B5:22:FD:0A")
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user