diff --git a/tests/legacy/benchmark/object_footprint/.gitignore b/tests/benchmarks/object_footprint/.gitignore similarity index 100% rename from tests/legacy/benchmark/object_footprint/.gitignore rename to tests/benchmarks/object_footprint/.gitignore diff --git a/tests/legacy/benchmark/object_footprint/Kconfig b/tests/benchmarks/object_footprint/Kconfig similarity index 80% rename from tests/legacy/benchmark/object_footprint/Kconfig rename to tests/benchmarks/object_footprint/Kconfig index b29a08587df..d99ed0300b1 100644 --- a/tests/legacy/benchmark/object_footprint/Kconfig +++ b/tests/benchmarks/object_footprint/Kconfig @@ -18,12 +18,12 @@ config OBJECTS_WHILELOOP bool "run whileloop" default y -config OBJECTS_FIBER - bool "enable fiber" +config OBJECTS_THREAD + bool "enable thread" default n config OBJECTS_SEMAPHORE - bool "enable semphore" + bool "enable semaphore" default n config OBJECTS_LIFO @@ -42,10 +42,10 @@ config OBJECTS_TIMER bool "enable timer" default n -config FIBER_STACK_SIZE - int "set fiber stack size" +config THREAD_STACK_SIZE + int "set thread stack size" default 512 - depends on OBJECTS_FIBER + depends on OBJECTS_THREAD config STATIC_ISR bool "static isr" diff --git a/tests/legacy/benchmark/object_footprint/Makefile b/tests/benchmarks/object_footprint/Makefile similarity index 100% rename from tests/legacy/benchmark/object_footprint/Makefile rename to tests/benchmarks/object_footprint/Makefile diff --git a/tests/legacy/benchmark/object_footprint/README.txt b/tests/benchmarks/object_footprint/README.txt similarity index 100% rename from tests/legacy/benchmark/object_footprint/README.txt rename to tests/benchmarks/object_footprint/README.txt diff --git a/tests/legacy/benchmark/object_footprint/prj00.conf b/tests/benchmarks/object_footprint/prj00.conf similarity index 91% rename from tests/legacy/benchmark/object_footprint/prj00.conf rename to tests/benchmarks/object_footprint/prj00.conf index b7c056b40c0..2bd39237217 100644 --- a/tests/legacy/benchmark/object_footprint/prj00.conf +++ b/tests/benchmarks/object_footprint/prj00.conf @@ -9,4 +9,3 @@ CONFIG_XIP=y CONFIG_OBJECTS_PRINTK=n CONFIG_OBJECTS_WHILELOOP=n CONFIG_KERNEL_BIN_NAME="prj00" -CONFIG_LEGACY_KERNEL=y diff --git a/tests/legacy/benchmark/object_footprint/prj01.conf b/tests/benchmarks/object_footprint/prj01.conf similarity index 90% rename from tests/legacy/benchmark/object_footprint/prj01.conf rename to tests/benchmarks/object_footprint/prj01.conf index f7c9d6237d8..16b78529956 100644 --- a/tests/legacy/benchmark/object_footprint/prj01.conf +++ b/tests/benchmarks/object_footprint/prj01.conf @@ -8,4 +8,3 @@ CONFIG_SERIAL=n CONFIG_XIP=y CONFIG_OBJECTS_PRINTK=n CONFIG_KERNEL_BIN_NAME="prj01" -CONFIG_LEGACY_KERNEL=y diff --git a/tests/legacy/benchmark/object_footprint/prj02.conf b/tests/benchmarks/object_footprint/prj02.conf similarity index 90% rename from tests/legacy/benchmark/object_footprint/prj02.conf rename to tests/benchmarks/object_footprint/prj02.conf index 1d1956b279e..ea249917f06 100644 --- a/tests/legacy/benchmark/object_footprint/prj02.conf +++ b/tests/benchmarks/object_footprint/prj02.conf @@ -9,4 +9,3 @@ CONFIG_XIP=y CONFIG_OBJECTS_PRINTK=y CONFIG_KERNEL_BIN_NAME="prj02" -CONFIG_LEGACY_KERNEL=y diff --git a/tests/legacy/benchmark/object_footprint/prj03.conf b/tests/benchmarks/object_footprint/prj03.conf similarity index 83% rename from tests/legacy/benchmark/object_footprint/prj03.conf rename to tests/benchmarks/object_footprint/prj03.conf index 91c1030c570..860728613e2 100644 --- a/tests/legacy/benchmark/object_footprint/prj03.conf +++ b/tests/benchmarks/object_footprint/prj03.conf @@ -7,6 +7,5 @@ CONFIG_CONSOLE=y CONFIG_SERIAL=y CONFIG_XIP=y CONFIG_OBJECTS_PRINTK=y -CONFIG_OBJECTS_FIBER=y +CONFIG_OBJECTS_THREAD=y CONFIG_KERNEL_BIN_NAME="prj03" -CONFIG_LEGACY_KERNEL=y diff --git a/tests/legacy/benchmark/object_footprint/prj04.conf b/tests/benchmarks/object_footprint/prj04.conf similarity index 82% rename from tests/legacy/benchmark/object_footprint/prj04.conf rename to tests/benchmarks/object_footprint/prj04.conf index 59904fb2285..abed68e1973 100644 --- a/tests/legacy/benchmark/object_footprint/prj04.conf +++ b/tests/benchmarks/object_footprint/prj04.conf @@ -6,7 +6,6 @@ CONFIG_CONSOLE=y CONFIG_SERIAL=y CONFIG_XIP=y CONFIG_OBJECTS_PRINTK=y -CONFIG_OBJECTS_FIBER=y +CONFIG_OBJECTS_THREAD=y CONFIG_OBJECTS_TIMER=y CONFIG_KERNEL_BIN_NAME="prj04" -CONFIG_LEGACY_KERNEL=y diff --git a/tests/legacy/benchmark/object_footprint/prj05.conf b/tests/benchmarks/object_footprint/prj05.conf similarity index 85% rename from tests/legacy/benchmark/object_footprint/prj05.conf rename to tests/benchmarks/object_footprint/prj05.conf index 0a5a5496348..baf3d86a416 100644 --- a/tests/legacy/benchmark/object_footprint/prj05.conf +++ b/tests/benchmarks/object_footprint/prj05.conf @@ -7,8 +7,7 @@ CONFIG_SERIAL=y CONFIG_XIP=y CONFIG_NANO_TIMERS=y CONFIG_OBJECTS_PRINTK=y -CONFIG_OBJECTS_FIBER=y +CONFIG_OBJECTS_THREAD=y CONFIG_OBJECTS_TIMER=y CONFIG_OBJECTS_SEMAPHORE=y CONFIG_KERNEL_BIN_NAME="prj05" -CONFIG_LEGACY_KERNEL=y diff --git a/tests/legacy/benchmark/object_footprint/prj06.conf b/tests/benchmarks/object_footprint/prj06.conf similarity index 86% rename from tests/legacy/benchmark/object_footprint/prj06.conf rename to tests/benchmarks/object_footprint/prj06.conf index bbde1ae623f..9890c7ae64b 100644 --- a/tests/legacy/benchmark/object_footprint/prj06.conf +++ b/tests/benchmarks/object_footprint/prj06.conf @@ -7,9 +7,8 @@ CONFIG_SERIAL=y CONFIG_XIP=y CONFIG_NANO_TIMERS=y CONFIG_OBJECTS_PRINTK=y -CONFIG_OBJECTS_FIBER=y +CONFIG_OBJECTS_THREAD=y CONFIG_OBJECTS_TIMER=y CONFIG_OBJECTS_SEMAPHORE=y CONFIG_OBJECTS_LIFO=y CONFIG_KERNEL_BIN_NAME="prj06" -CONFIG_LEGACY_KERNEL=y diff --git a/tests/legacy/benchmark/object_footprint/prj07.conf b/tests/benchmarks/object_footprint/prj07.conf similarity index 87% rename from tests/legacy/benchmark/object_footprint/prj07.conf rename to tests/benchmarks/object_footprint/prj07.conf index c9e2e95e040..a9c09af16e1 100644 --- a/tests/legacy/benchmark/object_footprint/prj07.conf +++ b/tests/benchmarks/object_footprint/prj07.conf @@ -7,10 +7,9 @@ CONFIG_SERIAL=y CONFIG_XIP=y CONFIG_NANO_TIMERS=y CONFIG_OBJECTS_PRINTK=y -CONFIG_OBJECTS_FIBER=y +CONFIG_OBJECTS_THREAD=y CONFIG_OBJECTS_TIMER=y CONFIG_OBJECTS_SEMAPHORE=y CONFIG_OBJECTS_LIFO=y CONFIG_OBJECTS_FIFO=y CONFIG_KERNEL_BIN_NAME="prj07" -CONFIG_LEGACY_KERNEL=y diff --git a/tests/legacy/benchmark/object_footprint/prj08.conf b/tests/benchmarks/object_footprint/prj08.conf similarity index 87% rename from tests/legacy/benchmark/object_footprint/prj08.conf rename to tests/benchmarks/object_footprint/prj08.conf index c86b83d14bc..85191155dc6 100644 --- a/tests/legacy/benchmark/object_footprint/prj08.conf +++ b/tests/benchmarks/object_footprint/prj08.conf @@ -7,11 +7,10 @@ CONFIG_SERIAL=y CONFIG_XIP=y CONFIG_NANO_TIMERS=y CONFIG_OBJECTS_PRINTK=y -CONFIG_OBJECTS_FIBER=y +CONFIG_OBJECTS_THREAD=y CONFIG_OBJECTS_TIMER=y CONFIG_OBJECTS_SEMAPHORE=y CONFIG_OBJECTS_LIFO=y CONFIG_OBJECTS_FIFO=y CONFIG_OBJECTS_STACK=y CONFIG_KERNEL_BIN_NAME="prj08" -CONFIG_LEGACY_KERNEL=y diff --git a/tests/legacy/benchmark/object_footprint/prj09.conf b/tests/benchmarks/object_footprint/prj09.conf similarity index 88% rename from tests/legacy/benchmark/object_footprint/prj09.conf rename to tests/benchmarks/object_footprint/prj09.conf index c7750ee9d7e..91cbc0f27a4 100644 --- a/tests/legacy/benchmark/object_footprint/prj09.conf +++ b/tests/benchmarks/object_footprint/prj09.conf @@ -7,7 +7,7 @@ CONFIG_SERIAL=y CONFIG_XIP=y CONFIG_NANO_TIMERS=y CONFIG_OBJECTS_PRINTK=y -CONFIG_OBJECTS_FIBER=y +CONFIG_OBJECTS_THREAD=y CONFIG_OBJECTS_TIMER=y CONFIG_OBJECTS_SEMAPHORE=y CONFIG_OBJECTS_LIFO=y @@ -15,4 +15,3 @@ CONFIG_OBJECTS_FIFO=y CONFIG_OBJECTS_STACK=y CONFIG_STATIC_ISR=y CONFIG_KERNEL_BIN_NAME="prj09" -CONFIG_LEGACY_KERNEL=y diff --git a/tests/legacy/benchmark/object_footprint/prj10.conf b/tests/benchmarks/object_footprint/prj10.conf similarity index 89% rename from tests/legacy/benchmark/object_footprint/prj10.conf rename to tests/benchmarks/object_footprint/prj10.conf index 612feb00c39..3cf5f866ea8 100644 --- a/tests/legacy/benchmark/object_footprint/prj10.conf +++ b/tests/benchmarks/object_footprint/prj10.conf @@ -7,7 +7,7 @@ CONFIG_SERIAL=y CONFIG_XIP=y CONFIG_NANO_TIMERS=y CONFIG_OBJECTS_PRINTK=y -CONFIG_OBJECTS_FIBER=y +CONFIG_OBJECTS_THREAD=y CONFIG_OBJECTS_TIMER=y CONFIG_OBJECTS_SEMAPHORE=y CONFIG_OBJECTS_LIFO=y @@ -16,4 +16,3 @@ CONFIG_OBJECTS_STACK=y CONFIG_STATIC_ISR=n #CONFIG_TOOLCHAIN_VARIANT="iamcu" CONFIG_KERNEL_BIN_NAME="prj10" -CONFIG_LEGACY_KERNEL=y diff --git a/tests/legacy/benchmark/object_footprint/prj11.conf b/tests/benchmarks/object_footprint/prj11.conf similarity index 78% rename from tests/legacy/benchmark/object_footprint/prj11.conf rename to tests/benchmarks/object_footprint/prj11.conf index bda6fc4e356..6e7c28f0e55 100644 --- a/tests/legacy/benchmark/object_footprint/prj11.conf +++ b/tests/benchmarks/object_footprint/prj11.conf @@ -5,15 +5,12 @@ CONFIG_IDT_NUM_VECTORS=48 CONFIG_CONSOLE=y CONFIG_SERIAL=y CONFIG_XIP=y -CONFIG_NANO_TIMERS=y CONFIG_OBJECTS_PRINTK=y -CONFIG_OBJECTS_FIBER=y +CONFIG_OBJECTS_THREAD=y CONFIG_OBJECTS_TIMER=y CONFIG_OBJECTS_SEMAPHORE=y CONFIG_OBJECTS_LIFO=y CONFIG_OBJECTS_FIFO=y CONFIG_OBJECTS_STACK=y CONFIG_STATIC_ISR=n -CONFIG_NANO_TIMEOUTS=y CONFIG_KERNEL_BIN_NAME="prj11" -CONFIG_LEGACY_KERNEL=y diff --git a/tests/legacy/benchmark/object_footprint/run.sh b/tests/benchmarks/object_footprint/run.sh similarity index 100% rename from tests/legacy/benchmark/object_footprint/run.sh rename to tests/benchmarks/object_footprint/run.sh diff --git a/tests/benchmarks/object_footprint/src/Makefile b/tests/benchmarks/object_footprint/src/Makefile new file mode 100644 index 00000000000..00066e15678 --- /dev/null +++ b/tests/benchmarks/object_footprint/src/Makefile @@ -0,0 +1 @@ +obj-y = main.o diff --git a/tests/legacy/benchmark/object_footprint/src/Makefile b/tests/legacy/benchmark/object_footprint/src/Makefile deleted file mode 100644 index d30b91fae44..00000000000 --- a/tests/legacy/benchmark/object_footprint/src/Makefile +++ /dev/null @@ -1 +0,0 @@ -obj-y = nanokernel_objects.o diff --git a/tests/legacy/benchmark/object_footprint/src/nanokernel_objects.c b/tests/legacy/benchmark/object_footprint/src/nanokernel_objects.c deleted file mode 100644 index 91cd72b7020..00000000000 --- a/tests/legacy/benchmark/object_footprint/src/nanokernel_objects.c +++ /dev/null @@ -1,119 +0,0 @@ -/* - * Copyright (c) 2015 Intel Corporation. - * - * SPDX-License-Identifier: Apache-2.0 - */ - -#include -#include - - -#include -#include - -#ifdef CONFIG_OBJECTS_WHILELOOP -volatile int i = 0; -#endif - -#define IRQ_LINE 10 -#define IRQ_PRIORITY 3 -#define TEST_SOFT_INT 64 -#define TEST_IRQ_OFFLOAD_VECTOR 32 - -#define FIBER_STACK_SIZE CONFIG_FIBER_STACK_SIZE - -typedef void* (*pfunc) (void*); - -/* variables */ - -#define MESSAGE "Running maximal nanokernel configuration\n" - -/* stack used by fiber */ -#ifdef CONFIG_OBJECTS_FIBER -static char __stack pStack[FIBER_STACK_SIZE]; -#endif - -/* pointer array ensures specified functions are linked into the image */ -volatile pfunc func_array[] = { - /* nano timer functions */ -#ifdef CONFIG_OBJECTS_TIMER - (pfunc)nano_timer_init, - (pfunc)nano_fiber_timer_start, - (pfunc)nano_fiber_timer_test, -#endif - - /* nano semaphore functions */ -#ifdef CONFIG_OBJECTS_SEMAPHORE - (pfunc)nano_sem_init, - (pfunc)nano_fiber_sem_take, - (pfunc)nano_fiber_sem_give, -#endif - - /* nano LIFO functions */ -#ifdef CONFIG_OBJECTS_LIFO - (pfunc)nano_lifo_init, - (pfunc)nano_fiber_lifo_put, - (pfunc)nano_fiber_lifo_get, -#endif - /* nano stack functions */ -#ifdef CONFIG_OBJECTS_STACK - (pfunc)nano_stack_init, - (pfunc)nano_fiber_stack_push, - (pfunc)nano_fiber_stack_pop, -#endif - /* nano FIFO functions */ -#ifdef CONFIG_OBJECTS_FIFO - (pfunc)nano_fifo_init, - (pfunc)nano_fiber_fifo_put, - (pfunc)nano_fiber_fifo_get, -#endif - -}; - -void dummyIsr(void *unused) -{ - ARG_UNUSED(unused); -} - -#ifdef CONFIG_OBJECTS_FIBER - -/** - * - * @brief Trivial fiber - * - * @param message Message to be printed. - * @param arg1 Unused. - * - * @return N/A - */ -static void fiberEntry(int message, int arg1) -{ - ARG_UNUSED(arg1); - printk((char *)message); -} -#endif - - - -void main(void) -{ -#ifdef CONFIG_OBJECTS_PRINTK - printk("Using printk\n"); -#endif - -#if CONFIG_STATIC_ISR - IRQ_CONNECT(IRQ_LINE, IRQ_PRIORITY, dummyIsr, NULL, 0); -#endif - -#ifdef CONFIG_OBJECTS_FIBER - /* start a trivial fiber */ - task_fiber_start(pStack, FIBER_STACK_SIZE, fiberEntry, (int) MESSAGE, - (int) func_array, 10, 0); -#endif - -#ifdef CONFIG_OBJECTS_WHILELOOP - while (1) { - i++; - } -#endif -}