-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tests/netstat_l2: workaround for esp32 boards #12756
tests/netstat_l2: workaround for esp32 boards #12756
Conversation
Since ESP32 boards only have network interfaces if the `esp_wifi`, `esp_now` and `esp_eth` modules are explicitly enabled, they are removed from the list of boards that provide network interfaces.
To be able to use the test for network interfaces that have to be enabled explicitly, the variable BOARD_PROVIDES_NETIF has to be settable in the environment.
I was always wondering why you don't just do ifneq (,$(filter gnrc_netdev_default netdev_default,$(USEMODULE)))
USEMODULE += esp_wifi
endif for esp32/esp8266 since WiFi is pretty much the defining feature of this MCU. |
Because you have different options to use the WiFi interface, |
You could do ifneq (,$(filter gnrc_netdev_default netdev_default,$(USEMODULE)))
USEMODULE += $(ESP_NETDEV_DEFAULT)
endif |
What to do if #11676 is merged then? |
@@ -1,10 +1,8 @@ | |||
include ../Makefile.tests_common | |||
|
|||
BOARD_PROVIDES_NETIF := airfy-beacon fox iotlab-m3 mulle native nrf51dk nrf51dongle \ | |||
BOARD_PROVIDES_NETIF ?= airfy-beacon fox iotlab-m3 mulle native nrf51dk nrf51dongle \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe use the following:
BOARD_PROVIDES_NETIF ?= airfy-beacon fox iotlab-m3 mulle native nrf51dk nrf51dongle \ | |
BOARD_PROVIDES_NETIF += airfy-beacon fox iotlab-m3 mulle native nrf51dk nrf51dongle \ |
Not sure if it's useful or not (if not you can ignore).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should not make any difference if you specify this variable explicitly for its use with a single board. BTW, netstat_l2
could be used with ESP8266 boards in same way.
Should be possible in that way. But I wouldn't do that with this PR if you don't insist on this change because it changes the documented way on how to enable and select the network interface for ESPs. |
@benpicco How do we continue with this PR? |
I mean if you were to make a PR to add a default netdev for esp*, this PR would be obsolete. |
Ok, I can try to find a usefull configuration. |
|
Hm, sounds good. I will try. BTW, |
Wow, I didn't know - this is neat! |
Closed in favor of PR #12787. |
Contribution description
Since ESP32 boards only have network interfaces if the
esp_wifi
,esp_now
andesp_eth
modules are explicitly enabled, they are removed from the list of boards that provide network interfaces.Instead, the variable BOARD_PROVIDES_NETIF is made adjustable in the environment. Thus the test can be used for ESP32 with and without network interfaces.
Fixes the test
tests/netstat_l2
for ESP32.This PR belongs to the series of PRs, each with very small changes that fix automatic tests on ESP32 boards.
Testing procedure
Make, flash and test with
and without network interfaces.
Issues/PRs references
Requires #12752