Skip to content

Conversation

benpicco
Copy link
Contributor

@benpicco benpicco commented Jul 28, 2020

Contribution description

This was lost when moving to poll().
We need to close the fds on native_async_read_cleanup().

Testing procedure

Start a native instance of examples/gnrc_networking

sudo dist/tools/tapsetup/tapsetup -d
sudo dist/tools/tapsetup/tapsetup
BOARD=native make -C examples/gnrc_networking
BOARD=native make -C examples/gnrc_networking term

and type reboot.

make: Entering directory '/home/mlenders/Repositories/RIOT-OS/RIOT/examples/gnrc_networking'
/home/mlenders/Repositories/RIOT-OS/RIOT/examples/gnrc_networking/bin/native/gnrc_networking.elf tap0
RIOT native interrupts/signals initialized.
LED_RED_OFF
LED_GREEN_ON
RIOT native board initialized.
RIOT native hardware initialization complete.

main(): This is RIOT! (Version: 2020.10-devel-389-gbd2e6c-cpu/native/async_read-cleanup)
RIOT network stack example application
All up, running the shell now
> reboot
reboot


		!! REBOOT !!

RIOT native interrupts/signals initialized.
LED_RED_OFF
LED_GREEN_ON
RIOT native board initialized.
RIOT native hardware initialization complete.

main(): This is RIOT! (Version: 2020.10-devel-389-gbd2e6c-cpu/native/async_read-cleanup)
RIOT network stack example application
All up, running the shell now
> help
help
Command              Description
---------------------------------------
udp                  send data over UDP and listen on UDP ports
reboot               Reboot the node
version              Prints current RIOT_VERSION
pm                   interact with layered PM subsystem
ps                   Prints information about running threads.
ping6                Ping via ICMPv6
ping                 Ping via ICMPv6
random_init          initializes the PRNG
random_get           returns 32 bit of pseudo randomness
nib                  Configure neighbor information base
ifconfig             Configure network interfaces
rpl                  rpl configuration tool ('rpl help' for more information)

Issues/PRs references

fixes #14636

This was lost when moving to poll().
We need to close the fds on cleanup.

fixes RIOT-OS#14636
@benpicco benpicco requested a review from miri64 July 28, 2020 12:50
@benpicco benpicco added Platform: native Platform: This PR/issue effects the native platform Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors) labels Jul 28, 2020
@benpicco benpicco requested a review from bergzand July 28, 2020 12:50
@benpicco benpicco added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label Jul 28, 2020
Copy link
Member

@miri64 miri64 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK. Confirmed that this fixes #14636 and also that tests/emcute works again with native (the problem that caused me investigating #14636 in the first place).

@miri64 miri64 added the Area: cpu Area: CPU/MCU ports label Jul 28, 2020
@miri64 miri64 merged commit ab88a96 into RIOT-OS:master Jul 28, 2020
@benpicco benpicco deleted the cpu/native/async_read-cleanup branch July 28, 2020 16:49
@guymamo
Copy link

guymamo commented Jul 2, 2021

It Works for me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: cpu Area: CPU/MCU ports CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Platform: native Platform: This PR/issue effects the native platform Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

native: reboot exits instance with TAP interface
3 participants