RIOT icon indicating copy to clipboard operation
RIOT copied to clipboard

tests/sock_udp_rx_tx: add test for sending while receiving

Open benpicco opened this issue 3 years ago • 2 comments

Contribution description

Testing procedure

on native

  • Create two tap bridges:
sudo dist/tools/tapsetup/tapsetup -b tapbr_a -t tap_a
sudo dist/tools/tapsetup/tapsetup -b tapbr_b -t tap_b

Start two native instances

make -C tests/sock_udp_rx_tx PORT="tap_a0 tap_b0" all term
make -C tests/sock_udp_rx_tx PORT="tap_a1 tap_b1" all term

on Hardware

You need two boards with two additional UART lines:

  • connect RX of UART1 on the first board to TX of UART2 on the second board
  • connect TX of UART1 on the first board to RX of UART2 on the second board
  • connect RX of UART2 on the first board to TX of UART1 on the second board
  • connect TX of UART2 on the first board to RX of UART1 on the second board

Now type start on any of the boards to start sending. pktbuf will be exhausted very quickly and won't recover after typing stop (test with e.g. ping -s 512 ff02::1)

2022-05-29 17:27:53,236 # ping -s 512 ff02::1
2022-05-29 17:27:53,256 # 520 bytes from fe80::6c1d:acfe:140c:41c7%5: icmp_seq=0 ttl=64 time=13.105 ms
2022-05-29 17:27:53,264 # 520 bytes from fe80::6c1d:acfe:140c:41c6%4: icmp_seq=0 ttl=64 time=20.165 ms (DUP!)
2022-05-29 17:27:54,256 # 520 bytes from fe80::6c1d:acfe:140c:41c7%5: icmp_seq=1 ttl=64 time=13.101 ms
2022-05-29 17:27:54,264 # 520 bytes from fe80::6c1d:acfe:140c:41c6%4: icmp_seq=1 ttl=64 time=20.160 ms (DUP!)
2022-05-29 17:27:55,256 # 520 bytes from fe80::6c1d:acfe:140c:41c7%5: icmp_seq=2 ttl=64 time=13.104 ms
2022-05-29 17:27:55,257 # 
2022-05-29 17:27:55,259 # --- ff02::1 PING statistics ---
2022-05-29 17:27:55,266 # 3 packets transmitted, 3 packets received, 2 duplicates, 0% packet loss
2022-05-29 17:27:55,270 # round-trip min/avg/max = 13.101/15.927/20.165 ms
2022-05-29 17:27:59,211 # > start
2022-05-29 17:27:59,276 # tx error: -12
2022-05-29 17:27:59,289 # tx error: -12
2022-05-29 17:27:59,302 # tx error: -12
2022-05-29 17:27:59,311 # tx error: -12
…

2022-05-29 17:28:00,226 # > stop
2022-05-29 17:28:03,276 # > ping -s 512 ff02::1
2022-05-29 17:28:03,278 # error: packet buffer full
2022-05-29 17:28:04,278 # error: packet buffer full
2022-05-29 17:28:05,278 # error: packet buffer full
2022-05-29 17:28:06,276 # 
2022-05-29 17:28:06,279 # --- ff02::1 PING statistics ---
2022-05-29 17:28:06,284 # 3 packets transmitted, 0 packets received, 100% packet loss

Issues/PRs references

triggers #17924

benpicco avatar May 29 '22 15:05 benpicco

Could you add the PR setup description to the test README?

fjmolinas avatar May 31 '22 14:05 fjmolinas

Status?

Teufelchen1 avatar Jan 30 '24 18:01 Teufelchen1