diff --git a/.github/labeler.yml b/.github/labeler.yml index 52ea3f48385d..bd1eb086acc1 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -118,7 +118,9 @@ "Platform: native": - "boards/native/**/*" + - "boards/native64/**/*" - "cpu/native/**/*" + - "makefiles/arch/native.inc.mk" "Platform: ARM": - "cpu/arm7_common/**/*" diff --git a/.murdock b/.murdock index a590cf1c3105..022f136aeba1 100755 --- a/.murdock +++ b/.murdock @@ -15,6 +15,7 @@ hifive1b msb-430 msba2 native +native64 nrf52840dk qn9080dk samr21-xpro @@ -38,7 +39,7 @@ esac # temporarily disabling llvm builds until https://github.com/RIOT-OS/RIOT/pull/15595 # is in -: ${TEST_BOARDS_LLVM_COMPILE:="iotlab-m3 native nrf52dk mulle nucleo-f401re samr21-xpro slstk3402a"} +: ${TEST_BOARDS_LLVM_COMPILE:="iotlab-m3 native native64 nrf52dk mulle nucleo-f401re samr21-xpro slstk3402a"} : ${TEST_WITH_CONFIG_SUPPORTED:="examples/suit_update tests/drivers/at86rf2xx_aes"} @@ -380,9 +381,9 @@ compile() { EMULATED=0 fi - if [ $RUN_TESTS -eq 1 -o "$board" = "native" -o "$EMULATED" = "1" ]; then + if [ $RUN_TESTS -eq 1 -o "$board" = "native" -o "$board" = "native64" -o "$EMULATED" = "1" ]; then if [ -f "${BINDIR}/.test" ]; then - if [ "$board" = "native" -o "${EMULATED}" = "1" ]; then + if [ "$board" = "native" -o "$board" = "native64" -o "${EMULATED}" = "1" ]; then # For native, we can run the test on the worker that also # compiled it (`make -C${appdir} test`). # "dwq-localjob" allows using some (locally run) command's diff --git a/Makefile.include b/Makefile.include index c88f2baeb897..9b054e367d54 100644 --- a/Makefile.include +++ b/Makefile.include @@ -204,7 +204,7 @@ include $(RIOTMAKE)/boards.inc.mk include $(RIOTMAKE)/dependencies_debug.inc.mk # Use TOOLCHAIN environment variable to select the toolchain to use. -ifeq ($(BOARD),native) +ifneq (,$(filter native native64,$(BOARD))) ifeq ($(OS),Darwin) $(shell $(COLOR_ECHO) "$(COLOR_RED)"Buildin on macOS is not supported."\ "We recommend vagrant for building:$(COLOR_RESET)"\ diff --git a/boards/native/Makefile.features b/boards/native/Makefile.features index c3242a2fc24c..a7fbc80d145f 100644 --- a/boards/native/Makefile.features +++ b/boards/native/Makefile.features @@ -1,14 +1,6 @@ CPU = native -# Put defined MCU peripherals here (in alphabetical order) -FEATURES_PROVIDED += periph_rtc -FEATURES_PROVIDED += periph_rtc_ms -FEATURES_PROVIDED += periph_timer -FEATURES_PROVIDED += periph_uart -FEATURES_PROVIDED += periph_gpio -FEATURES_PROVIDED += periph_pwm -FEATURES_PROVIDED += periph_qdec +FEATURES_PROVIDED += arch_32bit +NATIVE_ARCH_BIT = 32 -# Various other features (if any) -FEATURES_PROVIDED += ethernet -FEATURES_PROVIDED += motor_driver +include $(RIOTBOARD)/native/common_features.inc.mk diff --git a/boards/native/Makefile.include b/boards/native/Makefile.include index f25d47ab2d15..d0f8eee0dc9f 100644 --- a/boards/native/Makefile.include +++ b/boards/native/Makefile.include @@ -1,17 +1,4 @@ -NATIVEINCLUDES += -DNATIVE_INCLUDES NATIVEINCLUDES += -I$(RIOTBOARD)/native/include/ -NATIVEINCLUDES += -I$(RIOTBASE)/core/lib/include/ -NATIVEINCLUDES += -I$(RIOTBASE)/core/include/ -NATIVEINCLUDES += -I$(RIOTBASE)/drivers/include/ - -# Set "NATIVE_64BIT=1" to compile for x86_64 -NATIVE_64BIT ?= 0 - -ifeq ($(OS),Darwin) - DEBUGGER ?= lldb -else - DEBUGGER ?= gdb -endif # only use pyterm wrapper if term target is requested ifeq (,$(filter term,$(MAKECMDGOALS))) @@ -48,93 +35,6 @@ else endif endif -export VALGRIND ?= valgrind -export CGANNOTATE ?= cg_annotate -export GPROF ?= gprof - -# basic cflags: -CFLAGS += -Wall -Wextra -pedantic $(CFLAGS_DBG) $(CFLAGS_OPT) -CFLAGS += -U_FORTIFY_SOURCE -CFLAGS_DBG ?= -g3 - -ifneq (,$(filter backtrace,$(USEMODULE))) - $(warning module backtrace is used, do not omit frame pointers) - CFLAGS_OPT ?= -Og -fno-omit-frame-pointer -else - CFLAGS_OPT ?= -Og -endif - -# default std set to gnu11 if not overwritten by user -ifeq (,$(filter -std=%, $(CFLAGS))) - CFLAGS += -std=gnu11 -endif - -ifeq ($(OS_ARCH),x86_64) - ifeq ($(NATIVE_64BIT), 1) - CFLAGS += -m64 - else - CFLAGS += -m32 - endif -endif -ifneq (,$(filter -DDEVELHELP,$(CFLAGS))) - CFLAGS += -fstack-protector-all -endif -ifeq ($(OS),FreeBSD) - ifeq ($(OS_ARCH),amd64) - ifeq ($(NATIVE_64BIT), 1) - CFLAGS += -m64 - else - CFLAGS += -m32 -DCOMPAT_32BIT -B/usr/lib32 - endif - endif -endif -ifeq ($(OS),Darwin) - CFLAGS += -Wno-deprecated-declarations -endif - -# unwanted (CXXUWFLAGS) and extra (CXXEXFLAGS) flags for c++ -CXXUWFLAGS += -CXXEXFLAGS += - -ifeq ($(OS_ARCH),x86_64) - ifeq ($(NATIVE_64BIT), 1) - LINKFLAGS += -m64 - else - LINKFLAGS += -m32 - endif -endif -ifeq ($(OS),FreeBSD) - ifeq ($(OS_ARCH),amd64) - ifeq ($(NATIVE_64BIT), 1) - LINKFLAGS += -m64 - else - LINKFLAGS += -m32 -DCOMPAT_32BIT -L/usr/lib32 -B/usr/lib32 - endif - endif - LINKFLAGS += -L $(BINDIR) -else - LINKFLAGS += -ldl -endif - -# XFA (cross file array) support -LINKFLAGS += -T$(RIOTBASE)/cpu/native/ldscripts/xfa.ld - -# fix this warning: -# ``` -# /usr/bin/ld: examples/hello-world/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 -# ``` -LINKFLAGS += -no-pie - -# clean up unused functions -CFLAGS += -ffunction-sections -fdata-sections -ifeq ($(OS),Darwin) - LINKFLAGS += -Wl,-dead_strip -else - LINKFLAGS += -Wl,--gc-sections -endif -LINKFLAGS += -ffunction-sections - # set the tap interface for term/valgrind PORT ?= tap0 TERMFLAGS += $(PROCARGS) $(PORT) @@ -160,80 +60,3 @@ ifneq (,$(filter periph_can,$(FEATURES_USED))) PERIPH_CAN_FLAGS ?= --can $(VCAN_IFACE) TERMFLAGS += $(PERIPH_CAN_FLAGS) endif - - -ASFLAGS = -ifeq ($(shell basename $(DEBUGGER)),lldb) - DEBUGGER_FLAGS = -- $(ELFFILE) $(TERMFLAGS) -else - DEBUGGER_FLAGS = -q --args $(ELFFILE) $(TERMFLAGS) -endif -term-valgrind: export VALGRIND_FLAGS ?= \ - --leak-check=full \ - --track-origins=yes \ - --fullpath-after=$(RIOTBASE)/ \ - --read-var-info=yes -debug-valgrind-server: export VALGRIND_FLAGS ?= --vgdb=yes --vgdb-error=0 -v \ - --leak-check=full --track-origins=yes --fullpath-after=$(RIOTBASE) \ - --read-var-info=yes -term-cachegrind: export CACHEGRIND_FLAGS += --tool=cachegrind -term-gprof: TERMPROG = GMON_OUT_PREFIX=gmon.out $(ELFFILE) -all-valgrind: CFLAGS += -DHAVE_VALGRIND_H -all-valgrind: NATIVEINCLUDES += $(shell pkg-config valgrind --cflags) -all-gprof: CFLAGS += -pg -all-gprof: LINKFLAGS += -pg - -CFLAGS_ASAN += -fsanitize=address -fno-omit-frame-pointer -DNATIVE_MEMORY -LINKFLAGS_ASAN += -fsanitize=address -fno-omit-frame-pointer -all-asan: CFLAGS += $(CFLAGS_ASAN) -all-asan: LINKFLAGS += $(LINKFLAGS_ASAN) -all-asan: export AFL_USE_ASAN=1 - -INCLUDES += $(NATIVEINCLUDES) - -CFLAGS += -DDEBUG_ASSERT_VERBOSE - -# workaround for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52624 -ifneq ($(shell gcc --version | head -1 | grep -E ' (4.6|4.7)'),) - CFLAGS += -DHAVE_NO_BUILTIN_BSWAP16 -endif - -# clumsy way to enable building native on osx: -BUILDOSXNATIVE = 0 -ifeq ($(CPU),native) - ifeq ($(OS),Darwin) - BUILDOSXNATIVE = 1 - endif -endif - -all: # do not override first target - -all-gprof: all - -all-asan: all - -all-valgrind: all - -all-cachegrind: all - -term-valgrind: - $(VALGRIND) $(VALGRIND_FLAGS) $(ELFFILE) $(PORT) - -debug-valgrind-server: - $(VALGRIND) $(VALGRIND_FLAGS) $(ELFFILE) $(PORT) - -debug-valgrind: - $(eval VALGRIND_PID ?= $(shell pgrep -n memcheck-x86-li -u $(USER) | cut -d" " -f1)) - $(eval DEBUGGER_FLAGS := -ex "target remote | vgdb --pid=$(VALGRIND_PID)" $(DEBUGGER_FLAGS)) - $(DEBUGGER) $(DEBUGGER_FLAGS) - -term-cachegrind: - $(VALGRIND) $(CACHEGRIND_FLAGS) $(ELFFILE) $(PORT) - -term-gprof: term - -eval-gprof: - $(GPROF) $(ELFFILE) $(shell ls -rt gmon.out* | tail -1) - -eval-cachegrind: - $(CGANNOTATE) $(shell ls -rt cachegrind.out* | tail -1) diff --git a/boards/native/common_features.inc.mk b/boards/native/common_features.inc.mk new file mode 100644 index 000000000000..cbebc1102062 --- /dev/null +++ b/boards/native/common_features.inc.mk @@ -0,0 +1,12 @@ +# Put defined MCU peripherals here (in alphabetical order) +FEATURES_PROVIDED += periph_rtc +FEATURES_PROVIDED += periph_rtc_ms +FEATURES_PROVIDED += periph_timer +FEATURES_PROVIDED += periph_uart +FEATURES_PROVIDED += periph_gpio +FEATURES_PROVIDED += periph_pwm +FEATURES_PROVIDED += periph_qdec + +# Various other features (if any) +FEATURES_PROVIDED += ethernet +FEATURES_PROVIDED += motor_driver diff --git a/boards/native/doc.txt b/boards/native/doc.txt index 7c77d09df3d7..083512853181 100644 --- a/boards/native/doc.txt +++ b/boards/native/doc.txt @@ -25,8 +25,6 @@ # Required packages -The `native` version of RIOT will produce a 32 bit binary by default. -To compile for x86_64 set the environment variable `NATIVE_64BIT=1`. On Debian/Ubuntu you can install the required libraries with ``` diff --git a/boards/native64/Kconfig b/boards/native64/Kconfig new file mode 100644 index 000000000000..a336e5903d37 --- /dev/null +++ b/boards/native64/Kconfig @@ -0,0 +1,30 @@ +# Copyright (c) 2020 HAW Hamburg +# +# This file is subject to the terms and conditions of the GNU Lesser +# General Public License v2.1. See the file LICENSE in the top level +# directory for more details. +# + +config BOARD + default "native64" if BOARD_NATIVE64 + +config BOARD_NATIVE64 + bool + default y + select CPU_MODEL_NATIVE + + # Put defined MCU peripherals here (in alphabetical order) + select HAS_PERIPH_RTC + select HAS_PERIPH_RTC_MS + select HAS_PERIPH_TIMER + select HAS_PERIPH_UART + select HAS_PERIPH_GPIO + select HAS_PERIPH_PWM + select HAS_PERIPH_QDEC + + # Various other features (if any) + select HAS_ETHERNET + select HAS_MOTOR_DRIVER + select HAVE_SDL + +rsource "../native/drivers/Kconfig" diff --git a/boards/native64/Makefile b/boards/native64/Makefile new file mode 100644 index 000000000000..23014a2c6825 --- /dev/null +++ b/boards/native64/Makefile @@ -0,0 +1,3 @@ +DIRS = $(RIOTBOARD)/native + +include $(RIOTBASE)/Makefile.base diff --git a/boards/native64/Makefile.dep b/boards/native64/Makefile.dep new file mode 100644 index 000000000000..2494d8582b6c --- /dev/null +++ b/boards/native64/Makefile.dep @@ -0,0 +1 @@ +include $(RIOTBOARD)/native/Makefile.dep diff --git a/boards/native64/Makefile.features b/boards/native64/Makefile.features new file mode 100644 index 000000000000..ef67048084c6 --- /dev/null +++ b/boards/native64/Makefile.features @@ -0,0 +1,6 @@ +CPU = native + +FEATURES_PROVIDED += arch_64bit +NATIVE_ARCH_BIT = 64 + +include $(RIOTBOARD)/native/common_features.inc.mk diff --git a/boards/native64/Makefile.include b/boards/native64/Makefile.include new file mode 100644 index 000000000000..f7327bc5c650 --- /dev/null +++ b/boards/native64/Makefile.include @@ -0,0 +1 @@ +include $(RIOTBOARD)/native/Makefile.include diff --git a/boards/native64/doc.txt b/boards/native64/doc.txt new file mode 100644 index 000000000000..92ac1758aedd --- /dev/null +++ b/boards/native64/doc.txt @@ -0,0 +1,13 @@ +/** +@defgroup boards_native64 Native64 Board +@ingroup boards +@brief Support for running RIOT in native64 + +[Family: native](https://github.com/RIOT-OS/RIOT/wiki/Family:-native) + +Same board as \ref boards_native "native", but compiled for 64-bit instead of 32-bit. +Currently only Linux x86-64 is supported, and Rust support is missing. +Otherwise, everything works the same as for the 32-bit version. +For more information on this board, see the \ref boards_native "native board" documentation. + + */ diff --git a/core/include/native_sched.h b/core/include/native_sched.h index c1b69e82eb51..573b97095b22 100644 --- a/core/include/native_sched.h +++ b/core/include/native_sched.h @@ -27,7 +27,7 @@ extern "C" { #endif -#ifdef BOARD_NATIVE +#ifdef CPU_NATIVE #include /* @@ -56,7 +56,7 @@ inline int sched_yield(void) * thread_arch.c. */ extern int sched_yield(void); -#endif /* BOARD_NATIVE */ +#endif /* CPU_NATIVE */ #ifdef __cplusplus } diff --git a/cpu/native/Kconfig b/cpu/native/Kconfig index bcc7b3f3ced1..d1d8ac77f233 100644 --- a/cpu/native/Kconfig +++ b/cpu/native/Kconfig @@ -7,8 +7,8 @@ config CPU_ARCH_NATIVE bool - select HAS_ARCH_32BIT if "$(NATIVE_64BIT)" != "1" - select HAS_ARCH_64BIT if "$(NATIVE_64BIT)" = "1" + select HAS_ARCH_32BIT if BOARD_NATIVE + select HAS_ARCH_64BIT if BOARD_NATIVE64 select HAS_ARCH_NATIVE select HAS_CPP select HAS_CPU_NATIVE diff --git a/cpu/native/Makefile.features b/cpu/native/Makefile.features index f8b687c35e70..2fdde8697a72 100644 --- a/cpu/native/Makefile.features +++ b/cpu/native/Makefile.features @@ -2,11 +2,6 @@ ifeq (FreeBSD,$(OS)) DISABLE_LIBSTDCPP ?= 1 endif -ifeq ($(NATIVE_64BIT), 1) - FEATURES_PROVIDED += arch_64bit -else - FEATURES_PROVIDED += arch_32bit -endif FEATURES_PROVIDED += arch_native FEATURES_PROVIDED += cpp ifneq ($(DISABLE_LIBSTDCPP),1) @@ -25,7 +20,7 @@ FEATURES_PROVIDED += periph_timer_periodic FEATURES_PROVIDED += periph_timer_query_freqs ifeq ($(OS) $(OS_ARCH),Linux x86_64) # TODO: Add rust support for native 64 bit. - ifneq ($(NATIVE_64BIT), 1) + ifneq ($(BOARD),native64) FEATURES_PROVIDED += rust_target endif endif diff --git a/cpu/native/Makefile.include b/cpu/native/Makefile.include index c664b9cb15a3..63b2fa3a9a01 100644 --- a/cpu/native/Makefile.include +++ b/cpu/native/Makefile.include @@ -1,4 +1,4 @@ -NATIVEINCLUDES += -I$(RIOTCPU)/native/include -I$(RIOTBASE)/sys/include +NATIVEINCLUDES += -I$(RIOTCPU)/native/include/ ifneq (,$(filter periph_can,$(USEMODULE))) ifeq (,$(filter libsocketcan,$(USEPKG))) @@ -17,3 +17,5 @@ ifeq ($(OS) $(OS_ARCH),Linux x86_64) RUST_TARGET = x86_64-unknown-linux-gnu endif endif + +include $(RIOTMAKE)/arch/native.inc.mk diff --git a/cpu/native/include/cpu_conf.h b/cpu/native/include/cpu_conf.h index e002f586b1ea..88d37cbb947b 100644 --- a/cpu/native/include/cpu_conf.h +++ b/cpu/native/include/cpu_conf.h @@ -28,8 +28,12 @@ extern "C" { * @{ */ #ifndef THREAD_STACKSIZE_DEFAULT +#if (__SIZEOF_POINTER__ == 8) +#define THREAD_STACKSIZE_DEFAULT (16384) +#else #define THREAD_STACKSIZE_DEFAULT (8192) #endif +#endif #ifndef THREAD_STACKSIZE_IDLE #define THREAD_STACKSIZE_IDLE (THREAD_STACKSIZE_DEFAULT) #endif diff --git a/cpu/native/irq_cpu.c b/cpu/native/irq_cpu.c index 165a6eeb6bc7..030819c07b5b 100644 --- a/cpu/native/irq_cpu.c +++ b/cpu/native/irq_cpu.c @@ -49,7 +49,7 @@ volatile int _native_in_syscall; static sigset_t _native_sig_set, _native_sig_set_dint; -char __isr_stack[SIGSTKSZ]; +char __isr_stack[THREAD_STACKSIZE_DEFAULT]; ucontext_t native_isr_context; ucontext_t *_native_cur_ctx, *_native_isr_ctx; @@ -524,7 +524,7 @@ void native_interrupt_init(void) static stack_t sigstk; sigstk.ss_sp = sigalt_stk; - sigstk.ss_size = sizeof(__isr_stack); + sigstk.ss_size = sizeof(sigalt_stk); sigstk.ss_flags = 0; if (sigaltstack(&sigstk, NULL) < 0) { diff --git a/dist/tools/ci/build_and_test.sh b/dist/tools/ci/build_and_test.sh index 730586368731..e8e8f170b50a 100755 --- a/dist/tools/ci/build_and_test.sh +++ b/dist/tools/ci/build_and_test.sh @@ -54,6 +54,11 @@ then set_result $? fi + if [ "$BUILDTEST_MCU_GROUP" == "x86_64" ] + then + make -C ./tests/unittests all test BOARD=native64 TERMPROG='gdb -batch -ex r -ex bt $(ELF)' || exit + set_result $? + fi ./dist/tools/compile_test/compile_test.py $BASE_BRANCH set_result $? diff --git a/dist/tools/compile_test/compile_like_murdock.py b/dist/tools/compile_test/compile_like_murdock.py index b8091d7dcf62..0823d43f889f 100755 --- a/dist/tools/compile_test/compile_like_murdock.py +++ b/dist/tools/compile_test/compile_like_murdock.py @@ -92,6 +92,7 @@ 'microbit', 'mulle', 'native', + 'native64', 'nrf52840dk', 'nrf9160dk', 'nucleo-f072rb', diff --git a/examples/ccn-lite-relay/Makefile b/examples/ccn-lite-relay/Makefile index 6b3508d64f58..ae3e3e748e4a 100644 --- a/examples/ccn-lite-relay/Makefile +++ b/examples/ccn-lite-relay/Makefile @@ -3,7 +3,7 @@ APPLICATION = ccn-lite-relay # If no BOARD is found in the environment, use this default: BOARD ?= native -BOARD_WHITELIST := iotlab-m3 msba2 mulle native nrf52dk nrf52840dk \ +BOARD_WHITELIST := iotlab-m3 msba2 mulle native native64 nrf52dk nrf52840dk \ pba-d-01-kw2x samr21-xpro diff --git a/examples/gnrc_border_router/Makefile b/examples/gnrc_border_router/Makefile index d9e3929e32ba..c52d31ce92bf 100644 --- a/examples/gnrc_border_router/Makefile +++ b/examples/gnrc_border_router/Makefile @@ -98,7 +98,7 @@ endif # use ethos (ethernet over serial) or SLIP (serial-line IP) for network # communication and stdio over UART, but not on native, as native has a tap # interface towards the host. -ifeq (,$(filter native,$(BOARD))) +ifeq (,$(filter native native64,$(BOARD))) ifeq (slip,$(UPLINK)) # SLIP baudrate and UART device can be configured from make command SLIP_BAUDRATE ?= 115200 @@ -155,7 +155,7 @@ host-tools: $(Q)env -u CC -u CFLAGS $(MAKE) -C $(RIOTTOOLS) # define native specific targets to only run UHCP daemon when required -ifneq (,$(filter native,$(BOARD))) +ifneq (,$(filter native native64,$(BOARD))) ifeq (uhcp,$(PREFIX_CONF)) .PHONY: uhcpd-daemon diff --git a/examples/gnrc_border_router/Makefile.board.dep b/examples/gnrc_border_router/Makefile.board.dep index 9943c4f0579c..bada0b96400c 100644 --- a/examples/gnrc_border_router/Makefile.board.dep +++ b/examples/gnrc_border_router/Makefile.board.dep @@ -1,5 +1,5 @@ # Put board specific dependencies here -ifeq (,$(filter native,$(BOARD))) +ifeq (,$(filter native native64,$(BOARD))) ifeq (slip,$(UPLINK)) USEMODULE += slipdev_stdio else ifeq (ethos,$(UPLINK)) diff --git a/examples/gnrc_border_router/README.md b/examples/gnrc_border_router/README.md index 18cac784ae1b..72ab761ac72b 100644 --- a/examples/gnrc_border_router/README.md +++ b/examples/gnrc_border_router/README.md @@ -178,7 +178,7 @@ To select ethos as the serial driver, be sure that the `Makefile` has the following: ```make -ifeq (,$(filter native,$(BOARD))) +ifeq (,$(filter native native64,$(BOARD))) USEMODULE += stdio_ethos CFLAGS += '-DETHOS_UART=UART_DEV(0)' -DETHOS_BAUDRATE=115200 FEATURES_REQUIRED += periph_uart diff --git a/examples/javascript/Makefile b/examples/javascript/Makefile index cc95e6b06af8..9d774f7a3d7f 100644 --- a/examples/javascript/Makefile +++ b/examples/javascript/Makefile @@ -12,7 +12,7 @@ RIOTBASE ?= $(CURDIR)/../.. # development process: DEVELHELP ?= 1 -ifneq ($(BOARD),native) +ifeq (,$(filter native native64,$(BOARD))) # Set stack size to something (conservatively) enormous CFLAGS += -DTHREAD_STACKSIZE_MAIN=9092 endif diff --git a/examples/lua_basic/Makefile b/examples/lua_basic/Makefile index 83957594031b..3f15545268cc 100644 --- a/examples/lua_basic/Makefile +++ b/examples/lua_basic/Makefile @@ -14,7 +14,7 @@ DEVELHELP ?= 1 # Change this to 0 show compiler invocation lines by default: QUIET ?= 1 -ifneq ($(BOARD),native) +ifeq (,$(filter native native64,$(BOARD))) # This stack size is large enough to run Lua print() functions of # various lengths. Other functions untested. CFLAGS += -DTHREAD_STACKSIZE_MAIN='(THREAD_STACKSIZE_DEFAULT+2048)' diff --git a/examples/nanocoap_server/Makefile b/examples/nanocoap_server/Makefile index 9f8b91f201b8..85e19d7cf178 100644 --- a/examples/nanocoap_server/Makefile +++ b/examples/nanocoap_server/Makefile @@ -44,14 +44,14 @@ ifneq (,$(filter $(BOARD),$(LOW_MEMORY_BOARDS))) endif # Enable fileserver for boards with plenty of memory -HIGH_MEMORY_BOARDS := native same54-xpro mcb2388 +HIGH_MEMORY_BOARDS := native native64 same54-xpro mcb2388 ifneq (,$(filter $(BOARD),$(HIGH_MEMORY_BOARDS))) USEMODULE += nanocoap_fileserver USEMODULE += vfs_default # always enable auto-format for native - ifeq ($(BOARD),native) + ifneq (,$(filter native native64,$(BOARD))) USEMODULE += vfs_auto_format endif endif diff --git a/examples/paho-mqtt/Makefile.board.dep b/examples/paho-mqtt/Makefile.board.dep index 4000952c2801..8e280c14a0a5 100644 --- a/examples/paho-mqtt/Makefile.board.dep +++ b/examples/paho-mqtt/Makefile.board.dep @@ -4,6 +4,6 @@ ifneq (,$(filter arch_esp,$(FEATURES_USED))) USEMODULE += esp_wifi endif -ifeq ($(BOARD),native) +ifneq (,$(filter native native64,$(BOARD))) USEMODULE += netdev_default endif diff --git a/examples/suit_update/Makefile b/examples/suit_update/Makefile index 0a5712222f86..3ca57555d7f6 100644 --- a/examples/suit_update/Makefile +++ b/examples/suit_update/Makefile @@ -55,7 +55,7 @@ CFLAGS += -DSUIT_MANIFEST_RESOURCE=\"$(SUIT_COAP_ROOT)/$(SUIT_NOTIFY_MANIFEST)\" # Enable test_utils_interactive_sync, only used when running automatic test DEFAULT_MODULE += test_utils_interactive_sync -ifeq ($(BOARD),native) +ifneq (,$(filter native native64,$(BOARD))) USE_ETHOS ?= 0 IFACE ?= tapbr0 # Configure two RAM regions with 2K each diff --git a/examples/suit_update/Makefile.board.dep b/examples/suit_update/Makefile.board.dep index f682da2777fe..db77e822f6c5 100644 --- a/examples/suit_update/Makefile.board.dep +++ b/examples/suit_update/Makefile.board.dep @@ -1,4 +1,4 @@ -ifeq ($(BOARD),native) +ifneq (,$(filter native native64,$(BOARD))) USEMODULE += suit_storage_ram USEMODULE += netdev_default # Use VFS storage for native diff --git a/examples/suit_update/Makefile.suit.custom b/examples/suit_update/Makefile.suit.custom index cdfaa35faebc..2f81313142c6 100644 --- a/examples/suit_update/Makefile.suit.custom +++ b/examples/suit_update/Makefile.suit.custom @@ -9,13 +9,13 @@ EPOCH = $(call memoized,EPOCH,$(shell date +%s)) APP_VER ?= $(EPOCH) # Default addressing if following README.native.md -ifeq ($(BOARD),native) +ifneq (,$(filter native native64,$(BOARD))) SUIT_CLIENT ?= [2001:db8::2] SUIT_COAP_SERVER ?= [2001:db8::1] $(call target-export-variables,test-with-config,SUIT_COAP_SERVER) endif -ifeq ($(BOARD),native) +ifneq (,$(filter native native64,$(BOARD))) # Set settings for publishing fake fw payloads to native SUIT_NATIVE_PAYLOAD ?= "AABBCCDD" SUIT_NATIVE_PAYLOAD_BIN ?= $(BINDIR_APP)/fw.$(APP_VER).bin diff --git a/examples/suit_update/main.c b/examples/suit_update/main.c index 47333c419421..a2995d2ae2d0 100644 --- a/examples/suit_update/main.c +++ b/examples/suit_update/main.c @@ -33,7 +33,7 @@ #include "suit/storage.h" #include "suit/storage/ram.h" -#ifdef BOARD_NATIVE +#ifdef CPU_NATIVE #include "suit/storage/vfs.h" #include "xfa.h" #include "vfs_default.h" @@ -57,7 +57,7 @@ static msg_t _main_msg_queue[MAIN_QUEUE_SIZE]; /* add handled storages */ #if IS_USED(MODULE_SUIT_STORAGE_VFS) XFA_USE(char*, suit_storage_files_reg); -#ifdef BOARD_NATIVE +#ifdef CPU_NATIVE XFA(suit_storage_files_reg, 0) char* _slot0 = VFS_DEFAULT_DATA "/SLOT0.txt"; XFA(suit_storage_files_reg, 1) char* _slot1 = VFS_DEFAULT_DATA "/SLOT1.txt"; #endif diff --git a/examples/suit_update/tests-with-config/01-run.py b/examples/suit_update/tests-with-config/01-run.py index a4c9f86cf28b..beb92657c781 100755 --- a/examples/suit_update/tests-with-config/01-run.py +++ b/examples/suit_update/tests-with-config/01-run.py @@ -140,7 +140,7 @@ def get_reachable_addr(child): # Give some time for the network interface to be configured time.sleep(1) # Get address - if BOARD == "native": + if BOARD in ["native", "native64"]: iface_addr = get_iface_addr(IFACE) network = IPv6Network(iface_addr, strict=False) client_addr = iface_addr @@ -212,7 +212,7 @@ def _test_successful_update(child, client, app_ver): child.expect_exact("Install correct payload") # Wait for reboot on non-native BOARDs - if BOARD != "native": + if BOARD not in ["native", "native64"]: child.expect_exact(REBOOTING_MSG) # Verify client is reachable and get address client = get_reachable_addr(child) diff --git a/examples/suit_update/tests-with-config/check-config.sh b/examples/suit_update/tests-with-config/check-config.sh index 9e202f85d527..583436f439af 100755 --- a/examples/suit_update/tests-with-config/check-config.sh +++ b/examples/suit_update/tests-with-config/check-config.sh @@ -11,7 +11,7 @@ ip link show dev "${IFACE}" > /dev/null RESULT=$? if [ $RESULT -eq 0 ]; then - if [ "${BOARD}" = "native" ]; then + if [ "${BOARD}" = "native" ] || [ "${BOARD}" = "native64" ]; then IFACE_IPV6_ADDR=$(ip -6 addr show dev "${IFACE}"| grep inet6 | \ awk -F '[ \t]+|/' '{print $3}' | grep -v ^::1 | \ grep -v ^fe80) @@ -23,7 +23,7 @@ if [ $RESULT -eq 0 ]; then fi fi -if [ "${BOARD}" = "native" ]; then +if [ "${BOARD}" = "native" ] || [ "${BOARD}" = "native64" ]; then echo "You may be able to create \"${IFACE}\" by using e.g." \ "\`${RIOTTOOLS#${RIOTBASE}/}/tapsetup/tapsetup\`." echo "You can add a routable IPV6 address by using e.g." \ diff --git a/examples/wasm/Makefile b/examples/wasm/Makefile index 3c3102e8e073..abfc41070927 100644 --- a/examples/wasm/Makefile +++ b/examples/wasm/Makefile @@ -7,7 +7,7 @@ RIOTBASE ?= $(CURDIR)/../.. USEPKG += wamr -ifneq ($(BOARD),native) +ifeq (,$(filter native native64,$(BOARD))) CFLAGS += -DTHREAD_STACKSIZE_MAIN='(6 * 1024)' endif diff --git a/makefiles/arch/native.inc.mk b/makefiles/arch/native.inc.mk new file mode 100644 index 000000000000..78cbdbb3f230 --- /dev/null +++ b/makefiles/arch/native.inc.mk @@ -0,0 +1,164 @@ +NATIVEINCLUDES += -DNATIVE_INCLUDES +NATIVEINCLUDES += -I$(RIOTBASE)/core/lib/include/ +NATIVEINCLUDES += -I$(RIOTBASE)/core/include/ +NATIVEINCLUDES += -I$(RIOTBASE)/sys/include/ +NATIVEINCLUDES += -I$(RIOTBASE)/drivers/include/ + +ifeq ($(OS),Darwin) + DEBUGGER ?= lldb +else + DEBUGGER ?= gdb +endif + + +export VALGRIND ?= valgrind +export CGANNOTATE ?= cg_annotate +export GPROF ?= gprof + +# basic cflags: +CFLAGS += -Wall -Wextra -pedantic $(CFLAGS_DBG) $(CFLAGS_OPT) +CFLAGS += -U_FORTIFY_SOURCE +CFLAGS_DBG ?= -g3 + +ifneq (,$(filter backtrace,$(USEMODULE))) + $(warning module backtrace is used, do not omit frame pointers) + CFLAGS_OPT ?= -Og -fno-omit-frame-pointer +else + CFLAGS_OPT ?= -Og +endif + +# default std set to gnu11 if not overwritten by user +ifeq (,$(filter -std=%, $(CFLAGS))) + CFLAGS += -std=gnu11 +endif + +ifeq ($(NATIVE_ARCH_BIT),64) + CFLAGS += -m64 + LINKFLAGS += -m64 +else ifeq ($(NATIVE_ARCH_BIT),32) + CFLAGS += -m32 + LINKFLAGS += -m32 +else + $(error Unsupported native architecture) +endif + +ifneq (,$(filter -DDEVELHELP,$(CFLAGS))) + CFLAGS += -fstack-protector-all +endif +ifeq ($(OS),FreeBSD) + ifeq ($(OS_ARCH),amd64) + ifeq ($(NATIVE_ARCH_BIT),32) + CFLAGS += -DCOMPAT_32BIT -B/usr/lib32 + LINKFLAGS += -DCOMPAT_32BIT -L/usr/lib32 -B/usr/lib32 + endif + endif +endif +ifeq ($(OS),Darwin) + CFLAGS += -Wno-deprecated-declarations +endif + +# unwanted (CXXUWFLAGS) and extra (CXXEXFLAGS) flags for c++ +CXXUWFLAGS += +CXXEXFLAGS += + +ifeq ($(OS),FreeBSD) + LINKFLAGS += -L $(BINDIR) +else + LINKFLAGS += -ldl +endif + +# XFA (cross file array) support +LINKFLAGS += -T$(RIOTBASE)/cpu/native/ldscripts/xfa.ld + +# fix this warning: +# ``` +# /usr/bin/ld: examples/hello-world/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 +# ``` +LINKFLAGS += -no-pie + +# clean up unused functions +CFLAGS += -ffunction-sections -fdata-sections +ifeq ($(OS),Darwin) + LINKFLAGS += -Wl,-dead_strip +else + LINKFLAGS += -Wl,--gc-sections +endif +LINKFLAGS += -ffunction-sections + + +ASFLAGS = +ifeq ($(shell basename $(DEBUGGER)),lldb) + DEBUGGER_FLAGS = -- $(ELFFILE) $(TERMFLAGS) +else + DEBUGGER_FLAGS = -q --args $(ELFFILE) $(TERMFLAGS) +endif +term-valgrind: export VALGRIND_FLAGS ?= \ + --leak-check=full \ + --track-origins=yes \ + --fullpath-after=$(RIOTBASE)/ \ + --read-var-info=yes +debug-valgrind-server: export VALGRIND_FLAGS ?= --vgdb=yes --vgdb-error=0 -v \ + --leak-check=full --track-origins=yes --fullpath-after=$(RIOTBASE) \ + --read-var-info=yes +term-cachegrind: export CACHEGRIND_FLAGS += --tool=cachegrind +term-gprof: TERMPROG = GMON_OUT_PREFIX=gmon.out $(ELFFILE) +all-valgrind: CFLAGS += -DHAVE_VALGRIND_H +all-valgrind: NATIVEINCLUDES += $(shell pkg-config valgrind --cflags) +all-gprof: CFLAGS += -pg +all-gprof: LINKFLAGS += -pg + +CFLAGS_ASAN += -fsanitize=address -fno-omit-frame-pointer -DNATIVE_MEMORY +LINKFLAGS_ASAN += -fsanitize=address -fno-omit-frame-pointer +all-asan: CFLAGS += $(CFLAGS_ASAN) +all-asan: LINKFLAGS += $(LINKFLAGS_ASAN) +all-asan: export AFL_USE_ASAN=1 + +INCLUDES += $(NATIVEINCLUDES) + +CFLAGS += -DDEBUG_ASSERT_VERBOSE + +# workaround for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52624 +ifneq ($(shell gcc --version | head -1 | grep -E ' (4.6|4.7)'),) + CFLAGS += -DHAVE_NO_BUILTIN_BSWAP16 +endif + +# clumsy way to enable building native on osx: +BUILDOSXNATIVE = 0 +ifeq ($(CPU),native) + ifeq ($(OS),Darwin) + BUILDOSXNATIVE = 1 + endif +endif + +all: # do not override first target + +all-gprof: all + +all-asan: all + +all-valgrind: all + +all-cachegrind: all + +term-valgrind: + $(VALGRIND) $(VALGRIND_FLAGS) $(ELFFILE) $(PORT) + +debug-valgrind-server: + $(VALGRIND) $(VALGRIND_FLAGS) $(ELFFILE) $(PORT) + +debug-valgrind: + $(eval VALGRIND_PID ?= $(shell pgrep -n memcheck-x86-li -u $(USER) | cut -d" " -f1)) + $(eval DEBUGGER_FLAGS := -ex "target remote | vgdb --pid=$(VALGRIND_PID)" $(DEBUGGER_FLAGS)) + $(DEBUGGER) $(DEBUGGER_FLAGS) + +term-cachegrind: + $(VALGRIND) $(CACHEGRIND_FLAGS) $(ELFFILE) $(PORT) + +term-gprof: term + +eval-gprof: + $(GPROF) $(ELFFILE) $(shell ls -rt gmon.out* | tail -1) + +eval-cachegrind: + $(CGANNOTATE) $(shell ls -rt cachegrind.out* | tail -1) diff --git a/makefiles/ubsan.inc.mk b/makefiles/ubsan.inc.mk index ff2cdbc98019..53850d65310c 100644 --- a/makefiles/ubsan.inc.mk +++ b/makefiles/ubsan.inc.mk @@ -11,7 +11,7 @@ UBSAN_MODE ?= msg_exit CFLAGS_UBSAN = -fsanitize=undefined ifeq (gnu,$(TOOLCHAIN)) - ifeq (native,$(BOARD)) + ifeq (native,$(CPU)) ifneq (,$(filter msg_%,$(UBSAN_MODE))) LINKFLAGS_UBSAN += -lubsan ifneq (msg_recover,$(UBSAN_MODE)) diff --git a/pkg/flashdb/Makefile.dep b/pkg/flashdb/Makefile.dep index e85e9b7ac89d..d5b99a416ed0 100644 --- a/pkg/flashdb/Makefile.dep +++ b/pkg/flashdb/Makefile.dep @@ -24,7 +24,7 @@ ifneq (,$(filter flashdb_mtd,$(USEMODULE))) USEMODULE += flashdb_fal USEMODULE += mtd else - ifeq (native, $(BOARD)) + ifeq ($(CPU),native) CFLAGS += -DFDB_USING_FILE_POSIX_MODE else CFLAGS += -DFDB_USING_FILE_LIBC_MODE diff --git a/pkg/jerryscript/Makefile b/pkg/jerryscript/Makefile index a8afa8d7871f..e1a968ad02d3 100644 --- a/pkg/jerryscript/Makefile +++ b/pkg/jerryscript/Makefile @@ -16,10 +16,10 @@ EXT_CFLAGS := -D__TARGET_RIOT CFLAGS += -Wno-cast-align # disable warnings when compiling with LLVM for board native -ifeq ($(TOOLCHAIN)_$(BOARD),llvm_native) +ifeq ($(TOOLCHAIN)_$(CPU),llvm_native) CFLAGS += -Wno-macro-redefined -Wno-gnu-folding-constant EXT_CFLAGS += -Wno-conversion -else ifeq ($(OS)_$(BOARD),FreeBSD_native) +else ifeq ($(OS)_$(CPU),FreeBSD_native) EXT_CFLAGS += -Wno-conversion else ifeq (esp32,$(CPU)) # The ESP-IDF uses #include_next that causes errors when compiling with warnings diff --git a/pkg/libsocketcan/Kconfig b/pkg/libsocketcan/Kconfig index a5751cda0ac6..4b1d996ba56d 100644 --- a/pkg/libsocketcan/Kconfig +++ b/pkg/libsocketcan/Kconfig @@ -6,5 +6,5 @@ # config PACKAGE_LIBSOCKETCAN - bool "libsocketcan2 32bit for native Linux builds" - depends on BOARD_NATIVE + bool "libsocketcan2 for native Linux builds" + depends on HAS_ARCH_NATIVE diff --git a/pkg/tlsf/Kconfig b/pkg/tlsf/Kconfig index f6b34d41b2f4..0a944fcc2d21 100644 --- a/pkg/tlsf/Kconfig +++ b/pkg/tlsf/Kconfig @@ -16,9 +16,9 @@ if PACKAGE_TLSF config MODULE_TLSF_MALLOC bool "TLSF malloc" - depends on MODULE_NEWLIB || BOARD_NATIVE + depends on MODULE_NEWLIB || HAS_ARCH_NATIVE select MODULE_TLSF_MALLOC_NEWLIB if MODULE_NEWLIB - select MODULE_TLSF_MALLOC_NATIVE if BOARD_NATIVE + select MODULE_TLSF_MALLOC_NATIVE if HAS_ARCH_NATIVE config MODULE_TLSF_MALLOC_NEWLIB bool diff --git a/pkg/tlsf/Makefile.dep b/pkg/tlsf/Makefile.dep index 448c5d76a545..3e1709880f75 100644 --- a/pkg/tlsf/Makefile.dep +++ b/pkg/tlsf/Makefile.dep @@ -1,7 +1,7 @@ ifneq (,$(filter tlsf-malloc,$(USEMODULE))) ifneq (,$(filter newlib,$(USEMODULE))) USEMODULE += tlsf-malloc_newlib - else ifneq (,$(filter native,$(BOARD))) + else ifneq (,$(filter native,$(CPU))) USEMODULE += tlsf-malloc_native else $(warning tlsf-malloc can only be used on native or on platforms using newlib) diff --git a/pkg/utensor/patches/0002-fix-mbed-specific-code.patch b/pkg/utensor/patches/0002-fix-mbed-specific-code.patch index 3c6b7e60a4e6..f841ace0d789 100644 --- a/pkg/utensor/patches/0002-fix-mbed-specific-code.patch +++ b/pkg/utensor/patches/0002-fix-mbed-specific-code.patch @@ -15,7 +15,7 @@ index 4d1dd48..32c50df 100644 @@ -1,5 +1,5 @@ #include "src/uTensor/util/uTensor_util.hpp" -#if !(defined(TARGET_MBED) || defined(ARDUINO)) -+#ifdef BOARD_NATIVE ++#ifdef CPU_NATIVE #include #include #endif @@ -24,7 +24,7 @@ index 4d1dd48..32c50df 100644 } -#ifdef ARDUINO -+#ifndef BOARD_NATIVE ++#ifndef CPU_NATIVE void int_env() { } #else diff --git a/pkg/wolfssl/Makefile.wolfcrypt b/pkg/wolfssl/Makefile.wolfcrypt index dc84c88e44d7..526cd3654570 100644 --- a/pkg/wolfssl/Makefile.wolfcrypt +++ b/pkg/wolfssl/Makefile.wolfcrypt @@ -6,7 +6,7 @@ ifeq (llvm,$(TOOLCHAIN)) CFLAGS += -Wno-unused-parameter endif -ifeq (native,$(BOARD)) +ifeq (native,$(CPU)) CFLAGS += -Wno-array-parameter endif diff --git a/sys/Makefile.include b/sys/Makefile.include index 450b3fe40180..9464ca2df77d 100644 --- a/sys/Makefile.include +++ b/sys/Makefile.include @@ -135,7 +135,7 @@ ifneq (,$(filter ssp,$(USEMODULE))) include $(RIOTBASE)/sys/ssp/Makefile.include endif -ifneq (native,$(BOARD)) +ifneq (native,$(CPU)) INCLUDES += -I$(RIOTBASE)/sys/libc/include endif diff --git a/sys/psa_crypto/psa_key_slot_mgmt/psa_crypto_slot_management.c b/sys/psa_crypto/psa_key_slot_mgmt/psa_crypto_slot_management.c index fc905c0e637b..48ef1cf841bf 100644 --- a/sys/psa_crypto/psa_key_slot_mgmt/psa_crypto_slot_management.c +++ b/sys/psa_crypto/psa_key_slot_mgmt/psa_crypto_slot_management.c @@ -20,6 +20,7 @@ #include "clist.h" #include "psa_crypto_slot_management.h" +#include "architecture.h" #define ENABLE_DEBUG 0 #include "debug.h" @@ -146,10 +147,10 @@ void psa_init_key_slots(void) clist_rpush(&protected_list_empty, &protected_key_slots[i].node); } - DEBUG("Protected Slot Count: %d, Size: %d\n", PSA_PROTECTED_KEY_COUNT, + DEBUG("Protected Slot Count: %d, Size: %" PRIuSIZE "\n", PSA_PROTECTED_KEY_COUNT, sizeof(psa_prot_key_slot_t)); - DEBUG("Protected Slot Array Size: %d\n", sizeof(protected_key_slots)); - DEBUG("Protected Slot Empty List Size: %d\n", clist_count(&protected_list_empty)); + DEBUG("Protected Slot Array Size: %" PRIuSIZE "\n", sizeof(protected_key_slots)); + DEBUG("Protected Slot Empty List Size: %" PRIuSIZE "\n", clist_count(&protected_list_empty)); #endif /* PSA_PROTECTED_KEY_COUNT */ #if PSA_ASYMMETRIC_KEYPAIR_COUNT @@ -159,10 +160,10 @@ void psa_init_key_slots(void) clist_rpush(&key_pair_list_empty, &key_pair_slots[i].node); } - DEBUG("Asymmetric Slot Count: %d, Size: %d\n", PSA_ASYMMETRIC_KEYPAIR_COUNT, + DEBUG("Asymmetric Slot Count: %d, Size: %" PRIuSIZE "\n", PSA_ASYMMETRIC_KEYPAIR_COUNT, sizeof(psa_key_pair_slot_t)); - DEBUG("Asymmetric Slot Array Size: %d\n", sizeof(key_pair_slots)); - DEBUG("Asymmetric Slot Empty List Size: %d\n", clist_count(&key_pair_list_empty)); + DEBUG("Asymmetric Slot Array Size: %" PRIuSIZE "\n", sizeof(key_pair_slots)); + DEBUG("Asymmetric Slot Empty List Size: %" PRIuSIZE "\n", clist_count(&key_pair_list_empty)); #endif /* PSA_ASYMMETRIC_KEYPAIR_COUNT */ #if PSA_SINGLE_KEY_COUNT @@ -172,9 +173,10 @@ void psa_init_key_slots(void) clist_rpush(&single_key_list_empty, &single_key_slots[i].node); } - DEBUG("Single Key Slot Count: %d, Size: %d\n", PSA_SINGLE_KEY_COUNT, sizeof(psa_key_slot_t)); - DEBUG("Single Key Slot Array Size: %d\n", sizeof(single_key_slots)); - DEBUG("Single Key Slot Empty List Size: %d\n", clist_count(&single_key_list_empty)); + DEBUG("Single Key Slot Count: %d, Size: %" PRIuSIZE "\n", PSA_SINGLE_KEY_COUNT, + sizeof(psa_key_slot_t)); + DEBUG("Single Key Slot Array Size: %" PRIuSIZE "\n", sizeof(single_key_slots)); + DEBUG("Single Key Slot Empty List Size: %" PRIuSIZE "\n", clist_count(&single_key_list_empty)); #endif /* PSA_SINGLE_KEY_COUNT */ } diff --git a/sys/vfs/Makefile.dep b/sys/vfs/Makefile.dep index 2b18ae475188..2297d62c1df7 100644 --- a/sys/vfs/Makefile.dep +++ b/sys/vfs/Makefile.dep @@ -4,6 +4,6 @@ ifneq (,$(filter vfs_default,$(USEMODULE))) DEFAULT_MODULE += vfs_auto_mount endif -ifeq (native, $(BOARD)) +ifeq (native,$(CPU)) USEMODULE += native_vfs endif diff --git a/tests/Makefile.boards.netif b/tests/Makefile.boards.netif index b9e6626388f4..036c0f612f0d 100644 --- a/tests/Makefile.boards.netif +++ b/tests/Makefile.boards.netif @@ -26,6 +26,7 @@ BOARD_PROVIDES_NETIF := \ msba2 \ mulle \ native \ + native64 \ nrf51dk \ nrf51dongle \ nrf52840-mdk \ diff --git a/tests/bench/runtime_coreapis/Makefile b/tests/bench/runtime_coreapis/Makefile index eec0fbce6f2c..3c42b65f82f6 100644 --- a/tests/bench/runtime_coreapis/Makefile +++ b/tests/bench/runtime_coreapis/Makefile @@ -7,7 +7,7 @@ USEMODULE += benchmark ifeq (llvm,$(TOOLCHAIN)) # the floating point exception bug is more likely to trigger when build # with LLVM, so we just disable LLVM on native as a work around - TEST_ON_CI_BLACKLIST += native + TEST_ON_CI_BLACKLIST += native native64 endif include $(RIOTBASE)/Makefile.include diff --git a/tests/bench/timers/Makefile b/tests/bench/timers/Makefile index 4b58f1a7971a..c9ebf6fa310b 100644 --- a/tests/bench/timers/Makefile +++ b/tests/bench/timers/Makefile @@ -4,6 +4,7 @@ include ../Makefile.bench_common # CFLAGS configuration to build properly SINGLE_TIMER_BOARDS = \ native \ + native64 \ nucleo-f031k6 \ nucleo-f042k6 \ # diff --git a/tests/build_system/external_board_native/Makefile b/tests/build_system/external_board_native/Makefile index c52e75149be2..05a3ee3cea00 100644 --- a/tests/build_system/external_board_native/Makefile +++ b/tests/build_system/external_board_native/Makefile @@ -14,6 +14,6 @@ BOARD ?= native FEATURES_REQUIRED += arch_native # Set without '?=' to also verify the docker integration when set with = -BOARDSDIR = $(CURDIR)/external_boards +EXTERNAL_BOARD_DIRS = $(CURDIR)/external_boards include $(RIOTBASE)/Makefile.include diff --git a/tests/build_system/external_board_native/external_boards/native64 b/tests/build_system/external_board_native/external_boards/native64 new file mode 120000 index 000000000000..9b01495acc34 --- /dev/null +++ b/tests/build_system/external_board_native/external_boards/native64 @@ -0,0 +1 @@ +native \ No newline at end of file diff --git a/tests/build_system/external_board_native/tests/01-run.py b/tests/build_system/external_board_native/tests/01-run.py index bc2ac219f4e5..e8b4d51a5ad5 100755 --- a/tests/build_system/external_board_native/tests/01-run.py +++ b/tests/build_system/external_board_native/tests/01-run.py @@ -7,12 +7,14 @@ # directory for more details. import sys +import os from testrunner import run def testfunc(child): + board = os.environ['BOARD'] child.expect_exact("Hello World!") - child.expect_exact("You are running RIOT on a(n) native board.") + child.expect_exact(f"You are running RIOT on a(n) {board} board.") child.expect_exact("THIS_BOARD_IS external_native") child.expect_exact("This board is 'An external extended native") print("Test successful!!") diff --git a/tests/build_system/utils/Makefile b/tests/build_system/utils/Makefile index c7309feb7780..cbfddae65651 100644 --- a/tests/build_system/utils/Makefile +++ b/tests/build_system/utils/Makefile @@ -1,4 +1,4 @@ -BOARD_WHITELIST = native +BOARD_WHITELIST = native native64 include ../Makefile.build_system_common include $(RIOTBASE)/Makefile.include diff --git a/tests/core/msg_queue_print/tests/01-run.py b/tests/core/msg_queue_print/tests/01-run.py index d1baf78a4c4d..2fa59ddff0ed 100755 --- a/tests/core/msg_queue_print/tests/01-run.py +++ b/tests/core/msg_queue_print/tests/01-run.py @@ -18,7 +18,7 @@ def testfunc(child): child.expect("No messages or no message queue") child.expect(r"Message queue of thread \d+\r\n") child.expect_exact('size: 8 (avail: 8)') - if os.environ.get('BOARD') == 'native': + if os.environ.get('BOARD') in ['native', 'native64']: child.expect_exact('type: 0x0000, content: 0 ((nil))') else: child.expect(r'type: 0x0000, content: 0 \((0x)?0+\)') diff --git a/tests/core/mutex_unlock_and_sleep/main.c b/tests/core/mutex_unlock_and_sleep/main.c index 3ef949f78056..90bd91e6a0af 100644 --- a/tests/core/mutex_unlock_and_sleep/main.c +++ b/tests/core/mutex_unlock_and_sleep/main.c @@ -27,7 +27,7 @@ static volatile int indicator; static kernel_pid_t main_pid; static char stack[THREAD_STACKSIZE_DEFAULT]; -#ifdef BOARD_NATIVE +#ifdef CPU_NATIVE static const unsigned KITERATIONS = 100; #else static const unsigned KITERATIONS = 10; diff --git a/tests/core/thread_float/Makefile b/tests/core/thread_float/Makefile index 58b0d218d533..180c0996c131 100644 --- a/tests/core/thread_float/Makefile +++ b/tests/core/thread_float/Makefile @@ -6,7 +6,7 @@ USEMODULE += ztimer_usec # native has known issues: the context switch via glibc's setcontext() # apparently doesn't properly save and restore the FPU state. This results in # occasionally wrong results (often nan) being printed for the same calculation -TEST_ON_CI_BLACKLIST += native +TEST_ON_CI_BLACKLIST += native native64 #DISABLE_MODULE += cortexm_fpu diff --git a/tests/cpu/native_backtrace/Makefile b/tests/cpu/native_backtrace/Makefile index 4555e942a1b9..d794fa0f488c 100644 --- a/tests/cpu/native_backtrace/Makefile +++ b/tests/cpu/native_backtrace/Makefile @@ -2,7 +2,7 @@ include ../Makefile.cpu_common USEMODULE += backtrace -BOARD_WHITELIST := native +BOARD_WHITELIST := native native64 # Tests if native returns a backtrace of size three. # The following function should be included in the backtrace: diff --git a/tests/drivers/candev/Makefile.board.dep b/tests/drivers/candev/Makefile.board.dep index 305c2a40a51a..46eda88fd426 100644 --- a/tests/drivers/candev/Makefile.board.dep +++ b/tests/drivers/candev/Makefile.board.dep @@ -1,4 +1,4 @@ -ifneq (,$(filter native,$(BOARD))) +ifneq (,$(filter native native64,$(BOARD))) CAN_DRIVER ?= PERIPH_CAN endif diff --git a/tests/drivers/grove_ledbar/Makefile b/tests/drivers/grove_ledbar/Makefile index 7e7a1121e532..d554db8ca09e 100644 --- a/tests/drivers/grove_ledbar/Makefile +++ b/tests/drivers/grove_ledbar/Makefile @@ -3,7 +3,7 @@ include ../Makefile.drivers_common USEMODULE += grove_ledbar # disable native GPIOs for automatic test -ifeq (native,$(BOARD)) +ifneq (,$(filter native native64,$(BOARD))) USEMODULE += periph_gpio_mock # the same for Kconfig ifeq (1,$(TEST_KCONFIG)) diff --git a/tests/drivers/hd44780/Makefile b/tests/drivers/hd44780/Makefile index e9c4cfad6165..dadfdcc22749 100644 --- a/tests/drivers/hd44780/Makefile +++ b/tests/drivers/hd44780/Makefile @@ -3,7 +3,7 @@ include ../Makefile.drivers_common USEMODULE += hd44780 # disable native GPIOs for automatic test -ifeq (native,$(BOARD)) +ifneq (,$(filter native native64,$(BOARD))) USEMODULE += periph_gpio_mock # the same for Kconfig ifeq (1,$(TEST_KCONFIG)) diff --git a/tests/drivers/mrf24j40/Makefile b/tests/drivers/mrf24j40/Makefile index 0b237ffa1c47..21d76f78290a 100644 --- a/tests/drivers/mrf24j40/Makefile +++ b/tests/drivers/mrf24j40/Makefile @@ -12,6 +12,7 @@ BOARD_WHITELIST += adafruit-clue \ cc2538dk \ feather-nrf52840 \ native \ + native64 \ nrf52840dk \ nrf52840dongle \ nrf52840-mdk \ diff --git a/tests/drivers/my9221/Makefile b/tests/drivers/my9221/Makefile index 8b85fb1cecd2..c93b73d88d05 100644 --- a/tests/drivers/my9221/Makefile +++ b/tests/drivers/my9221/Makefile @@ -3,7 +3,7 @@ include ../Makefile.drivers_common USEMODULE += my9221 # disable native GPIOs for automatic test -ifeq (native,$(BOARD)) +ifneq (,$(filter native native64,$(BOARD))) USEMODULE += periph_gpio_mock # the same for Kconfig ifeq (1,$(TEST_KCONFIG)) diff --git a/tests/minimal/Makefile b/tests/minimal/Makefile index 32948e035990..e120dd01ba0d 100644 --- a/tests/minimal/Makefile +++ b/tests/minimal/Makefile @@ -10,7 +10,7 @@ DISABLE_MODULE += test_utils_print_stack_usage USEMODULE += stdio_null # adjust stack sizes to very small values -ifneq (native,$(BOARD)) +ifeq (,$(filter native native64,$(BOARD))) CFLAGS += -DTHREAD_STACKSIZE_MAIN=256 -DTHREAD_STACKSIZE_IDLE=128 endif diff --git a/tests/net/emcute/Makefile b/tests/net/emcute/Makefile index 65d2f98e6915..1c06a2b70b61 100644 --- a/tests/net/emcute/Makefile +++ b/tests/net/emcute/Makefile @@ -5,7 +5,7 @@ RIOTBASE ?= $(CURDIR)/../.. export TAP ?= tap0 # use Ethernet as link-layer protocol -ifeq (native,$(BOARD)) +ifneq (,$(filter native native64,$(BOARD))) PORT ?= $(TAP) else ETHOS_BAUDRATE ?= 115200 diff --git a/tests/net/emcute/Makefile.board.dep b/tests/net/emcute/Makefile.board.dep index b595b8605ca1..bb4275e0610f 100644 --- a/tests/net/emcute/Makefile.board.dep +++ b/tests/net/emcute/Makefile.board.dep @@ -1,5 +1,5 @@ # Put board specific dependencies here -ifeq (native,$(BOARD)) +ifneq (,$(filter native native64,$(BOARD))) USEMODULE += netdev_tap else USEMODULE += stdio_ethos diff --git a/tests/net/gcoap_dns/Makefile b/tests/net/gcoap_dns/Makefile index e8484c1c7a21..db2da5e72857 100644 --- a/tests/net/gcoap_dns/Makefile +++ b/tests/net/gcoap_dns/Makefile @@ -27,7 +27,7 @@ CFLAGS += -DHAS_SOCK_DNS_MOCK=1 include $(RIOTBASE)/Makefile.include -ifeq (native,$(BOARD)) +ifneq (,$(filter native native64,$(BOARD))) test: PORT= $(call target-export-variables,test,PORT) endif diff --git a/tests/net/gcoap_fileserver/Makefile b/tests/net/gcoap_fileserver/Makefile index 47dd35fc483e..ebe7f785c399 100644 --- a/tests/net/gcoap_fileserver/Makefile +++ b/tests/net/gcoap_fileserver/Makefile @@ -26,14 +26,14 @@ USEMODULE += shell_cmd_md5sum TEST_ON_CI_BLACKLIST += all # automated test only works on native -# TEST_ON_CI_WHITELIST += native +# TEST_ON_CI_WHITELIST += native native64 # use small blocksize for test to increase chance for errors CFLAGS += -DCONFIG_NANOCOAP_BLOCKSIZE_DEFAULT=COAP_BLOCKSIZE_16 CFLAGS += -DCONFIG_COAP_ACK_TIMEOUT_MS=100UL CFLAGS += -DCONFIG_COAP_MAX_RETRANSMIT=10 -ifeq (native, $(BOARD)) +ifneq (,$(filter native native64,$(BOARD))) USEMODULE += socket_zep USEMODULE += socket_zep_hello USEMODULE += netdev diff --git a/tests/net/gcoap_fileserver/tests/01-run.py b/tests/net/gcoap_fileserver/tests/01-run.py index 00190351d87f..954807bc7dc9 100755 --- a/tests/net/gcoap_fileserver/tests/01-run.py +++ b/tests/net/gcoap_fileserver/tests/01-run.py @@ -9,6 +9,7 @@ import os import subprocess import time +import sys from subprocess import Popen from riotctrl_shell.gnrc import GNRCICMPv6Echo, GNRCICMPv6EchoParser @@ -27,10 +28,11 @@ class RIOTCtrlAppFactory(RIOTCtrlBoardFactory): - def __init__(self): + def __init__(self, board='native'): super().__init__(board_cls={ - 'native': native.NativeRIOTCtrl, + board: native.NativeRIOTCtrl, }) + self.board = board self.ctrl_list = list() def __enter__(self): @@ -40,7 +42,9 @@ def __exit__(self, *exc): for ctrl in self.ctrl_list: ctrl.stop_term() - def get_shell(self, application_directory='.', env={'BOARD': 'native'}): + def get_shell(self, application_directory='.', env=None): + if env is None: + env = {'BOARD': self.board} # retrieve a RIOTCtrl Object ctrl = super().get_ctrl( env=env, @@ -131,5 +135,11 @@ def run_test(func, factory): if __name__ == "__main__": - with RIOTCtrlAppFactory() as factory: + board = os.environ.get('BOARD', 'native') + if board not in ['native', 'native64']: + print('\x1b[1;31mThis test requires a native board.\x1b[0m\n', + file=sys.stderr) + sys.exit(1) + + with RIOTCtrlAppFactory(board) as factory: run_test(test_linear_topology, factory) diff --git a/tests/net/gnrc_dhcpv6_client/Makefile b/tests/net/gnrc_dhcpv6_client/Makefile index 8be6020453ea..109444ec9073 100644 --- a/tests/net/gnrc_dhcpv6_client/Makefile +++ b/tests/net/gnrc_dhcpv6_client/Makefile @@ -13,7 +13,7 @@ USEMODULE += dhcpv6_client_ia_na USEMODULE += gnrc_dhcpv6_client USEMODULE += gnrc_ipv6_default USEMODULE += xtimer -ifneq (,$(filter native,$(BOARD))) +ifneq (,$(filter native native64,$(BOARD))) # Has to be provided here and not in Makefile.dep, so TERMFLAGS are properly # configured USEMODULE += netdev_default @@ -50,7 +50,7 @@ dhcpv6_server: dhcpv6_server: $(CURDIR)/dhcpv6_server.sh $(DHCPV6_SERVER_PORT) $(CURDIR)/kea-dhcp6.conf -ifeq (,$(filter native,$(BOARD))) +ifeq (,$(filter native native64,$(BOARD))) .PHONY: ethos ethos: diff --git a/tests/net/gnrc_dhcpv6_client/Makefile.board.dep b/tests/net/gnrc_dhcpv6_client/Makefile.board.dep index c6c89a0bde20..62b1c65579db 100644 --- a/tests/net/gnrc_dhcpv6_client/Makefile.board.dep +++ b/tests/net/gnrc_dhcpv6_client/Makefile.board.dep @@ -1,3 +1,3 @@ -ifneq (native,$(BOARD)) +ifeq (,$(filter native native64,$(BOARD))) USEMODULE += stdio_ethos endif diff --git a/tests/net/gnrc_dhcpv6_client_6lbr/Makefile b/tests/net/gnrc_dhcpv6_client_6lbr/Makefile index 6fbf4da34f3e..e51e10d6b8dd 100644 --- a/tests/net/gnrc_dhcpv6_client_6lbr/Makefile +++ b/tests/net/gnrc_dhcpv6_client_6lbr/Makefile @@ -14,7 +14,7 @@ USEMODULE += shell USEMODULE += shell_cmds_default # use Ethernet as link-layer protocol -ifeq (native,$(BOARD)) +ifneq (,$(filter native native64,$(BOARD))) TERMFLAGS += -z [::1]:17754 else ETHOS_BAUDRATE ?= 115200 @@ -44,7 +44,7 @@ ifeq (1,$(STATIC_ROUTES)) endif endif -ifeq (,$(filter native,$(BOARD))) +ifeq (,$(filter native native64,$(BOARD))) .PHONY: ethos ethos: diff --git a/tests/net/gnrc_dhcpv6_client_6lbr/Makefile.board.dep b/tests/net/gnrc_dhcpv6_client_6lbr/Makefile.board.dep index d63fc3dc5549..1d5d38494d92 100644 --- a/tests/net/gnrc_dhcpv6_client_6lbr/Makefile.board.dep +++ b/tests/net/gnrc_dhcpv6_client_6lbr/Makefile.board.dep @@ -1,5 +1,5 @@ # Put board specific dependencies here -ifeq (native,$(BOARD)) +ifneq (,$(filter native native64,$(BOARD))) USEMODULE += netdev_tap USEMODULE += socket_zep else diff --git a/tests/net/gnrc_dhcpv6_client_stateless/Makefile b/tests/net/gnrc_dhcpv6_client_stateless/Makefile index 7c92841c1710..012bd7f5e177 100644 --- a/tests/net/gnrc_dhcpv6_client_stateless/Makefile +++ b/tests/net/gnrc_dhcpv6_client_stateless/Makefile @@ -15,7 +15,7 @@ USEMODULE += shell USEMODULE += shell_cmds_default # use Ethernet as link-layer protocol -ifeq (native,$(BOARD)) +ifneq (,$(filter native native64,$(BOARD))) # Has to be provided here and not in Makefile.dep, so TERMFLAGS are properly # configured USEMODULE += netdev_default @@ -40,7 +40,7 @@ SHOULD_RUN_KCONFIG ?= include $(RIOTBASE)/Makefile.include -ifeq (,$(filter native,$(BOARD))) +ifeq (,$(filter native native64,$(BOARD))) .PHONY: ethos ethos: diff --git a/tests/net/gnrc_dhcpv6_client_stateless/Makefile.board.dep b/tests/net/gnrc_dhcpv6_client_stateless/Makefile.board.dep index 32b35c7d5488..ed19187d9ade 100644 --- a/tests/net/gnrc_dhcpv6_client_stateless/Makefile.board.dep +++ b/tests/net/gnrc_dhcpv6_client_stateless/Makefile.board.dep @@ -1,4 +1,4 @@ # Put board specific dependencies here -ifneq (native,$(BOARD)) +ifeq (,$(filter native native64,$(BOARD))) USEMODULE += stdio_ethos endif diff --git a/tests/net/gnrc_dhcpv6_relay/Makefile b/tests/net/gnrc_dhcpv6_relay/Makefile index 4376191ab6c1..5ebf23495614 100644 --- a/tests/net/gnrc_dhcpv6_relay/Makefile +++ b/tests/net/gnrc_dhcpv6_relay/Makefile @@ -11,7 +11,7 @@ USEMODULE += gnrc_netif_single # Only one interface used and it makes # shell commands easier # use Ethernet as link-layer protocol -ifeq (native,$(BOARD)) +ifneq (,$(filter native native64,$(BOARD))) PORT ?= $(TAP) else ETHOS_BAUDRATE ?= 115200 diff --git a/tests/net/gnrc_dhcpv6_relay/Makefile.board.dep b/tests/net/gnrc_dhcpv6_relay/Makefile.board.dep index b595b8605ca1..bb4275e0610f 100644 --- a/tests/net/gnrc_dhcpv6_relay/Makefile.board.dep +++ b/tests/net/gnrc_dhcpv6_relay/Makefile.board.dep @@ -1,5 +1,5 @@ # Put board specific dependencies here -ifeq (native,$(BOARD)) +ifneq (,$(filter native native64,$(BOARD))) USEMODULE += netdev_tap else USEMODULE += stdio_ethos diff --git a/tests/net/gnrc_dhcpv6_relay/tests-as-root/01-run.py b/tests/net/gnrc_dhcpv6_relay/tests-as-root/01-run.py index 000b301c001a..432b23e32779 100755 --- a/tests/net/gnrc_dhcpv6_relay/tests-as-root/01-run.py +++ b/tests/net/gnrc_dhcpv6_relay/tests-as-root/01-run.py @@ -36,12 +36,8 @@ def setUpClass(cls): super().setUpClass() cls._get_bridge() cls._get_tap_lladdr() - if cls.BOARD == "native": - cls.pre_sniffer_wait = cls.TIMEOUT / 20 - cls.post_sniffer_wait = cls.TIMEOUT / 20 - else: - cls.pre_sniffer_wait = cls.TIMEOUT / 20 - cls.post_sniffer_wait = cls.TIMEOUT / 20 + cls.pre_sniffer_wait = cls.TIMEOUT / 20 + cls.post_sniffer_wait = cls.TIMEOUT / 20 cls._get_node_ifaceid() cls.spawn.sendline('ifconfig') # check if node joined All_DHCP_Relay_Agents_and_Servers diff --git a/tests/net/gnrc_ipv6_ext/Makefile b/tests/net/gnrc_ipv6_ext/Makefile index 6e53ff607bdb..9224a65b7b5a 100644 --- a/tests/net/gnrc_ipv6_ext/Makefile +++ b/tests/net/gnrc_ipv6_ext/Makefile @@ -5,7 +5,7 @@ include ../Makefile.net_common export TAP ?= tap0 # use Ethernet as link-layer protocol -ifeq (native,$(BOARD)) +ifneq (,$(filter native native64,$(BOARD))) PORT ?= $(TAP) else ETHOS_BAUDRATE ?= 115200 diff --git a/tests/net/gnrc_ipv6_ext/Makefile.board.dep b/tests/net/gnrc_ipv6_ext/Makefile.board.dep index b595b8605ca1..bb4275e0610f 100644 --- a/tests/net/gnrc_ipv6_ext/Makefile.board.dep +++ b/tests/net/gnrc_ipv6_ext/Makefile.board.dep @@ -1,5 +1,5 @@ # Put board specific dependencies here -ifeq (native,$(BOARD)) +ifneq (,$(filter native native64,$(BOARD))) USEMODULE += netdev_tap else USEMODULE += stdio_ethos diff --git a/tests/net/gnrc_ipv6_ext_frag/Makefile b/tests/net/gnrc_ipv6_ext_frag/Makefile index 7a7a22491add..22ae0c264482 100644 --- a/tests/net/gnrc_ipv6_ext_frag/Makefile +++ b/tests/net/gnrc_ipv6_ext_frag/Makefile @@ -7,7 +7,7 @@ export TAP ?= tap0 CFLAGS += -DOUTPUT=TEXT CFLAGS += -DTEST_SUITES="gnrc_ipv6_ext_frag" -ifeq (native,$(BOARD)) +ifneq (,$(filter native native64,$(BOARD))) PORT ?= $(TAP) else ETHOS_BAUDRATE ?= 115200 diff --git a/tests/net/gnrc_ipv6_ext_frag/Makefile.board.dep b/tests/net/gnrc_ipv6_ext_frag/Makefile.board.dep index b595b8605ca1..bb4275e0610f 100644 --- a/tests/net/gnrc_ipv6_ext_frag/Makefile.board.dep +++ b/tests/net/gnrc_ipv6_ext_frag/Makefile.board.dep @@ -1,5 +1,5 @@ # Put board specific dependencies here -ifeq (native,$(BOARD)) +ifneq (,$(filter native native64,$(BOARD))) USEMODULE += netdev_tap else USEMODULE += stdio_ethos diff --git a/tests/net/gnrc_ipv6_ext_frag/tests-as-root/01-run.py b/tests/net/gnrc_ipv6_ext_frag/tests-as-root/01-run.py index 65e53d39c4d2..e457cc01169c 100755 --- a/tests/net/gnrc_ipv6_ext_frag/tests-as-root/01-run.py +++ b/tests/net/gnrc_ipv6_ext_frag/tests-as-root/01-run.py @@ -379,7 +379,7 @@ def run_sock_test(func, s): run_sock_test(test_ipv6_ext_frag_fwd_success, s) run_sock_test(test_ipv6_ext_frag_fwd_too_big, s) - if os.environ.get("BOARD", "") != "native": + if not os.environ.get("BOARD", "") in ["native", "native64"]: # ethos currently can't handle the larger, rapidly sent packets by the # IPv6 fragmentation of the Linux Kernel print("SUCCESS") diff --git a/tests/net/gnrc_ipv6_ext_opt/Makefile b/tests/net/gnrc_ipv6_ext_opt/Makefile index e6c4bb403ed6..a015923b84ef 100644 --- a/tests/net/gnrc_ipv6_ext_opt/Makefile +++ b/tests/net/gnrc_ipv6_ext_opt/Makefile @@ -5,7 +5,7 @@ include ../Makefile.net_common export TAP ?= tap0 # use Ethernet as link-layer protocol -ifeq (native,$(BOARD)) +ifneq (,$(filter native native64,$(BOARD))) PORT ?= $(TAP) else ETHOS_BAUDRATE ?= 115200 diff --git a/tests/net/gnrc_ipv6_ext_opt/Makefile.board.dep b/tests/net/gnrc_ipv6_ext_opt/Makefile.board.dep index b595b8605ca1..bb4275e0610f 100644 --- a/tests/net/gnrc_ipv6_ext_opt/Makefile.board.dep +++ b/tests/net/gnrc_ipv6_ext_opt/Makefile.board.dep @@ -1,5 +1,5 @@ # Put board specific dependencies here -ifeq (native,$(BOARD)) +ifneq (,$(filter native native64,$(BOARD))) USEMODULE += netdev_tap else USEMODULE += stdio_ethos diff --git a/tests/net/gnrc_ipv6_nib_dns/Makefile b/tests/net/gnrc_ipv6_nib_dns/Makefile index fe5e3792f1d9..4229527e4ce3 100644 --- a/tests/net/gnrc_ipv6_nib_dns/Makefile +++ b/tests/net/gnrc_ipv6_nib_dns/Makefile @@ -9,7 +9,7 @@ USEMODULE += sock_dns USEMODULE += gnrc_ipv6_default USEMODULE += gnrc_ipv6_nib_dns # use Ethernet as link-layer protocol -ifeq (native,$(BOARD)) +ifneq (,$(filter native native64,$(BOARD))) PORT ?= $(TAP) else ETHOS_BAUDRATE ?= 115200 diff --git a/tests/net/gnrc_ipv6_nib_dns/Makefile.board.dep b/tests/net/gnrc_ipv6_nib_dns/Makefile.board.dep index b595b8605ca1..bb4275e0610f 100644 --- a/tests/net/gnrc_ipv6_nib_dns/Makefile.board.dep +++ b/tests/net/gnrc_ipv6_nib_dns/Makefile.board.dep @@ -1,5 +1,5 @@ # Put board specific dependencies here -ifeq (native,$(BOARD)) +ifneq (,$(filter native native64,$(BOARD))) USEMODULE += netdev_tap else USEMODULE += stdio_ethos diff --git a/tests/net/gnrc_netif_ieee802154/Makefile b/tests/net/gnrc_netif_ieee802154/Makefile index 6e8e0f322666..b49ddb502931 100644 --- a/tests/net/gnrc_netif_ieee802154/Makefile +++ b/tests/net/gnrc_netif_ieee802154/Makefile @@ -1,8 +1,8 @@ -BOARD_WHITELIST = native derfmega256 avr-rss2 atmega256rfr2-xpro nrf52840dongle +BOARD_WHITELIST = native native64 derfmega256 avr-rss2 atmega256rfr2-xpro nrf52840dongle include ../Makefile.net_common -ifeq (native, $(BOARD)) +ifneq (,$(filter native native64,$(BOARD))) USEMODULE += socket_zep TERMFLAGS ?= -z "0.0.0.0:17755,localhost:17754" USEMODULE += netdev @@ -29,6 +29,6 @@ USEMODULE += gnrc_netif_ieee802154 # the application dumps received packets to stdout USEMODULE += gnrc_pktdump -TEST_ON_CI_WHITELIST += native +TEST_ON_CI_WHITELIST += native native64 include $(RIOTBASE)/Makefile.include diff --git a/tests/net/gnrc_rpl/Makefile b/tests/net/gnrc_rpl/Makefile index c548be23f426..41022218ff2c 100644 --- a/tests/net/gnrc_rpl/Makefile +++ b/tests/net/gnrc_rpl/Makefile @@ -9,7 +9,7 @@ USEMODULE += gnrc_rpl USEMODULE += shell USEMODULE += shell_cmds_default -ifeq (native, $(BOARD)) +ifneq (,$(filter native native64,$(BOARD))) USEMODULE += socket_zep USEMODULE += socket_zep_hello USEMODULE += netdev @@ -30,4 +30,4 @@ TEST_DEPS += host-tools include $(RIOTBASE)/Makefile.include # Test is flaky and regularly derails unrelated merge trains -TEST_ON_CI_BLACKLIST += native +TEST_ON_CI_BLACKLIST += native native64 diff --git a/tests/net/gnrc_rpl/tests/01-run.py b/tests/net/gnrc_rpl/tests/01-run.py index 84d67418666d..5e7e70be5304 100755 --- a/tests/net/gnrc_rpl/tests/01-run.py +++ b/tests/net/gnrc_rpl/tests/01-run.py @@ -9,6 +9,7 @@ import os import subprocess import time +import sys from subprocess import Popen from riotctrl_shell.gnrc import GNRCICMPv6Echo, GNRCICMPv6EchoParser @@ -27,10 +28,11 @@ class RIOTCtrlAppFactory(RIOTCtrlBoardFactory): - def __init__(self): + def __init__(self, board='native'): super().__init__(board_cls={ - 'native': native.NativeRIOTCtrl, + board: native.NativeRIOTCtrl, }) + self.board = board self.ctrl_list = list() def __enter__(self): @@ -40,7 +42,9 @@ def __exit__(self, *exc): for ctrl in self.ctrl_list: ctrl.stop_term() - def get_shell(self, application_directory='.', env={'BOARD': 'native'}): + def get_shell(self, application_directory='.', env=None): + if env is None: + env = {'BOARD': self.board} # retrieve a RIOTCtrl Object ctrl = super().get_ctrl( env=env, @@ -173,6 +177,11 @@ def run_test(func, factory): if __name__ == "__main__": - with RIOTCtrlAppFactory() as factory: + board = os.environ.get('BOARD', 'native') + if board not in ['native', 'native64']: + print('\x1b[1;31mThis test requires a native board.\x1b[0m\n', + file=sys.stderr) + sys.exit(1) + with RIOTCtrlAppFactory(board) as factory: run_test(test_linear_topology, factory) run_test(test_alternative_route, factory) diff --git a/tests/net/gnrc_rpl_srh/Makefile b/tests/net/gnrc_rpl_srh/Makefile index f00a1df1852a..04eb70d6026f 100644 --- a/tests/net/gnrc_rpl_srh/Makefile +++ b/tests/net/gnrc_rpl_srh/Makefile @@ -7,7 +7,7 @@ export TAP ?= tap0 CFLAGS += -DOUTPUT=TEXT # use Ethernet as link-layer protocol -ifeq (native,$(BOARD)) +ifneq (,$(filter native native64,$(BOARD))) PORT ?= $(TAP) else ETHOS_BAUDRATE ?= 115200 diff --git a/tests/net/gnrc_rpl_srh/Makefile.board.dep b/tests/net/gnrc_rpl_srh/Makefile.board.dep index b595b8605ca1..bb4275e0610f 100644 --- a/tests/net/gnrc_rpl_srh/Makefile.board.dep +++ b/tests/net/gnrc_rpl_srh/Makefile.board.dep @@ -1,5 +1,5 @@ # Put board specific dependencies here -ifeq (native,$(BOARD)) +ifneq (,$(filter native native64,$(BOARD))) USEMODULE += netdev_tap else USEMODULE += stdio_ethos diff --git a/tests/net/gnrc_sixlowpan_frag_sfr_congure_impl/Makefile b/tests/net/gnrc_sixlowpan_frag_sfr_congure_impl/Makefile index 22765e6245f8..68e995f2e51f 100644 --- a/tests/net/gnrc_sixlowpan_frag_sfr_congure_impl/Makefile +++ b/tests/net/gnrc_sixlowpan_frag_sfr_congure_impl/Makefile @@ -5,7 +5,7 @@ include ../Makefile.net_common # maybe it is an actual race condition. # # TODO: Solve the issue and re-enable -TEST_ON_CI_BLACKLIST += native +TEST_ON_CI_BLACKLIST += native native64 USEMODULE += auto_init_gnrc_netif USEMODULE += gnrc_ipv6_router_default @@ -24,7 +24,7 @@ USEMODULE += netstats_l2 USEMODULE += netstats_ipv6 USEMODULE += netstats_rpl -ifeq (native, $(BOARD)) +ifneq (,$(filter native native64,$(BOARD))) USEMODULE += socket_zep USEMODULE += socket_zep_hello USEMODULE += netdev diff --git a/tests/net/gnrc_sixlowpan_frag_sfr_congure_impl/tests/01-run.py b/tests/net/gnrc_sixlowpan_frag_sfr_congure_impl/tests/01-run.py index 4bf058179ccf..fa6a6e9d8236 100755 --- a/tests/net/gnrc_sixlowpan_frag_sfr_congure_impl/tests/01-run.py +++ b/tests/net/gnrc_sixlowpan_frag_sfr_congure_impl/tests/01-run.py @@ -30,10 +30,11 @@ class RIOTCtrlAppFactory(RIOTCtrlBoardFactory): - def __init__(self): + def __init__(self, board='native'): super().__init__(board_cls={ - 'native': native.NativeRIOTCtrl, + board: native.NativeRIOTCtrl, }) + self.board = board self.ctrl_list = list() def __enter__(self): @@ -43,7 +44,9 @@ def __exit__(self, *exc): for ctrl in self.ctrl_list: ctrl.stop_term() - def get_shell(self, application_directory='.', env={'BOARD': 'native'}): + def get_shell(self, application_directory='.', env=None): + if env is None: + env = {'BOARD': self.board} # retrieve a RIOTCtrl Object ctrl = super().get_ctrl( env=env, @@ -153,5 +156,11 @@ def run_zep_dispatch(): if __name__ == "__main__": - with RIOTCtrlAppFactory() as factory, run_zep_dispatch() as zep_dispatch: + board = os.environ.get('BOARD', 'native') + if board not in ['native', 'native64']: + print('\x1b[1;31mThis test requires a native board.\x1b[0m\n', + file=sys.stderr) + sys.exit(1) + + with RIOTCtrlAppFactory(board) as factory, run_zep_dispatch() as zep_dispatch: test_fragmentation(factory, zep_dispatch) diff --git a/tests/net/gnrc_sock_dns/Makefile b/tests/net/gnrc_sock_dns/Makefile index 9a14321d8c8a..b3c98e828e25 100644 --- a/tests/net/gnrc_sock_dns/Makefile +++ b/tests/net/gnrc_sock_dns/Makefile @@ -10,7 +10,7 @@ USEMODULE += gnrc_ipv6_nib_dns USEMODULE += gnrc_netif_single # Only one interface used and it makes # shell commands easier # use Ethernet as link-layer protocol -ifeq (native,$(BOARD)) +ifneq (,$(filter native native64,$(BOARD))) PORT ?= $(TAP) else ETHOS_BAUDRATE ?= 115200 diff --git a/tests/net/gnrc_sock_dns/Makefile.board.dep b/tests/net/gnrc_sock_dns/Makefile.board.dep index b595b8605ca1..bb4275e0610f 100644 --- a/tests/net/gnrc_sock_dns/Makefile.board.dep +++ b/tests/net/gnrc_sock_dns/Makefile.board.dep @@ -1,5 +1,5 @@ # Put board specific dependencies here -ifeq (native,$(BOARD)) +ifneq (,$(filter native native64,$(BOARD))) USEMODULE += netdev_tap else USEMODULE += stdio_ethos diff --git a/tests/net/gnrc_sock_dodtls/Makefile b/tests/net/gnrc_sock_dodtls/Makefile index be677aa52914..d58eff4f8133 100644 --- a/tests/net/gnrc_sock_dodtls/Makefile +++ b/tests/net/gnrc_sock_dodtls/Makefile @@ -20,7 +20,7 @@ USEMODULE += shell_cmds_default USEPKG += tinydtls # use Ethernet as link-layer protocol -ifeq (native,$(BOARD)) +ifneq (,$(filter native native64,$(BOARD))) PORT ?= $(TAP) else ETHOS_BAUDRATE ?= 115200 diff --git a/tests/net/gnrc_sock_dodtls/Makefile.board.dep b/tests/net/gnrc_sock_dodtls/Makefile.board.dep index b595b8605ca1..bb4275e0610f 100644 --- a/tests/net/gnrc_sock_dodtls/Makefile.board.dep +++ b/tests/net/gnrc_sock_dodtls/Makefile.board.dep @@ -1,5 +1,5 @@ # Put board specific dependencies here -ifeq (native,$(BOARD)) +ifneq (,$(filter native native64,$(BOARD))) USEMODULE += netdev_tap else USEMODULE += stdio_ethos diff --git a/tests/net/gnrc_sock_tcp/Makefile b/tests/net/gnrc_sock_tcp/Makefile index 0230b56c2f32..81a94bcd6aba 100644 --- a/tests/net/gnrc_sock_tcp/Makefile +++ b/tests/net/gnrc_sock_tcp/Makefile @@ -12,7 +12,7 @@ TIMEOUT_MS ?= 3000 # Suppress test execution to avoid CI errors TEST_ON_CI_BLACKLIST += all -ifeq (native,$(BOARD)) +ifneq (,$(filter native native64,$(BOARD))) PORT ?= $(TAP) else ETHOS_BAUDRATE ?= 115200 diff --git a/tests/net/gnrc_sock_tcp/Makefile.board.dep b/tests/net/gnrc_sock_tcp/Makefile.board.dep index b595b8605ca1..bb4275e0610f 100644 --- a/tests/net/gnrc_sock_tcp/Makefile.board.dep +++ b/tests/net/gnrc_sock_tcp/Makefile.board.dep @@ -1,5 +1,5 @@ # Put board specific dependencies here -ifeq (native,$(BOARD)) +ifneq (,$(filter native native64,$(BOARD))) USEMODULE += netdev_tap else USEMODULE += stdio_ethos diff --git a/tests/net/gnrc_sock_tcp/tests-as-root/helpers.py b/tests/net/gnrc_sock_tcp/tests-as-root/helpers.py index effe250aae65..49bd36f2df33 100644 --- a/tests/net/gnrc_sock_tcp/tests-as-root/helpers.py +++ b/tests/net/gnrc_sock_tcp/tests-as-root/helpers.py @@ -234,7 +234,7 @@ def generate_port_number(): def sudo_guard(uses_scapy=False): - sudo_required = uses_scapy or (os.environ.get("BOARD", "") != "native") + sudo_required = uses_scapy or (not os.environ.get("BOARD", "") in ["native", "native64"]) if sudo_required and os.geteuid() != 0: print("\x1b[1;31mThis test requires root privileges.\n" "It uses `./dist/tools/ethos/start_networking.sh` as term" + diff --git a/tests/net/gnrc_tcp/Makefile b/tests/net/gnrc_tcp/Makefile index 989c0603a7b9..faaa7afaf09e 100644 --- a/tests/net/gnrc_tcp/Makefile +++ b/tests/net/gnrc_tcp/Makefile @@ -17,7 +17,7 @@ CUSTOM_GNRC_TCP_NO_TIMEOUT ?= 1 # Suppress test execution to avoid CI errors TEST_ON_CI_BLACKLIST += all -ifeq (native,$(BOARD)) +ifneq (,$(filter native native64,$(BOARD))) PORT ?= $(TAP) else ETHOS_BAUDRATE ?= 115200 diff --git a/tests/net/gnrc_tcp/Makefile.board.dep b/tests/net/gnrc_tcp/Makefile.board.dep index b595b8605ca1..bb4275e0610f 100644 --- a/tests/net/gnrc_tcp/Makefile.board.dep +++ b/tests/net/gnrc_tcp/Makefile.board.dep @@ -1,5 +1,5 @@ # Put board specific dependencies here -ifeq (native,$(BOARD)) +ifneq (,$(filter native native64,$(BOARD))) USEMODULE += netdev_tap else USEMODULE += stdio_ethos diff --git a/tests/net/gnrc_tcp/tests-as-root/helpers.py b/tests/net/gnrc_tcp/tests-as-root/helpers.py index 199f5a190038..e69b0e1eeda6 100644 --- a/tests/net/gnrc_tcp/tests-as-root/helpers.py +++ b/tests/net/gnrc_tcp/tests-as-root/helpers.py @@ -310,7 +310,7 @@ def generate_port_number(): def sudo_guard(uses_scapy=False): - sudo_required = uses_scapy or (os.environ.get("BOARD", "") != "native") + sudo_required = uses_scapy or (not os.environ.get("BOARD", "") in ["native", "native64"]) if sudo_required and os.geteuid() != 0: print("\x1b[1;31mThis test requires root privileges.\n" "It uses `./dist/tools/ethos/start_networking.sh` as term" + diff --git a/tests/net/ieee802154_hal/Makefile b/tests/net/ieee802154_hal/Makefile index c684e36a220f..6265312d4d38 100644 --- a/tests/net/ieee802154_hal/Makefile +++ b/tests/net/ieee802154_hal/Makefile @@ -10,6 +10,7 @@ BOARD_WHITELIST += adafruit-clue \ cc2538dk \ feather-nrf52840 \ native \ + native64 \ nrf52840dk \ nrf52840dongle \ nrf52840-mdk \ @@ -25,7 +26,7 @@ BOARD_WHITELIST += adafruit-clue \ pba-d-01-kw2x \ # -ifeq ($(BOARD), native) +ifneq (,$(filter native native64,$(BOARD))) ZEP_PORT_BASE ?= 17754 TERMFLAGS += -z [::1]:$(ZEP_PORT_BASE) USEMODULE += socket_zep diff --git a/tests/net/ieee802154_submac/Makefile b/tests/net/ieee802154_submac/Makefile index e4122afbc092..58c92ad1ffc8 100644 --- a/tests/net/ieee802154_submac/Makefile +++ b/tests/net/ieee802154_submac/Makefile @@ -10,6 +10,7 @@ BOARD_WHITELIST += adafruit-clue \ cc2538dk \ feather-nrf52840 \ native \ + native64 \ nrf52840dk \ nrf52840dongle \ nrf52840-mdk \ @@ -38,7 +39,7 @@ USEMODULE += ieee802154 USEMODULE += ieee802154_submac USEMODULE += ztimer_usec -ifeq ($(BOARD), native) +ifneq (,$(filter native native64,$(BOARD))) USE_ZEP = 1 USEMODULE += socket_zep endif diff --git a/tests/net/nanocoap_cli/Makefile b/tests/net/nanocoap_cli/Makefile index 87c5c7c39711..cf7031ffee17 100644 --- a/tests/net/nanocoap_cli/Makefile +++ b/tests/net/nanocoap_cli/Makefile @@ -48,7 +48,7 @@ ifeq (,$(filter $(BOARD),$(LOW_MEMORY_BOARDS))) CFLAGS += -DTHREAD_STACKSIZE_MAIN=\(3*THREAD_STACKSIZE_DEFAULT\) # always enable auto-format for native - ifeq ($(BOARD),native) + ifneq (,$(filter native native64,$(BOARD))) USEMODULE += vfs_auto_format endif endif diff --git a/tests/net/netstats_l2/Makefile b/tests/net/netstats_l2/Makefile index 0af1b24669ba..91fb7b9066a7 100644 --- a/tests/net/netstats_l2/Makefile +++ b/tests/net/netstats_l2/Makefile @@ -12,7 +12,7 @@ USEMODULE += netstats_l2 # Cannot run the test on `murdock` in `native` # open(/dev/net/tun): No such file or directory -TEST_ON_CI_BLACKLIST += native +TEST_ON_CI_BLACKLIST += native native64 # sometimes fails on esp32, see #14237. TEST_ON_CI_BLACKLIST += esp32-wroom-32 diff --git a/tests/net/socket_zep/Makefile b/tests/net/socket_zep/Makefile index 18ec78159686..a4e51d796533 100644 --- a/tests/net/socket_zep/Makefile +++ b/tests/net/socket_zep/Makefile @@ -1,6 +1,6 @@ include ../Makefile.net_common -BOARD_WHITELIST = native # socket_zep is only available on native +BOARD_WHITELIST = native native64 # socket_zep is only available on native USEMODULE += od USEMODULE += socket_zep diff --git a/tests/periph/flashpage_unittest/main.c b/tests/periph/flashpage_unittest/main.c index da530a9e804d..5c84bf28a781 100644 --- a/tests/periph/flashpage_unittest/main.c +++ b/tests/periph/flashpage_unittest/main.c @@ -38,7 +38,7 @@ #include "periph/flashpage.h" -#if (defined(BOARD_NATIVE) && !IS_USED(MODULE_PERIPH_FLASHPAGE)) +#if (defined(CPU_NATIVE) && !IS_USED(MODULE_PERIPH_FLASHPAGE)) char _native_flash[FLASHPAGE_SIZE * FLASHPAGE_NUMOF]; #endif diff --git a/tests/periph/gpio/Makefile b/tests/periph/gpio/Makefile index 362cce1e62fb..cfa682793093 100644 --- a/tests/periph/gpio/Makefile +++ b/tests/periph/gpio/Makefile @@ -11,7 +11,7 @@ USEMODULE += shell_cmds_default USEMODULE += benchmark # disable native GPIOs for automatic test -ifeq (native,$(BOARD)) +ifneq (,$(filter native native64,$(BOARD))) USEMODULE += periph_gpio_mock # the same for Kconfig ifeq (1,$(TEST_KCONFIG)) diff --git a/tests/pkg/c25519/tests/01-run.py b/tests/pkg/c25519/tests/01-run.py index 5d4ec6a84736..40b6aeb68644 100755 --- a/tests/pkg/c25519/tests/01-run.py +++ b/tests/pkg/c25519/tests/01-run.py @@ -18,7 +18,7 @@ # Increase timeout on "real" hardware # 170 seconds on `arduino-mega2560` # ~300 seconds on `z1` -TIMEOUT = 320 if BOARD != 'native' else DEFAULT_TIMEOUT +TIMEOUT = 320 if BOARD not in ['native', 'native64'] else DEFAULT_TIMEOUT if __name__ == "__main__": diff --git a/tests/pkg/cayenne-lpp/main.c b/tests/pkg/cayenne-lpp/main.c index ed12968be5d6..e0f92a9c1eca 100644 --- a/tests/pkg/cayenne-lpp/main.c +++ b/tests/pkg/cayenne-lpp/main.c @@ -24,7 +24,7 @@ #include "cayenne_lpp.h" #define TEST_BUFFER1 { 0x03, 0x67, 0x01, 0x10, 0x05, 0x67, 0x00, 0xff } -#if defined(BOARD_NATIVE) && !(__SIZEOF_POINTER__ == 8) +#if defined(BOARD_NATIVE) #define TEST_BUFFER2 { 0x01, 0x67, 0xFF, 0xD8, \ 0x06, 0x71, 0x04, 0xD1, 0xFB, 0x2F, 0x00, 0x00 } #else diff --git a/tests/pkg/edhoc_c/Makefile b/tests/pkg/edhoc_c/Makefile index fb9ff46ef6a6..5d6b52fb7583 100644 --- a/tests/pkg/edhoc_c/Makefile +++ b/tests/pkg/edhoc_c/Makefile @@ -4,7 +4,7 @@ include $(RIOTBASE)/tests/Makefile.boards.netif BOARD_WHITELIST += $(BOARD_PROVIDES_NETIF) # Cannot run the test on `murdock` in `native` # open(/dev/net/tun): No such file or directory -TEST_ON_CI_BLACKLIST += native +TEST_ON_CI_BLACKLIST += native native64 # Test fails pretty regularly on CI TEST_ON_CI_BLACKLIST += esp32-wroom-32 diff --git a/tests/pkg/fatfs/Makefile b/tests/pkg/fatfs/Makefile index d7d29ec54638..9db3b75b1286 100644 --- a/tests/pkg/fatfs/Makefile +++ b/tests/pkg/fatfs/Makefile @@ -12,7 +12,7 @@ USEPKG += fatfs FATFS_IMAGE_FILE_SIZE_MIB ?= 128 -ifeq ($(BOARD),native) +ifneq (,$(filter native native64,$(BOARD))) #overwrite default mtd_native-config to use fat image as flash device CFLAGS += -DMTD_NATIVE_FILENAME=\"./bin/riot_fatfs_disk.img\" CFLAGS += -DFATFS_IMAGE_FILE_SIZE_MIB=$(FATFS_IMAGE_FILE_SIZE_MIB) diff --git a/tests/pkg/fatfs_vfs/Makefile b/tests/pkg/fatfs_vfs/Makefile index fb116a3948a5..e2716592ff7a 100644 --- a/tests/pkg/fatfs_vfs/Makefile +++ b/tests/pkg/fatfs_vfs/Makefile @@ -10,7 +10,7 @@ CFLAGS += -DCONFIG_FATFS_FORMAT_ALLOC_STATIC=1 FATFS_IMAGE_FILE_SIZE_MIB ?= 128 -ifeq ($(BOARD),native) +ifneq (,$(filter native native64,$(BOARD))) USEMODULE += mtd_native #overwrite default mtd_native-config to use fat image as flash device diff --git a/tests/pkg/libcose/Makefile b/tests/pkg/libcose/Makefile index 5477eed98560..8cff973f7ab1 100644 --- a/tests/pkg/libcose/Makefile +++ b/tests/pkg/libcose/Makefile @@ -1,6 +1,6 @@ include ../Makefile.pkg_common -TEST_ON_CI_WHITELIST += native +TEST_ON_CI_WHITELIST += native native64 USEPKG += libcose # By default we use hacl as crypto backend, uncomment to use a different diff --git a/tests/pkg/libcose/tests/01-run.py b/tests/pkg/libcose/tests/01-run.py index 9810ad9cd60f..723ab3127ad6 100755 --- a/tests/pkg/libcose/tests/01-run.py +++ b/tests/pkg/libcose/tests/01-run.py @@ -15,7 +15,7 @@ BOARD = os.environ['BOARD'] # on real hardware, this test application can take several minutes to # complete (>5min on nrf51dk) -TIMEOUT = 400 if BOARD != 'native' else DEFAULT_TIMEOUT +TIMEOUT = 400 if BOARD not in ['native', 'native64'] else DEFAULT_TIMEOUT if __name__ == "__main__": diff --git a/tests/pkg/libcose_encrypt/Makefile b/tests/pkg/libcose_encrypt/Makefile index 786f71e3e5ce..1d20f180bbb3 100644 --- a/tests/pkg/libcose_encrypt/Makefile +++ b/tests/pkg/libcose_encrypt/Makefile @@ -1,6 +1,6 @@ include ../Makefile.pkg_common -TEST_ON_CI_WHITELIST += native +TEST_ON_CI_WHITELIST += native native64 USEPKG += libcose # crypto backend. diff --git a/tests/pkg/libcose_encrypt/tests/01-run.py b/tests/pkg/libcose_encrypt/tests/01-run.py index 9810ad9cd60f..723ab3127ad6 100755 --- a/tests/pkg/libcose_encrypt/tests/01-run.py +++ b/tests/pkg/libcose_encrypt/tests/01-run.py @@ -15,7 +15,7 @@ BOARD = os.environ['BOARD'] # on real hardware, this test application can take several minutes to # complete (>5min on nrf51dk) -TIMEOUT = 400 if BOARD != 'native' else DEFAULT_TIMEOUT +TIMEOUT = 400 if BOARD not in ['native', 'native64'] else DEFAULT_TIMEOUT if __name__ == "__main__": diff --git a/tests/pkg/libfixmath/main.c b/tests/pkg/libfixmath/main.c index b2529b38c2f0..d33527085638 100644 --- a/tests/pkg/libfixmath/main.c +++ b/tests/pkg/libfixmath/main.c @@ -59,7 +59,7 @@ static void binary_ops(void) { "max", fix16_max }, }; -#ifdef BOARD_NATIVE +#ifdef CPU_NATIVE fix16_t _min = fix16_from_dbl(-5.0); fix16_t _max = fix16_from_dbl(5.0); fix16_t _step = fix16_from_dbl(0.25); @@ -106,7 +106,7 @@ static void unary_ops(void) { "exp", fix16_exp }, }; -#ifdef BOARD_NATIVE +#ifdef CPU_NATIVE fix16_t _min = fix16_from_dbl(-10.0); fix16_t _max = fix16_from_dbl(10.0); fix16_t _step = fix16_from_dbl(0.25); @@ -144,7 +144,7 @@ static void unary_ops(void) fix16_t _min = fix16_from_dbl(-M_PI/2); fix16_t _max = fix16_from_dbl(+M_PI/2); -#ifdef BOARD_NATIVE +#ifdef CPU_NATIVE fix16_t _step = fix16_from_dbl(0.05); #else fix16_t _step = fix16_from_dbl(0.1); @@ -176,7 +176,7 @@ static void unary_ops(void) fix16_t _min = fix16_from_dbl(-1.0); fix16_t _max = fix16_from_dbl(1.0); -#ifdef BOARD_NATIVE +#ifdef CPU_NATIVE fix16_t _step = fix16_from_dbl(0.05); #else fix16_t _step = fix16_from_dbl(0.2); @@ -209,7 +209,7 @@ static void unary_ops(void) { "slog2", fix16_slog2 }, }; -#ifdef BOARD_NATIVE +#ifdef CPU_NATIVE fix16_t _min = fix16_from_dbl(0.05); fix16_t _max = fix16_from_dbl(+10.0); fix16_t _step = fix16_from_dbl(0.25); diff --git a/tests/pkg/libfixmath_unittests/Makefile b/tests/pkg/libfixmath_unittests/Makefile index 2d1a5f1c9aa9..6e6576f1f37a 100644 --- a/tests/pkg/libfixmath_unittests/Makefile +++ b/tests/pkg/libfixmath_unittests/Makefile @@ -2,7 +2,7 @@ include ../Makefile.pkg_common USEMODULE += libfixmath-unittests -ifneq (,$(filter native,$(BOARD))) +ifneq (,$(filter native native64,$(BOARD))) LINKFLAGS += -lm endif @@ -13,6 +13,6 @@ CFLAGS += -Wno-error=strict-prototypes CFLAGS += -Wno-error=old-style-definition CFLAGS += -Wno-error=format -TEST_ON_CI_WHITELIST += native +TEST_ON_CI_WHITELIST += native native64 include $(RIOTBASE)/Makefile.include diff --git a/tests/pkg/lora-serialization/main.c b/tests/pkg/lora-serialization/main.c index cd1e4112a818..7986df8a0dd9 100644 --- a/tests/pkg/lora-serialization/main.c +++ b/tests/pkg/lora-serialization/main.c @@ -23,7 +23,7 @@ #include #include "lora_serialization.h" -#if defined(BOARD_NATIVE) && !(__SIZEOF_POINTER__ == 8) +#if defined(BOARD_NATIVE) #define TEST_01_EXPECTED { 0x1f, 0x4c, 0x0e, 0x27 } #define TEST_02_EXPECTED { 0x65, 0xa6, 0xfa, 0xfd, \ 0x6a, 0x24, 0x04, 0x09, \ diff --git a/tests/pkg/lua_loader/Makefile b/tests/pkg/lua_loader/Makefile index 8da433edebeb..150159f0ec0a 100644 --- a/tests/pkg/lua_loader/Makefile +++ b/tests/pkg/lua_loader/Makefile @@ -5,9 +5,9 @@ USEPKG += lua # This application uses getchar and thus expects input from stdio USEMODULE += stdin -BOARD_WHITELIST += native samr21-xpro +BOARD_WHITELIST += native native64 samr21-xpro -ifneq ($(BOARD),native) +ifeq (,$(filter native native64,$(BOARD))) # This stack size is large enough to run Lua print() functions of # various lengths. Other functions untested. CFLAGS += -DTHREAD_STACKSIZE_MAIN='(THREAD_STACKSIZE_DEFAULT+2048)' diff --git a/tests/pkg/lvgl/Makefile b/tests/pkg/lvgl/Makefile index 2d72ece6e422..3da669da5588 100644 --- a/tests/pkg/lvgl/Makefile +++ b/tests/pkg/lvgl/Makefile @@ -12,10 +12,13 @@ USEMODULE += lvgl_extra_layout_flex USEMODULE += lvgl_extra_theme_default USEMODULE += lvgl_extra_theme_default_dark +# blacklist native64 until https://github.com/RIOT-OS/riotdocker/pull/241 is resolved +BOARD_BLACKLIST += native64 + include $(RIOTBASE)/Makefile.include # SDL requires more stack -ifeq (native,$(BOARD)) +ifneq (,$(filter native native64,$(BOARD))) CFLAGS += -DTHREAD_STACKSIZE_MAIN=64*1024 else ifneq (,$(filter esp%,$(CPU_FAM))) CFLAGS += -DTHREAD_STACKSIZE_MAIN=4*1024 diff --git a/tests/pkg/lvgl_touch/Makefile b/tests/pkg/lvgl_touch/Makefile index a78a0479df93..86e364e5f48b 100644 --- a/tests/pkg/lvgl_touch/Makefile +++ b/tests/pkg/lvgl_touch/Makefile @@ -17,10 +17,13 @@ USEMODULE += lvgl_extra_theme_default USEMODULE += random +# blacklist native64 until https://github.com/RIOT-OS/riotdocker/pull/241 is resolved +BOARD_BLACKLIST += native64 + include $(RIOTBASE)/Makefile.include # SDL requires more stack -ifeq (native,$(BOARD)) +ifneq (,$(filter native native64,$(BOARD))) CFLAGS += -DTHREAD_STACKSIZE_MAIN=64*1024 else ifneq (,$(filter esp%,$(CPU_FAM))) CFLAGS += -DTHREAD_STACKSIZE_MAIN=4*1024 diff --git a/tests/pkg/lwip/Makefile b/tests/pkg/lwip/Makefile index 268873d9cdbe..c129757ac790 100644 --- a/tests/pkg/lwip/Makefile +++ b/tests/pkg/lwip/Makefile @@ -33,12 +33,12 @@ USEMODULE += od USEMODULE += netdev_default USEMODULE += ztimer_usec -ifeq ($(BOARD),native) +ifneq (,$(filter native native64,$(BOARD))) USEMODULE += lwip_ethernet endif # Test only implemented for native -ifneq ($(BOARD),native) +ifeq (,$(filter native native64,$(BOARD))) TESTS= endif diff --git a/tests/pkg/lwip/tests/01-run.py b/tests/pkg/lwip/tests/01-run.py index e1375f7b662f..9674dbe9752a 100755 --- a/tests/pkg/lwip/tests/01-run.py +++ b/tests/pkg/lwip/tests/01-run.py @@ -85,7 +85,7 @@ def __init__(self, name, port=None, serial=None, clean=None, def _reset_native_execute(obj, application, env=None, *args, **kwargs): pass - if (name == "native") and (reset is None): + if (name in ['native', 'native64']) and (reset is None): reset = _reset_native_execute self.name = name @@ -277,7 +277,7 @@ def test_tcpv6_send(board_group, application, env=None): def test_tcpv6_large_send(board_group, application, env=None): """Test that the TCP server can receive a large packet in multiple reads""" - if any(b.name != "native" for b in board_group.boards): + if any(b.name not in ["native", "native64"] for b in board_group.boards): # run test only with native print("SKIP_TEST INFO found non-native board") return @@ -325,7 +325,7 @@ def data_line(i): def test_tcpv6_multiconnect(board_group, application, env=None): - if any(b.name != "native" for b in board_group.boards): + if any(b.name not in ["native", "native64"] for b in board_group.boards): # run test only with native print("SKIP_TEST INFO found non-native board") return @@ -412,8 +412,14 @@ def test_triple_send(board_group, application, env=None): if __name__ == "__main__": - TestStrategy().execute([BoardGroup((Board("native", "tap0"), - Board("native", "tap1")))], + board = os.environ.get('BOARD', 'native') + if board not in ['native', 'native64']: + print('\x1b[1;31mThis test requires a native board.\x1b[0m\n', + file=sys.stderr) + sys.exit(1) + + TestStrategy().execute([BoardGroup((Board(board, "tap0"), + Board(board, "tap1")))], [test_ipv6_send, test_udpv6_send, test_tcpv6_send, test_tcpv6_large_send, test_tcpv6_multiconnect, test_triple_send]) diff --git a/tests/pkg/tinyvcdiff/Makefile b/tests/pkg/tinyvcdiff/Makefile index 4e9724e8dc15..eccbc004e41a 100644 --- a/tests/pkg/tinyvcdiff/Makefile +++ b/tests/pkg/tinyvcdiff/Makefile @@ -3,7 +3,7 @@ include ../Makefile.pkg_common BLOBS += source.bin delta.bin target.bin # Only run on native ... -TEST_ON_CI_WHITELIST += native +TEST_ON_CI_WHITELIST += native native64 USEMODULE += embunit diff --git a/tests/pkg/tweetnacl/Makefile b/tests/pkg/tweetnacl/Makefile index 4c6e4c576cc6..f9dc9bf05e9b 100644 --- a/tests/pkg/tweetnacl/Makefile +++ b/tests/pkg/tweetnacl/Makefile @@ -1,6 +1,6 @@ include ../Makefile.pkg_common -TEST_ON_CI_WHITELIST += native +TEST_ON_CI_WHITELIST += native native64 CFLAGS += -DTHREAD_STACKSIZE_MAIN=\(5*THREAD_STACKSIZE_DEFAULT\) diff --git a/tests/pkg/tweetnacl/tests/01-run.py b/tests/pkg/tweetnacl/tests/01-run.py index 00e770623b0b..c1c4ce43ad6d 100755 --- a/tests/pkg/tweetnacl/tests/01-run.py +++ b/tests/pkg/tweetnacl/tests/01-run.py @@ -14,7 +14,7 @@ def testfunc(child): board = os.environ['BOARD'] # Increase timeout on "real" hardware - timeout = 120 if board != 'native' else -1 + timeout = 120 if board not in ['native', 'native64'] else -1 check_unittests(child, timeout=timeout) diff --git a/tests/pkg/wolfssl/Makefile b/tests/pkg/wolfssl/Makefile index 63dc246d1f54..671ea24b4bdb 100644 --- a/tests/pkg/wolfssl/Makefile +++ b/tests/pkg/wolfssl/Makefile @@ -19,10 +19,10 @@ USEMODULE += wolfcrypt-benchmark USEMODULE += xtimer -ifneq ($(BOARD),native) +ifeq (,$(filter native native64,$(BOARD))) CFLAGS += -DBENCH_EMBEDDED endif -TEST_ON_CI_WHITELIST += native +TEST_ON_CI_WHITELIST += native native64 include $(RIOTBASE)/Makefile.include diff --git a/tests/pkg/wolfssl/tests/01-run.py b/tests/pkg/wolfssl/tests/01-run.py index 75fea0989d6b..0cc6be320a1d 100755 --- a/tests/pkg/wolfssl/tests/01-run.py +++ b/tests/pkg/wolfssl/tests/01-run.py @@ -12,10 +12,10 @@ # ED25519 takes +160s on samr21-xpro # ED25519 takes +230s on nucleo-l073rz # ED25519 takes +500s on nrf51dk -TEST_TIMEOUT = 600 if BOARD != 'native' else DEFAULT_TIMEOUT +TEST_TIMEOUT = 600 if BOARD not in ['native', 'native64'] else DEFAULT_TIMEOUT # ECDSA 256 takes +30s on samr21-xpro # ECDSA 256 takes +40s on nrf51dk -BENCH_TIMEOUT = 40 if BOARD != 'native' else 20 +BENCH_TIMEOUT = 40 if BOARD not in ['native', 'native64'] else 20 def _wait_for_test(child): diff --git a/tests/sys/evtimer_msg/Makefile b/tests/sys/evtimer_msg/Makefile index 007687a90c26..263543099d61 100644 --- a/tests/sys/evtimer_msg/Makefile +++ b/tests/sys/evtimer_msg/Makefile @@ -4,7 +4,7 @@ USEMODULE += evtimer USEMODULE += ztimer_msec # This test randomly fails on `native` so disable it from CI -TEST_ON_CI_BLACKLIST += native +TEST_ON_CI_BLACKLIST += native native64 # microbit qemu lacks rtt TEST_ON_CI_BLACKLIST += microbit diff --git a/tests/sys/frac-config/Makefile b/tests/sys/frac-config/Makefile index 5da711d27ae8..23bfe81d26a3 100644 --- a/tests/sys/frac-config/Makefile +++ b/tests/sys/frac-config/Makefile @@ -2,7 +2,7 @@ include ../Makefile.sys_common BOARD ?= native -BOARD_WHITELIST += native +BOARD_WHITELIST += native native64 USEMODULE += frac diff --git a/tests/sys/malloc/main.c b/tests/sys/malloc/main.c index c2dcee614337..b6059f33d37f 100644 --- a/tests/sys/malloc/main.c +++ b/tests/sys/malloc/main.c @@ -28,7 +28,7 @@ #include "test_utils/expect.h" #ifndef CHUNK_SIZE -#ifdef BOARD_NATIVE +#ifdef CPU_NATIVE #define CHUNK_SIZE (1024 * 1024U) #else #define CHUNK_SIZE (128U) diff --git a/tests/sys/pthread_condition_variable/main.c b/tests/sys/pthread_condition_variable/main.c index c61d1132972a..c9c5eebd04cc 100644 --- a/tests/sys/pthread_condition_variable/main.c +++ b/tests/sys/pthread_condition_variable/main.c @@ -49,7 +49,7 @@ static void *second_thread(void *arg) return NULL; } -#ifdef BOARD_NATIVE +#ifdef CPU_NATIVE #define ITERATION_STEPS 100000 #else #define ITERATION_STEPS 10000 diff --git a/tests/sys/rng/Makefile b/tests/sys/rng/Makefile index c3c4206e8c82..b0f60be58d71 100644 --- a/tests/sys/rng/Makefile +++ b/tests/sys/rng/Makefile @@ -14,6 +14,6 @@ USEMODULE += xtimer FEATURES_OPTIONAL += periph_hwrng -TEST_ON_CI_WHITELIST += native +TEST_ON_CI_WHITELIST += native native64 include $(RIOTBASE)/Makefile.include diff --git a/tests/sys/shell/tests/01-run.py b/tests/sys/shell/tests/01-run.py index 7f02a3ca8e37..fc9c081d0b3f 100755 --- a/tests/sys/shell/tests/01-run.py +++ b/tests/sys/shell/tests/01-run.py @@ -186,7 +186,7 @@ def check_erase_long_line(child, longline): # FIXME: this only works on native, due to #10634 combined with socat # insisting in line-buffering the terminal. - if BOARD == 'native': + if BOARD in ['native', 'native64']: longline_erased = longline + "\b"*len(longline) + "echo" child.sendline(longline_erased) child.expect_exact('"echo"') @@ -200,14 +200,14 @@ def check_control_d(child): # The current shell instance was initiated by shell_run(). The shell will respawn # automatically except on native. On native, RIOT is shut down completely, # therefore exclude this part. - if BOARD != 'native': + if BOARD not in ['native', 'native64']: child.sendline(CONTROL_D) child.expect_exact(PROMPT) def testfunc(child): # avoid sending an extra empty line on native. - if BOARD == 'native': + if BOARD in ['native', 'native64']: child.crlf = '\n' bufsize = check_and_get_bufsize(child) diff --git a/tests/sys/shell_coreclk/tests/01-run.py b/tests/sys/shell_coreclk/tests/01-run.py index e8cbc3a645d4..8c84236da163 100755 --- a/tests/sys/shell_coreclk/tests/01-run.py +++ b/tests/sys/shell_coreclk/tests/01-run.py @@ -21,7 +21,7 @@ def testfunc(child): # avoid sending an extra empty line on native. - if BOARD == 'native': + if BOARD in ['native', 'native64']: child.crlf = '\n' # check the help diff --git a/tests/sys/shell_lock/tests/01-run.py b/tests/sys/shell_lock/tests/01-run.py index 82bebdb08004..1c60bf1367aa 100755 --- a/tests/sys/shell_lock/tests/01-run.py +++ b/tests/sys/shell_lock/tests/01-run.py @@ -40,7 +40,7 @@ def testfunc(child): # avoid sending an extra empty line on native. - if BOARD == 'native': + if BOARD in ['native', 'native64']: child.crlf = '\n' # unlock diff --git a/tests/sys/suit_manifest/Makefile b/tests/sys/suit_manifest/Makefile index 1b780a5913d9..4ae70dd94866 100644 --- a/tests/sys/suit_manifest/Makefile +++ b/tests/sys/suit_manifest/Makefile @@ -26,7 +26,7 @@ BLOBS += $(MANIFEST_DIR)/file2.bin CFLAGS += -DCONFIG_SUIT_COMPONENT_MAX=2 # Use a version of 'native' that includes flash page support -ifeq (native, $(BOARD)) +ifneq (,$(filter native native64,$(BOARD))) EXTERNAL_BOARD_DIRS = $(CURDIR)/native_flashpage endif diff --git a/tests/sys/suit_manifest/tests/01-run.py b/tests/sys/suit_manifest/tests/01-run.py index 388f894852c2..fb3a7dbc2edf 100755 --- a/tests/sys/suit_manifest/tests/01-run.py +++ b/tests/sys/suit_manifest/tests/01-run.py @@ -16,7 +16,7 @@ def testfunc(child): # Increase timeout on "real" hardware # 16 seconds on `samr21-xpro` # >50 seconds on `nrf51dk` - timeout = 60 if board != 'native' else -1 + timeout = 60 if board not in ['native', 'native64'] else -1 child.expect(r"OK \(\d+ tests\)", timeout=timeout) diff --git a/tests/sys/xtimer_now64_continuity/Makefile b/tests/sys/xtimer_now64_continuity/Makefile index f6df00dda558..512120553fff 100644 --- a/tests/sys/xtimer_now64_continuity/Makefile +++ b/tests/sys/xtimer_now64_continuity/Makefile @@ -5,7 +5,7 @@ USEMODULE += xtimer USEMODULE += xtimer_no_ztimer_default # This test randomly fails on `native` so disable it from CI -TEST_ON_CI_BLACKLIST += native +TEST_ON_CI_BLACKLIST += native native64 # Boards that can't run only on xtimer or that always select ztimer BOARD_BLACKLIST += \ esp32s2-wemos-mini \ diff --git a/tests/sys/xtimer_periodic_wakeup/Makefile b/tests/sys/xtimer_periodic_wakeup/Makefile index 1e816c4786d7..397b0acb1bd0 100644 --- a/tests/sys/xtimer_periodic_wakeup/Makefile +++ b/tests/sys/xtimer_periodic_wakeup/Makefile @@ -3,7 +3,7 @@ include ../Makefile.sys_common USEMODULE += xtimer # This test randomly fails on `native` so disable it from CI -TEST_ON_CI_BLACKLIST += native +TEST_ON_CI_BLACKLIST += native native64 # stm32f030f4-demo doesn't have enough RAM to run the test # so we reduce the stack size for every thread diff --git a/tests/sys/xtimer_usleep/Makefile b/tests/sys/xtimer_usleep/Makefile index bd0b908aa447..cb469d43939b 100644 --- a/tests/sys/xtimer_usleep/Makefile +++ b/tests/sys/xtimer_usleep/Makefile @@ -3,7 +3,7 @@ include ../Makefile.sys_common USEMODULE += xtimer # This test randomly fails on `native` so disable it from CI -TEST_ON_CI_BLACKLIST += native +TEST_ON_CI_BLACKLIST += native native64 # Port and pin configuration for probing with oscilloscope # Port number should be found in port enum e.g in cpu/include/periph_cpu.h diff --git a/tests/sys/ztimer_overhead/Makefile b/tests/sys/ztimer_overhead/Makefile index 54e8a91fd1ab..c055f792a110 100644 --- a/tests/sys/ztimer_overhead/Makefile +++ b/tests/sys/ztimer_overhead/Makefile @@ -11,6 +11,6 @@ TEST_ON_CI_BLACKLIST += microbit # The test is sensitive to background CPU load. On the CI workers a lot of # compilation tasks are run in parallel, making this test randomly fail. -TEST_ON_CI_BLACKLIST += native +TEST_ON_CI_BLACKLIST += native native64 include $(RIOTBASE)/Makefile.include diff --git a/tests/sys/ztimer_periodic/Makefile b/tests/sys/ztimer_periodic/Makefile index 91f8de81d20d..960958e4ffb7 100644 --- a/tests/sys/ztimer_periodic/Makefile +++ b/tests/sys/ztimer_periodic/Makefile @@ -5,7 +5,7 @@ include ../Makefile.sys_common # application. If the host is busy enough it won't schedule the process, # delaying the application, thus delaying the time measurement. This happens # often on ci with resulting offsets of +10ms -TEST_ON_CI_BLACKLIST += native +TEST_ON_CI_BLACKLIST += native native64 USEMODULE += fmt USEMODULE += ztimer_usec ztimer_msec diff --git a/tests/sys/ztimer_periodic/main.c b/tests/sys/ztimer_periodic/main.c index 9ecfbf1a4cf1..6ae3fdf53f67 100644 --- a/tests/sys/ztimer_periodic/main.c +++ b/tests/sys/ztimer_periodic/main.c @@ -41,7 +41,7 @@ static const char *_names[] = { "ZTIMER_MSEC", "ZTIMER_USEC" }; static uint32_t _intervals[] = { 100, 10000 }; static uint32_t _max_offsets[] = { 2, -#ifdef BOARD_NATIVE +#ifdef CPU_NATIVE /* native is running on top of a multi-media OS, not a real-time OS */ 1000 #else diff --git a/tests/unittests/Makefile b/tests/unittests/Makefile index b71e0eea05f0..0044f13b2dfd 100644 --- a/tests/unittests/Makefile +++ b/tests/unittests/Makefile @@ -16,7 +16,7 @@ endif ifeq (llvm,$(TOOLCHAIN)) # the floating point exception bug is more likely to trigger when build # with LLVM, so we just disable LLVM on native as a work around - TEST_ON_CI_BLACKLIST += native + TEST_ON_CI_BLACKLIST += native native64 endif DISABLE_MODULE += auto_init auto_init_% @@ -37,8 +37,8 @@ INCLUDES += -I$(RIOTBASE)/tests/unittests/common CFLAGS += -DTHREAD_STACKSIZE_MAIN=THREAD_STACKSIZE_LARGE # for these boards, enable asan (Address Sanitizer) -ASAN_BOARDS ?= native -ifneq (, $(filter $(BOARD), $(ASAN_BOARDS))) +ASAN_BOARDS ?= native native64 +ifneq (, $(filter $(ASAN_BOARDS), $(BOARD))) CFLAGS += $(CFLAGS_ASAN) LINKFLAGS += $(LINKFLAGS_ASAN) endif diff --git a/tests/unittests/tests-kernel_defines/tests-kernel_defines.c b/tests/unittests/tests-kernel_defines/tests-kernel_defines.c index 214cf5d128ce..b65e2a443399 100644 --- a/tests/unittests/tests-kernel_defines/tests-kernel_defines.c +++ b/tests/unittests/tests-kernel_defines/tests-kernel_defines.c @@ -77,7 +77,7 @@ static void test_declare_constant(void) static_assert(sizeof(test_array) == 3, "test_array should be 3 bytes long"); } -#ifdef BOARD_NATIVE +#ifdef CPU_NATIVE /* native compiles with -Og, which does not automatically inline functions. * We just turn the function into a macro to get the test also passing on * native */ diff --git a/tests/unittests/tests-vfs/tests-vfs-mount-constfs.c b/tests/unittests/tests-vfs/tests-vfs-mount-constfs.c index 08872f20fada..cf9f05add4fd 100644 --- a/tests/unittests/tests-vfs/tests-vfs-mount-constfs.c +++ b/tests/unittests/tests-vfs/tests-vfs-mount-constfs.c @@ -173,7 +173,7 @@ static void test_vfs_constfs_read_lseek(void) TEST_ASSERT_EQUAL_INT(0, res); } -#if MODULE_NEWLIB || MODULE_PICOLIBC || defined(BOARD_NATIVE) +#if MODULE_NEWLIB || MODULE_PICOLIBC || defined(CPU_NATIVE) static void test_vfs_constfs__posix(void) { int res; @@ -212,7 +212,7 @@ Test *tests_vfs_mount_constfs_tests(void) new_TestFixture(test_vfs_umount__invalid_mount), new_TestFixture(test_vfs_constfs_open), new_TestFixture(test_vfs_constfs_read_lseek), -#if MODULE_NEWLIB || MODULE_PICOLIBC || defined(BOARD_NATIVE) +#if MODULE_NEWLIB || MODULE_PICOLIBC || defined(CPU_NATIVE) new_TestFixture(test_vfs_constfs__posix), #endif };