Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
19621: sys: add Kconfig support for clif r=MrKevinWeiss a=aabadie



19622: sys: add some missing kconfig + adapt related tests when possible r=aabadie a=aabadie



19623: pkg/libbase58: add kconfig support r=MrKevinWeiss a=aabadie



19626: sys/gnrc_lorawan: remove deprecated tx port option r=aabadie a=aabadie



19627: makefiles/pseudomodules: remove deprecated event_thread_lowest module r=aabadie a=aabadie



Co-authored-by: Alexandre Abadie <alexandre.abadie@inria.fr>
  • Loading branch information
bors[bot] and aabadie committed May 20, 2023
6 parents a08b90c + f28d0f1 + 12a6ed0 + 609ba37 + 889d753 + 558d7dd commit 975f150
Show file tree
Hide file tree
Showing 20 changed files with 104 additions and 42 deletions.
1 change: 0 additions & 1 deletion makefiles/deprecated_modules.inc.mk
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# Add deprecated modules here
# Keep this list ALPHABETICALLY SORTED!!!!111elven
DEPRECATED_MODULES += event_thread_lowest
DEPRECATED_MODULES += gnrc_netdev_default
DEPRECATED_MODULES += gnrc_netif_cmd_lora # use shell_cmd_gnrc_netif_lorawan instead
DEPRECATED_MODULES += gnrc_pktbuf_cmd # use shell_cmd_gnrc_pktbuf instead
Expand Down
7 changes: 0 additions & 7 deletions makefiles/pseudomodules.inc.mk
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,6 @@ PSEUDOMODULES += dns_msg
PSEUDOMODULES += ecc_%
PSEUDOMODULES += ethos_stdio
PSEUDOMODULES += event_%
## @defgroup sys_event_thread_lowest event_thread_lowest
## @ingroup sys_event
## @{
## @deprecated Use module `event_thread` instead (see @ref event/thread.h);
## Will be removed after 2021.10 release.
PSEUDOMODULES += event_thread_lowest
## @}
PSEUDOMODULES += event_timeout
PSEUDOMODULES += event_timeout_ztimer
PSEUDOMODULES += evtimer_mbox
Expand Down
1 change: 1 addition & 0 deletions pkg/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ rsource "heatshrink/Kconfig"
rsource "jerryscript/Kconfig"
rsource "jsmn/Kconfig"
rsource "libb2/Kconfig"
rsource "libbase58/Kconfig"
rsource "libcose/Kconfig"
rsource "libfixmath/Kconfig"
rsource "libhydrogen/Kconfig"
Expand Down
12 changes: 12 additions & 0 deletions pkg/libbase58/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 PACKAGE_LIBBASE58
bool "Bitcoin's base58 encoding"
depends on TEST_KCONFIG

select MODULE_POSIX_HEADERS
6 changes: 6 additions & 0 deletions sys/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ rsource "bus/Kconfig"
rsource "cb_mux/Kconfig"
rsource "checksum/Kconfig"
rsource "chunked_ringbuffer/Kconfig"
rsource "clif/Kconfig"
rsource "color/Kconfig"
rsource "crypto/Kconfig"
rsource "congure/Kconfig"
Expand Down Expand Up @@ -72,6 +73,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 +96,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 +110,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
10 changes: 10 additions & 0 deletions sys/clif/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# 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_CLIF
bool "CoRE Link format encoding and decoding library"
depends on TEST_KCONFIG
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
3 changes: 0 additions & 3 deletions sys/include/event/thread.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,6 @@
* event queue gets its own thread. So higher priority events will always
* preempt events of lower priority in this case.
*
* Finally, the module [event_thread_lowest](@ref sys_event_thread_lowest) is
* provided for backward compatibility and has no effect.
*
* @{
*
* @file
Expand Down
20 changes: 0 additions & 20 deletions sys/include/net/netopt.h
Original file line number Diff line number Diff line change
Expand Up @@ -652,26 +652,6 @@ typedef enum {
*/
NETOPT_LORAWAN_PUBLIC_NETWORK,

/**
* @brief (uint8_t) LoRaWAN TX application port
* - LoRaWAN: between 1 and 223 (included)
*
* @deprecated This option is deprecated and will be removed in the
* 2022.01 Release.
* The port is encoded now as a one byte
* destination address in a @ref net_gnrc_netif_hdr snip
* prepended in the packet.
* The user must take care of prepending the required snip
* during transmission. On reception, the
* snip is prepended automatically by the stack and shall be
* consumed by the user.
* During the deprecation period it is required to
* compile with @ref
* CONFIG_GNRC_NETIF_LORAWAN_NETIF_HDR
*
*/
NETOPT_LORAWAN_TX_PORT,

/**
* @brief (loramac_dr_idx_t) LoRaWAN datarate for second RX window
* - LoRaWAN: @ref loramac_dr_idx_t
Expand Down
1 change: 0 additions & 1 deletion sys/net/crosslayer/netopt/netopt.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@ static const char *_netopt_strmap[] = {
[NETOPT_LORAWAN_DR] = "NETOPT_LORAWAN_DR",
[NETOPT_LORAWAN_ADR] = "NETOPT_LORAWAN_ADR",
[NETOPT_LORAWAN_PUBLIC_NETWORK]= "NETOPT_LORAWAN_PUBLIC_NETWORK",
[NETOPT_LORAWAN_TX_PORT] = "NETOPT_LORAWAN_TX_PORT",
[NETOPT_LORAWAN_RX2_DR] = "NETOPT_LORAWAN_RX2_DR",
[NETOPT_LORAWAN_RX2_FREQ] = "NETOPT_LORAWAN_RX2_FREQ",
[NETOPT_LORAWAN_MAX_RX_ERROR] = "NETOPT_LORAWAN_MAX_RX_ERROR",
Expand Down
4 changes: 0 additions & 4 deletions sys/net/gnrc/netif/lorawan/gnrc_netif_lorawan.c
Original file line number Diff line number Diff line change
Expand Up @@ -506,10 +506,6 @@ static int _set(gnrc_netif_t *netif, const gnrc_netapi_opt_t *opt)
}
netif->lorawan.datarate = *((uint8_t *)opt->data);
break;
case NETOPT_LORAWAN_TX_PORT:
assert(opt->data_len == sizeof(uint8_t));
netif->lorawan.port = *((uint8_t *)opt->data);
break;
case NETOPT_ACK_REQ:
assert(opt->data_len == sizeof(netopt_enable_t));
netif->lorawan.ack_req = *((netopt_enable_t *)opt->data);
Expand Down
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
2 changes: 2 additions & 0 deletions tests/pkg/libbase58/app.config.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
CONFIG_MODULE_EMBUNIT=y
CONFIG_PACKAGE_LIBBASE58=y
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

0 comments on commit 975f150

Please sign in to comment.