core/mbox: add mbox_size(), mbox_avail()#15478
Conversation
|
RIOT/pkg/lwip/include/arch/sys_arch.h Lines 101 to 104 in 63af227 RIOT/pkg/lwip/include/arch/sys_arch.h Line 109 in 63af227 |
+1. One at a time? |
miri64
left a comment
There was a problem hiding this comment.
ACK, introducting wrapper functions for those functionality makes sense, makes the code more readable, and is simple enough. Tested on native and iotlab-m3:
native
$ for test in tests/gnrc_sock_{async_event,ip,udp,neterr}; do RIOT_CI_BUILD=1 make -C ${test} -j clean flash test || break; done
make: Entering directory '/home/mlenders/Repositories/RIOT-OS/RIOT/tests/gnrc_sock_async_event'
Building application "tests_gnrc_sock_async_event" for "native" with MCU "native".
/usr/bin/ld: /home/mlenders/Repositories/RIOT-OS/RIOT/tests/gnrc_sock_async_event/bin/native/cpu/tramp.o: warning: relocation against `_native_saved_eip' in read-only section `.text'
/usr/bin/ld: warning: creating DT_TEXTREL in a PIE
text data bss dec hex filename
75842 620 71172 147634 240b2 /home/mlenders/Repositories/RIOT-OS/RIOT/tests/gnrc_sock_async_event/bin/native/tests_gnrc_sock_async_event.elf
true
r
/home/mlenders/Repositories/RIOT-OS/RIOT/tests/gnrc_sock_async_event/bin/native/tests_gnrc_sock_async_event.elf
RIOT native interrupts/signals initialized.
LED_RED_OFF
LED_GREEN_ON
RIOT native board initialized.
RIOT native hardware initialization complete.
Help: Press s to start test, r to print it is ready
READY
s
START
main(): This is RIOT! (Version: buildtest)
PKTDUMP: data to send:
~~ SNIP 0 - size: 40 byte, type: NETTYPE_UNDEF (0)
00000000 60 00 00 00 C8 07 11 00 00 00 00 00 00 00 00 00
00000010 00 00 00 00 00 00 00 00 FE 80 00 00 00 00 00 00
00000020 00 00 00 00 00 00 00 02
~~ SNIP 1 - size: 8 byte, type: NETTYPE_TEST (2)
00000000 01 23 45 67 89 AB CD EF
~~ PKT - 2 snips, total size: 48 byte
UDP event triggered: 0030
Received UDP packet from [fe80::2]:38663:
00000000 01 23 45 67 89 AB CD EF
UDP message successfully sent
IP event triggered: 0030
Received IP packet from [fe80::2]:
00000000 01 23 45 67 89 AB CD EF
IP message successfully sent
make: Leaving directory '/home/mlenders/Repositories/RIOT-OS/RIOT/tests/gnrc_sock_async_event'
make: Entering directory '/home/mlenders/Repositories/RIOT-OS/RIOT/tests/gnrc_sock_ip'
Building application "tests_gnrc_sock_ip" for "native" with MCU "native".
/usr/bin/ld: /home/mlenders/Repositories/RIOT-OS/RIOT/tests/gnrc_sock_ip/bin/native/cpu/tramp.o: warning: relocation against `_native_saved_eip' in read-only section `.text'
/usr/bin/ld: warning: creating DT_TEXTREL in a PIE
text data bss dec hex filename
147028 684 59532 207244 3298c /home/mlenders/Repositories/RIOT-OS/RIOT/tests/gnrc_sock_ip/bin/native/tests_gnrc_sock_ip.elf
true
r
/home/mlenders/Repositories/RIOT-OS/RIOT/tests/gnrc_sock_ip/bin/native/tests_gnrc_sock_ip.elf
RIOT native interrupts/signals initialized.
LED_RED_OFF
LED_GREEN_ON
RIOT native board initialized.
RIOT native hardware initialization complete.
Help: Press s to start test, r to print it is ready
READY
s
START
main(): This is RIOT! (Version: buildtest)
Calling test_sock_ip_create__EAFNOSUPPORT()
Calling test_sock_ip_create__EINVAL_addr()
Calling test_sock_ip_create__EINVAL_netif()
Calling test_sock_ip_create__no_endpoints()
Calling test_sock_ip_create__only_local()
Calling test_sock_ip_create__only_local_reuse_ep()
Calling test_sock_ip_create__only_remote()
Calling test_sock_ip_create__full()
Calling test_sock_ip_recv__EADDRNOTAVAIL()
Calling test_sock_ip_recv__EAGAIN()
Calling test_sock_ip_recv__ENOBUFS()
Calling test_sock_ip_recv__EPROTO()
Calling test_sock_ip_recv__ETIMEDOUT()
* Calling sock_ip_recv()
* (timed out with timeout 1000000)
Calling test_sock_ip_recv__socketed()
Calling test_sock_ip_recv__socketed_with_remote()
Calling test_sock_ip_recv__unsocketed()
Calling test_sock_ip_recv__unsocketed_with_remote()
Calling test_sock_ip_recv__with_timeout()
Calling test_sock_ip_recv__non_blocking()
Calling test_sock_ip_recv_buf__success()
Calling test_sock_ip_send__EAFNOSUPPORT_INET()
Calling test_sock_ip_send__EAFNOSUPPORT_UNSPEC()
Calling test_sock_ip_send__EINVAL_addr()
Calling test_sock_ip_send__EINVAL_netif()
Calling test_sock_ip_send__ENOTCONN()
Calling test_sock_ip_send__socketed_no_local_no_netif()
Calling test_sock_ip_send__socketed_no_netif()
Calling test_sock_ip_send__socketed_no_local()
Calling test_sock_ip_send__socketed()
Calling test_sock_ip_send__socketed_other_remote()
Calling test_sock_ip_send__unsocketed_no_local_no_netif()
Calling test_sock_ip_send__unsocketed_no_netif()
Calling test_sock_ip_send__unsocketed_no_local()
Calling test_sock_ip_send__unsocketed()
Calling test_sock_ip_send__no_sock_no_netif()
Calling test_sock_ip_send__no_sock()
ALL TESTS SUCCESSFUL
make: Leaving directory '/home/mlenders/Repositories/RIOT-OS/RIOT/tests/gnrc_sock_ip'
make: Entering directory '/home/mlenders/Repositories/RIOT-OS/RIOT/tests/gnrc_sock_udp'
Building application "tests_gnrc_sock_udp" for "native" with MCU "native".
/usr/bin/ld: /home/mlenders/Repositories/RIOT-OS/RIOT/tests/gnrc_sock_udp/bin/native/cpu/tramp.o: warning: relocation against `_native_saved_eip' in read-only section `.text'
/usr/bin/ld: warning: creating DT_TEXTREL in a PIE
text data bss dec hex filename
154240 716 67756 222712 365f8 /home/mlenders/Repositories/RIOT-OS/RIOT/tests/gnrc_sock_udp/bin/native/tests_gnrc_sock_udp.elf
true
r
/home/mlenders/Repositories/RIOT-OS/RIOT/tests/gnrc_sock_udp/bin/native/tests_gnrc_sock_udp.elf
RIOT native interrupts/signals initialized.
LED_RED_OFF
LED_GREEN_ON
RIOT native board initialized.
RIOT native hardware initialization complete.
Help: Press s to start test, r to print it is ready
READY
s
START
main(): This is RIOT! (Version: buildtest)
Calling test_sock_udp_create__EADDRINUSE()
Calling test_sock_udp_create__EAFNOSUPPORT()
Calling test_sock_udp_create__EINVAL_addr()
Calling test_sock_udp_create__EINVAL_netif()
Calling test_sock_udp_create__no_endpoints()
Calling test_sock_udp_create__only_local()
Calling test_sock_udp_create__only_local_port0()
Calling test_sock_udp_create__only_local_reuse_ep()
Calling test_sock_udp_create__only_remote()
Calling test_sock_udp_create__full()
Calling test_sock_udp_recv__EADDRNOTAVAIL()
Calling test_sock_udp_recv__EAGAIN()
Calling test_sock_udp_recv__ENOBUFS()
Calling test_sock_udp_recv__EPROTO()
Calling test_sock_udp_recv__ETIMEDOUT()
* Calling sock_udp_recv()
* (timed out with timeout 1000000)
Calling test_sock_udp_recv__socketed()
Calling test_sock_udp_recv__socketed_with_remote()
Calling test_sock_udp_recv__socketed_with_port0()
Calling test_sock_udp_recv__unsocketed()
Calling test_sock_udp_recv__unsocketed_with_remote()
Calling test_sock_udp_recv__with_timeout()
Calling test_sock_udp_recv__non_blocking()
Calling test_sock_udp_recv_buf__success()
Calling test_sock_udp_send__EAFNOSUPPORT()
Calling test_sock_udp_send__EINVAL_addr()
Calling test_sock_udp_send__EINVAL_netif()
Calling test_sock_udp_send__EINVAL_port()
Calling test_sock_udp_send__ENOTCONN()
Calling test_sock_udp_send__socketed_no_local_no_netif()
Calling test_sock_udp_send__socketed_no_netif()
Calling test_sock_udp_send__socketed_no_local()
Calling test_sock_udp_send__socketed()
Calling test_sock_udp_send__socketed_other_remote()
Calling test_sock_udp_send__unsocketed_no_local_no_netif()
Calling test_sock_udp_send__unsocketed_no_netif()
Calling test_sock_udp_send__unsocketed_no_local()
Calling test_sock_udp_send__unsocketed()
Calling test_sock_udp_send__no_sock_no_netif()
Calling test_sock_udp_send__no_sock()
ALL TESTS SUCCESSFUL
make: Leaving directory '/home/mlenders/Repositories/RIOT-OS/RIOT/tests/gnrc_sock_udp'
make: Entering directory '/home/mlenders/Repositories/RIOT-OS/RIOT/tests/gnrc_sock_neterr'
Building application "tests_gnrc_sock_neterr" for "native" with MCU "native".
/usr/bin/ld: /home/mlenders/Repositories/RIOT-OS/RIOT/tests/gnrc_sock_neterr/bin/native/cpu/tramp.o: warning: relocation against `_native_saved_eip' in read-only section `.text'
/usr/bin/ld: warning: creating DT_TEXTREL in a PIE
text data bss dec hex filename
127372 612 67468 195452 2fb7c /home/mlenders/Repositories/RIOT-OS/RIOT/tests/gnrc_sock_neterr/bin/native/tests_gnrc_sock_neterr.elf
true
r
/home/mlenders/Repositories/RIOT-OS/RIOT/tests/gnrc_sock_neterr/bin/native/tests_gnrc_sock_neterr.elf
RIOT native interrupts/signals initialized.
LED_RED_OFF
LED_GREEN_ON
RIOT native board initialized.
RIOT native hardware initialization complete.
Help: Press s to start test, r to print it is ready
READY
s
START
main(): This is RIOT! (Version: buildtest)
SUCCESS: error code EHOSTUNREACH (113 == 113)
SUCCESS: error code ENETUNREACH (101 == 101)
make: Leaving directory '/home/mlenders/Repositories/RIOT-OS/RIOT/tests/gnrc_sock_neterr'iotlab-m3
$ for test in tests/gnrc_sock_{async_event,ip,udp,neterr}; do RIOT_CI_BUILD=1 BOARD=iotlab-m3 make -C ${test} -j clean flash test || break; done
make: Entering directory '/home/mlenders/Repositories/RIOT-OS/RIOT/tests/gnrc_sock_async_event'
Building application "tests_gnrc_sock_async_event" for "iotlab-m3" with MCU "stm32".
text data bss dec hex filename
20260 132 5828 26220 666c /home/mlenders/Repositories/RIOT-OS/RIOT/tests/gnrc_sock_async_event/bin/iotlab-m3/tests_gnrc_sock_async_event.elf
/home/mlenders/Repositories/RIOT-OS/RIOT/dist/tools/openocd/openocd.sh flash /home/mlenders/Repositories/RIOT-OS/RIOT/tests/gnrc_sock_async_event/bin/iotlab-m3/tests_gnrc_sock_async_event.elf
### Flashing Target ###
Open On-Chip Debugger 0.10.0+dev-01089-g3bfe49266 (2020-02-26-14:18)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
jtag
Warn : Interface already configured, ignoring
trst_and_srst separate srst_nogate trst_push_pull srst_open_drain connect_assert_srst
Info : clock speed 1000 kHz
Info : JTAG tap: stm32f1x.cpu tap/device found: 0x3ba00477 (mfg: 0x23b (ARM Ltd.), part: 0xba00, ver: 0x3)
Info : JTAG tap: stm32f1x.bs tap/device found: 0x06414041 (mfg: 0x020 (STMicroelectronics), part: 0x6414, ver: 0x0)
Info : stm32f1x.cpu: hardware has 6 breakpoints, 4 watchpoints
Info : stm32f1x.cpu: external reset detected
Info : Listening on port 36575 for gdb connections
TargetName Type Endian TapName State
-- ------------------ ---------- ------ ------------------ ------------
0* stm32f1x.cpu cortex_m little stm32f1x.cpu reset
Info : JTAG tap: stm32f1x.cpu tap/device found: 0x3ba00477 (mfg: 0x23b (ARM Ltd.), part: 0xba00, ver: 0x3)
Info : JTAG tap: stm32f1x.bs tap/device found: 0x06414041 (mfg: 0x020 (STMicroelectronics), part: 0x6414, ver: 0x0)
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x0800078c msp: 0x20000200
Info : device id = 0x10016414
Info : flash size = 512kbytes
auto erase enabled
wrote 20480 bytes from file /home/mlenders/Repositories/RIOT-OS/RIOT/tests/gnrc_sock_async_event/bin/iotlab-m3/tests_gnrc_sock_async_event.elf in 0.889615s (22.482 KiB/s)
verified 20392 bytes in 0.321688s (61.905 KiB/s)
Info : JTAG tap: stm32f1x.cpu tap/device found: 0x3ba00477 (mfg: 0x23b (ARM Ltd.), part: 0xba00, ver: 0x3)
Info : JTAG tap: stm32f1x.bs tap/device found: 0x06414041 (mfg: 0x020 (STMicroelectronics), part: 0x6414, ver: 0x0)
shutdown command invoked
Done flashing
r
/home/mlenders/Repositories/RIOT-OS/RIOT/dist/tools/pyterm/pyterm -p "/dev/ttyUSB1" -b "500000" --no-reconnect --noprefix --no-repeat-command-on-empty-line
Twisted not available, please install it if you want to use pyterm's JSON capabilities
Connect to serial port /dev/ttyUSB1
Welcome to pyterm!
Type '/exit' to exit.
READY
s
START
main(): This is RIOT! (Version: buildtest)
PKTDUMP: data to send:
~~ SNIP 0 - size: 40 byte, type: NETTYPE_UNDEF (0)
00000000 60 00 00 00 90 00 11 00 00 00 00 00 00 00 00 00
00000010 00 00 00 00 00 00 00 00 FE 80 00 00 00 00 00 00
00000020 00 00 00 00 00 00 00 02
~~ SNIP 1 - size: 8 byte, type: NETTYPE_TEST (2)
00000000 01 23 45 67 89 AB CD EF
~~ PKT - 2 snips, total size: 48 byte
UDP event triggered: 0030
Received UDP packet from [fe80::2]:38663:
00000000 01 23 45 67 89 AB CD EF
UDP message successfully sent
IP event triggered: 0030
Received IP packet from [fe80::2]:
00000000 01 23 45 67 89 AB CD EF
IP message successfully sent
make: Leaving directory '/home/mlenders/Repositories/RIOT-OS/RIOT/tests/gnrc_sock_async_event'
make: Entering directory '/home/mlenders/Repositories/RIOT-OS/RIOT/tests/gnrc_sock_ip'
Building application "tests_gnrc_sock_ip" for "iotlab-m3" with MCU "stm32".
text data bss dec hex filename
39120 132 4972 44224 acc0 /home/mlenders/Repositories/RIOT-OS/RIOT/tests/gnrc_sock_ip/bin/iotlab-m3/tests_gnrc_sock_ip.elf
/home/mlenders/Repositories/RIOT-OS/RIOT/dist/tools/openocd/openocd.sh flash /home/mlenders/Repositories/RIOT-OS/RIOT/tests/gnrc_sock_ip/bin/iotlab-m3/tests_gnrc_sock_ip.elf
### Flashing Target ###
Open On-Chip Debugger 0.10.0+dev-01089-g3bfe49266 (2020-02-26-14:18)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
jtag
Warn : Interface already configured, ignoring
trst_and_srst separate srst_nogate trst_push_pull srst_open_drain connect_assert_srst
Info : clock speed 1000 kHz
Info : JTAG tap: stm32f1x.cpu tap/device found: 0x3ba00477 (mfg: 0x23b (ARM Ltd.), part: 0xba00, ver: 0x3)
Info : JTAG tap: stm32f1x.bs tap/device found: 0x06414041 (mfg: 0x020 (STMicroelectronics), part: 0x6414, ver: 0x0)
Info : stm32f1x.cpu: hardware has 6 breakpoints, 4 watchpoints
Info : stm32f1x.cpu: external reset detected
Info : Listening on port 34861 for gdb connections
TargetName Type Endian TapName State
-- ------------------ ---------- ------ ------------------ ------------
0* stm32f1x.cpu cortex_m little stm32f1x.cpu reset
Info : JTAG tap: stm32f1x.cpu tap/device found: 0x3ba00477 (mfg: 0x23b (ARM Ltd.), part: 0xba00, ver: 0x3)
Info : JTAG tap: stm32f1x.bs tap/device found: 0x06414041 (mfg: 0x020 (STMicroelectronics), part: 0x6414, ver: 0x0)
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x08000f50 msp: 0x20000200
Info : device id = 0x10016414
Info : flash size = 512kbytes
auto erase enabled
wrote 40960 bytes from file /home/mlenders/Repositories/RIOT-OS/RIOT/tests/gnrc_sock_ip/bin/iotlab-m3/tests_gnrc_sock_ip.elf in 1.732375s (23.090 KiB/s)
verified 39252 bytes in 0.591546s (64.800 KiB/s)
Info : JTAG tap: stm32f1x.cpu tap/device found: 0x3ba00477 (mfg: 0x23b (ARM Ltd.), part: 0xba00, ver: 0x3)
Info : JTAG tap: stm32f1x.bs tap/device found: 0x06414041 (mfg: 0x020 (STMicroelectronics), part: 0x6414, ver: 0x0)
shutdown command invoked
Done flashing
r
/home/mlenders/Repositories/RIOT-OS/RIOT/dist/tools/pyterm/pyterm -p "/dev/ttyUSB1" -b "500000" --no-reconnect --noprefix --no-repeat-command-on-empty-line
Twisted not available, please install it if you want to use pyterm's JSON capabilities
Connect to serial port /dev/ttyUSB1
Welcome to pyterm!
Type '/exit' to exit.
READY
s
START
main(): This is RIOT! (Version: buildtest)
Calling test_sock_ip_create__EAFNOSUPPORT()
Calling test_sock_ip_create__EINVAL_addr()
Calling test_sock_ip_create__EINVAL_netif()
Calling test_sock_ip_create__no_endpoints()
Calling test_sock_ip_create__only_local()
Calling test_sock_ip_create__only_local_reuse_ep()
Calling test_sock_ip_create__only_remote()
Calling test_sock_ip_create__full()
Calling test_sock_ip_recv__EADDRNOTAVAIL()
Calling test_sock_ip_recv__EAGAIN()
Calling test_sock_ip_recv__ENOBUFS()
Calling test_sock_ip_recv__EPROTO()
Calling test_sock_ip_recv__ETIMEDOUT()
* Calling sock_ip_recv()
* (timed out with timeout 1000000)
Calling test_sock_ip_recv__socketed()
Calling test_sock_ip_recv__socketed_with_remote()
Calling test_sock_ip_recv__unsocketed()
Calling test_sock_ip_recv__unsocketed_with_remote()
Calling test_sock_ip_recv__with_timeout()
Calling test_sock_ip_recv__non_blocking()
Calling test_sock_ip_recv_buf__success()
Calling test_sock_ip_send__EAFNOSUPPORT_INET()
Calling test_sock_ip_send__EAFNOSUPPORT_UNSPEC()
Calling test_sock_ip_send__EINVAL_addr()
Calling test_sock_ip_send__EINVAL_netif()
Calling test_sock_ip_send__ENOTCONN()
Calling test_sock_ip_send__socketed_no_local_no_netif()
Calling test_sock_ip_send__socketed_no_netif()
Calling test_sock_ip_send__socketed_no_local()
Calling test_sock_ip_send__socketed()
Calling test_sock_ip_send__socketed_other_remote()
Calling test_sock_ip_send__unsocketed_no_local_no_netif()
Calling test_sock_ip_send__unsocketed_no_netif()
Calling test_sock_ip_send__unsocketed_no_local()
Calling test_sock_ip_send__unsocketed()
Calling test_sock_ip_send__no_sock_no_netif()
Calling test_sock_ip_send__no_sock()
ALL TESTS SUCCESSFUL
make: Leaving directory '/home/mlenders/Repositories/RIOT-OS/RIOT/tests/gnrc_sock_ip'
make: Entering directory '/home/mlenders/Repositories/RIOT-OS/RIOT/tests/gnrc_sock_udp'
Building application "tests_gnrc_sock_udp" for "iotlab-m3" with MCU "stm32".
text data bss dec hex filename
41212 156 6212 47580 b9dc /home/mlenders/Repositories/RIOT-OS/RIOT/tests/gnrc_sock_udp/bin/iotlab-m3/tests_gnrc_sock_udp.elf
/home/mlenders/Repositories/RIOT-OS/RIOT/dist/tools/openocd/openocd.sh flash /home/mlenders/Repositories/RIOT-OS/RIOT/tests/gnrc_sock_udp/bin/iotlab-m3/tests_gnrc_sock_udp.elf
### Flashing Target ###
Open On-Chip Debugger 0.10.0+dev-01089-g3bfe49266 (2020-02-26-14:18)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
jtag
Warn : Interface already configured, ignoring
trst_and_srst separate srst_nogate trst_push_pull srst_open_drain connect_assert_srst
Info : clock speed 1000 kHz
Info : JTAG tap: stm32f1x.cpu tap/device found: 0x3ba00477 (mfg: 0x23b (ARM Ltd.), part: 0xba00, ver: 0x3)
Info : JTAG tap: stm32f1x.bs tap/device found: 0x06414041 (mfg: 0x020 (STMicroelectronics), part: 0x6414, ver: 0x0)
Info : stm32f1x.cpu: hardware has 6 breakpoints, 4 watchpoints
Info : stm32f1x.cpu: external reset detected
Info : Listening on port 36973 for gdb connections
TargetName Type Endian TapName State
-- ------------------ ---------- ------ ------------------ ------------
0* stm32f1x.cpu cortex_m little stm32f1x.cpu reset
Info : JTAG tap: stm32f1x.cpu tap/device found: 0x3ba00477 (mfg: 0x23b (ARM Ltd.), part: 0xba00, ver: 0x3)
Info : JTAG tap: stm32f1x.bs tap/device found: 0x06414041 (mfg: 0x020 (STMicroelectronics), part: 0x6414, ver: 0x0)
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x08001f40 msp: 0x20000200
Info : device id = 0x10016414
Info : flash size = 512kbytes
auto erase enabled
wrote 43008 bytes from file /home/mlenders/Repositories/RIOT-OS/RIOT/tests/gnrc_sock_udp/bin/iotlab-m3/tests_gnrc_sock_udp.elf in 1.817648s (23.107 KiB/s)
verified 41368 bytes in 0.621461s (65.006 KiB/s)
Info : JTAG tap: stm32f1x.cpu tap/device found: 0x3ba00477 (mfg: 0x23b (ARM Ltd.), part: 0xba00, ver: 0x3)
Info : JTAG tap: stm32f1x.bs tap/device found: 0x06414041 (mfg: 0x020 (STMicroelectronics), part: 0x6414, ver: 0x0)
shutdown command invoked
Done flashing
r
/home/mlenders/Repositories/RIOT-OS/RIOT/dist/tools/pyterm/pyterm -p "/dev/ttyUSB1" -b "500000" --no-reconnect --noprefix --no-repeat-command-on-empty-line
Twisted not available, please install it if you want to use pyterm's JSON capabilities
Connect to serial port /dev/ttyUSB1
Welcome to pyterm!
Type '/exit' to exit.
READY
s
START
main(): This is RIOT! (Version: buildtest)
Calling test_sock_udp_create__EADDRINUSE()
Calling test_sock_udp_create__EAFNOSUPPORT()
Calling test_sock_udp_create__EINVAL_addr()
Calling test_sock_udp_create__EINVAL_netif()
Calling test_sock_udp_create__no_endpoints()
Calling test_sock_udp_create__only_local()
Calling test_sock_udp_create__only_local_port0()
Calling test_sock_udp_create__only_local_reuse_ep()
Calling test_sock_udp_create__only_remote()
Calling test_sock_udp_create__full()
Calling test_sock_udp_recv__EADDRNOTAVAIL()
Calling test_sock_udp_recv__EAGAIN()
Calling test_sock_udp_recv__ENOBUFS()
Calling test_sock_udp_recv__EPROTO()
Calling test_sock_udp_recv__ETIMEDOUT()
* Calling sock_udp_recv()
* (timed out with timeout 1000000)
Calling test_sock_udp_recv__socketed()
Calling test_sock_udp_recv__socketed_with_remote()
Calling test_sock_udp_recv__socketed_with_port0()
Calling test_sock_udp_recv__unsocketed()
Calling test_sock_udp_recv__unsocketed_with_remote()
Calling test_sock_udp_recv__with_timeout()
Calling test_sock_udp_recv__non_blocking()
Calling test_sock_udp_recv_buf__success()
Calling test_sock_udp_send__EAFNOSUPPORT()
Calling test_sock_udp_send__EINVAL_addr()
Calling test_sock_udp_send__EINVAL_netif()
Calling test_sock_udp_send__EINVAL_port()
Calling test_sock_udp_send__ENOTCONN()
Calling test_sock_udp_send__socketed_no_local_no_netif()
Calling test_sock_udp_send__socketed_no_netif()
Calling test_sock_udp_send__socketed_no_local()
Calling test_sock_udp_send__socketed()
Calling test_sock_udp_send__socketed_other_remote()
Calling test_sock_udp_send__unsocketed_no_local_no_netif()
Calling test_sock_udp_send__unsocketed_no_netif()
Calling test_sock_udp_send__unsocketed_no_local()
Calling test_sock_udp_send__unsocketed()
Calling test_sock_udp_send__no_sock_no_netif()
Calling test_sock_udp_send__no_sock()
ALL TESTS SUCCESSFUL
make: Leaving directory '/home/mlenders/Repositories/RIOT-OS/RIOT/tests/gnrc_sock_udp'
make: Entering directory '/home/mlenders/Repositories/RIOT-OS/RIOT/tests/gnrc_sock_neterr'
Building application "tests_gnrc_sock_neterr" for "iotlab-m3" with MCU "stm32".
text data bss dec hex filename
30356 132 5732 36220 8d7c /home/mlenders/Repositories/RIOT-OS/RIOT/tests/gnrc_sock_neterr/bin/iotlab-m3/tests_gnrc_sock_neterr.elf
/home/mlenders/Repositories/RIOT-OS/RIOT/dist/tools/openocd/openocd.sh flash /home/mlenders/Repositories/RIOT-OS/RIOT/tests/gnrc_sock_neterr/bin/iotlab-m3/tests_gnrc_sock_neterr.elf
### Flashing Target ###
Open On-Chip Debugger 0.10.0+dev-01089-g3bfe49266 (2020-02-26-14:18)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
jtag
Warn : Interface already configured, ignoring
trst_and_srst separate srst_nogate trst_push_pull srst_open_drain connect_assert_srst
Info : clock speed 1000 kHz
Info : JTAG tap: stm32f1x.cpu tap/device found: 0x3ba00477 (mfg: 0x23b (ARM Ltd.), part: 0xba00, ver: 0x3)
Info : JTAG tap: stm32f1x.bs tap/device found: 0x06414041 (mfg: 0x020 (STMicroelectronics), part: 0x6414, ver: 0x0)
Info : stm32f1x.cpu: hardware has 6 breakpoints, 4 watchpoints
Info : stm32f1x.cpu: external reset detected
Info : Listening on port 38795 for gdb connections
TargetName Type Endian TapName State
-- ------------------ ---------- ------ ------------------ ------------
0* stm32f1x.cpu cortex_m little stm32f1x.cpu reset
Info : JTAG tap: stm32f1x.cpu tap/device found: 0x3ba00477 (mfg: 0x23b (ARM Ltd.), part: 0xba00, ver: 0x3)
Info : JTAG tap: stm32f1x.bs tap/device found: 0x06414041 (mfg: 0x020 (STMicroelectronics), part: 0x6414, ver: 0x0)
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x08002250 msp: 0x20000200
Info : device id = 0x10016414
Info : flash size = 512kbytes
auto erase enabled
wrote 30720 bytes from file /home/mlenders/Repositories/RIOT-OS/RIOT/tests/gnrc_sock_neterr/bin/iotlab-m3/tests_gnrc_sock_neterr.elf in 1.310326s (22.895 KiB/s)
verified 30488 bytes in 0.466160s (63.870 KiB/s)
Info : JTAG tap: stm32f1x.cpu tap/device found: 0x3ba00477 (mfg: 0x23b (ARM Ltd.), part: 0xba00, ver: 0x3)
Info : JTAG tap: stm32f1x.bs tap/device found: 0x06414041 (mfg: 0x020 (STMicroelectronics), part: 0x6414, ver: 0x0)
shutdown command invoked
Done flashing
r
/home/mlenders/Repositories/RIOT-OS/RIOT/dist/tools/pyterm/pyterm -p "/dev/ttyUSB1" -b "500000" --no-reconnect --noprefix --no-repeat-command-on-empty-line
Twisted not available, please install it if you want to use pyterm's JSON capabilities
Connect to serial port /dev/ttyUSB1
Welcome to pyterm!
Type '/exit' to exit.
READY
s
START
main(): This is RIOT! (Version: buildtest)
SUCCESS: error code EHOSTUNREACH (118 == 118)
SUCCESS: error code ENETUNREACH (114 == 114)
make: Leaving directory '/home/mlenders/Repositories/RIOT-OS/RIOT/tests/gnrc_sock_neterr'|
Thanks for the review! |
Are you planing to do a follow-up, or should I? |
please do, I got a bunch of other fixes I'd like to polish and PR! |
|
See #15484 |
Contribution description
Previously, gnrc_sock directly accessed members of mbox_t to get the size of an mbox queue or availability of mbox messages.
This PR provides an API for that. Another commit makes gnrc_sock use the new API.
Testing procedure
The change is rather small, but probably some gnrc_sock tests should be done.
Issues/PRs references