Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sys: add some missing kconfig + adapt related tests when possible #19622

Merged
merged 8 commits into from
May 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions sys/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ choice LOG
#modules log_color and log_printfnoformat describe their options
endchoice

rsource "coding/Kconfig"
rsource "log_color/Kconfig"
rsource "log_printfnoformat/Kconfig"
rsource "luid/Kconfig"
Expand All @@ -94,9 +95,11 @@ rsource "rust_riotmodules/Kconfig"
rsource "saul_reg/Kconfig"
rsource "schedstatistics/Kconfig"
rsource "sema/Kconfig"
rsource "sema_inv/Kconfig"
rsource "senml/Kconfig"
rsource "seq/Kconfig"
rsource "shell/Kconfig"
rsource "ssp/Kconfig"
rsource "test_utils/Kconfig"
rsource "timex/Kconfig"
rsource "tiny_strerror/Kconfig"
Expand All @@ -106,6 +109,8 @@ rsource "tsrb/Kconfig"
rsource "uri_parser/Kconfig"
rsource "usb/Kconfig"
rsource "usb_board_reset/Kconfig"
rsource "ut_process/Kconfig"
rsource "uuid/Kconfig"
rsource "vfs/Kconfig"
rsource "xtimer/Kconfig"
rsource "ztimer/Kconfig"
Expand Down
12 changes: 12 additions & 0 deletions sys/coding/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Copyright (c) 2023 Inria
#
# 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 MODULE_CODING
bool "Error correction codes"
depends on TEST_KCONFIG

select MODULE_BITFIELD
12 changes: 12 additions & 0 deletions sys/sema_inv/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Copyright (c) 2023 Inria
#
# 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 MODULE_SEMA_INV
bool "inverse Semaphores"
depends on TEST_KCONFIG

select MODULE_ATOMIC_UTILS
12 changes: 12 additions & 0 deletions sys/ssp/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Copyright (c) 2023 Inria
#
# 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 MODULE_SSP
bool "Stack Smashing Protector (SSP) helper functions"
depends on TEST_KCONFIG

select HAS_SSP
12 changes: 12 additions & 0 deletions sys/ut_process/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Copyright (c) 2023 Inria
#
# 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 MODULE_UT_PROCESS
bool "URI template processor"
depends on TEST_KCONFIG

select MODULE_FMT
14 changes: 14 additions & 0 deletions sys/uuid/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Copyright (c) 2023 Inria
#
# 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 MODULE_UUID
bool "RFC 4122 compliant UUID's"
depends on TEST_KCONFIG

select MODULE_HASHES
select MODULE_RANDOM
select MODULE_FMT
3 changes: 2 additions & 1 deletion tests/sys/sema_inv/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
include ../Makefile.sys_common

USEMODULE += sema_inv
USEMODULE += xtimer
USEMODULE += ztimer
USEMODULE += ztimer_msec

include $(RIOTBASE)/Makefile.include
3 changes: 3 additions & 0 deletions tests/sys/sema_inv/app.config.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
CONFIG_MODULE_SEMA_INV=y
CONFIG_MODULE_ZTIMER=y
CONFIG_MODULE_ZTIMER_MSEC=y
10 changes: 5 additions & 5 deletions tests/sys/sema_inv/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#include <stdio.h>

#include "sema_inv.h"
#include "xtimer.h"
#include "ztimer.h"

char t1_stack[THREAD_STACKSIZE_SMALL];
char t2_stack[THREAD_STACKSIZE_SMALL];
Expand All @@ -38,7 +38,7 @@ static void *thread_count(void *arg)

printf("THREAD %u start\n", ctx->id);

xtimer_msleep(5);
ztimer_sleep(ZTIMER_MSEC, 5);

if (sema_inv_post(ctx->sync)) {
printf("THREAD %u woke main thread\n", ctx->id);
Expand All @@ -53,7 +53,7 @@ static void *thread_bit(void *arg)

printf("THREAD %u start\n", ctx->id);

xtimer_msleep(5);
ztimer_sleep(ZTIMER_MSEC, 5);

if (sema_inv_post_mask(ctx->sync, 1 << ctx->id)) {
printf("THREAD %u woke main thread\n", ctx->id);
Expand Down Expand Up @@ -86,7 +86,7 @@ static void test_counter_mode(void)
puts("thread synced");

/* wait for all threads to terminate, we are going to re-use the stack */
xtimer_msleep(50);
ztimer_sleep(ZTIMER_MSEC, 50);
}

static void test_mask_mode(void)
Expand All @@ -113,7 +113,7 @@ static void test_mask_mode(void)
puts("thread synced");

/* wait for all threads to terminate, we are going to re-use the stack */
xtimer_msleep(50);
ztimer_sleep(ZTIMER_MSEC, 50);
}

int main(void)
Expand Down
1 change: 1 addition & 0 deletions tests/sys/ssp/app.config.test
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CONFIG_MODULE_SSP=y