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: model ecc, evtimer, pipe and shell_lock in kconfig #19636

Merged
merged 11 commits into from
May 24, 2023

Conversation

aabadie
Copy link
Contributor

@aabadie aabadie commented May 20, 2023

Contribution description

This PR also drops the xtimer backend from evtimer so simplify the Kconfig dependency modeling.
For shell_lock, I tried to expose some compile time configuration as Kconfig option but for some reason the automated test doesn't work with TEST_KCONFIG=1 on native. Some Kconfig expert help is appreciated for this one.

I can split in smaller PRs of needed.

Testing procedure

  • Green CI

Issues/PRs references

Tick some items in #16875

@aabadie aabadie added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label May 20, 2023
@github-actions github-actions bot added Area: build system Area: Build system Area: Kconfig Area: Kconfig integration Area: sys Area: System Area: tests Area: tests and testing framework Area: timers Area: timer subsystems labels May 20, 2023
@aabadie aabadie force-pushed the pr/sys/more_kconfig branch from 899de84 to da83670 Compare May 20, 2023 16:38
@riot-ci
Copy link

riot-ci commented May 20, 2023

Murdock results

✔️ PASSED

8b53e74 tests/net/gnrc_netif: remove non necessary xtimer include

Success Failures Total Runtime
6932 0 6933 10m:47s

Artifacts

@aabadie aabadie added the CI: no fast fail don't abort PR build after first error label May 21, 2023
@github-actions github-actions bot added the Area: network Area: Networking label May 21, 2023
@aabadie aabadie requested a review from miri64 as a code owner May 21, 2023 06:42
@MrKevinWeiss
Copy link
Contributor

After a bit of digging I think I figured out why there is a hash mismatch for native and tests/sys/shell_lock.

The problem is that CONFIG_SHELL_SHUTDOWN_ON_EXIT should be 0 for the kconfig, but, when you turn off a symbol in kconfig it just doesn't set anything rather than explicitly setting it to 0. This can be found by looking in the tests/sys/shell_lock/bin/native/generated/autoconf.h.

Now, since we have the logic of enabling it by default if native also in the header file, and kconfig does not explicitly set it to 0, it would enable by default, even though we want it disabled...

The possible solutions would be:

  1. remove the logic in the header file, meaning that make would have to implement that logic somewhere.
  2. Not only disable it in the app.config.test but also keep define the cflag for both kconfig and make, ie:
diff --git a/tests/sys/shell_lock/Makefile b/tests/sys/shell_lock/Makefile
index 78f8bdb5fd..f7e3ccfd88 100644
--- a/tests/sys/shell_lock/Makefile
+++ b/tests/sys/shell_lock/Makefile
@@ -10,11 +10,12 @@ USEMODULE += shell_lock_auto_locking
 ifneq (1,$(TEST_KCONFIG))
 CFLAGS += -DCONFIG_SHELL_LOCK_PASSWORD=\"password\"
 CFLAGS += -DCONFIG_SHELL_LOCK_AUTO_LOCK_TIMEOUT_MS=7000
+endif
 
 # This config defaults to 1 on native, such that pm_off() would be called as soon as
 # shell_run_once is terminated in shell_run_forever. We do not want this behavior for this test.
 CFLAGS += -DCONFIG_SHELL_SHUTDOWN_ON_EXIT=0
-endif
+
 
 # test_utils_interactive_sync_shell assumes that the prompt is always '> ' which breaks
 # with the password prompt of the shell_lock module which is different from the shell's prompt
  1. Add an override symbol that would be set in order to override it only in kconfig.

@aabadie aabadie force-pushed the pr/sys/more_kconfig branch from da854bb to a667267 Compare May 22, 2023 12:32
sys/include/evtimer.h Outdated Show resolved Hide resolved
Copy link
Member

@maribu maribu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. See above comment. Please squash / amend directly, my ACK remains valid.

Copy link
Contributor

@MrKevinWeiss MrKevinWeiss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, if murdock is happy I think it is OK. ACK.

@aabadie aabadie force-pushed the pr/sys/more_kconfig branch from a667267 to 0ef40af Compare May 23, 2023 08:02
@MrKevinWeiss
Copy link
Contributor

bors merge

@bors
Copy link
Contributor

bors bot commented May 23, 2023

🕐 Waiting for PR status (GitHub check) to be set, probably by CI. Bors will automatically try to run when all required PR statuses are set.

@bors
Copy link
Contributor

bors bot commented May 23, 2023

GitHub status checks took too long to complete, so bors is giving up. You can adjust bors configuration to have it wait longer if you like.

bors bot added a commit that referenced this pull request May 23, 2023
19620: dist/tools/openocd: fix parsing of flash bank base r=aabadie a=maribu

### Contribution description

Since [80fc9fabc66a0bc767467fa14c703e5a9f340cd3] the format of the `flash list` command changed to a more human readable multi-line variant. Technically, the change is white-space only. Still, the current approach of parsing them with awk, sed and cut doesn't like the new multi-line format. The parsing is now delegated into a python script that is compatible across OpenOCD versions.

[80fc9fabc66a0bc767467fa14c703e5a9f340cd3]: openocd-org/openocd@80fc9fa


19636: sys: model ecc, evtimer, pipe and shell_lock in kconfig r=aabadie a=aabadie



19639: tests/net/gnrc_mac_timeout: add automated test r=aabadie a=aabadie



Co-authored-by: Marian Buschsieweke <[email protected]>
Co-authored-by: Alexandre Abadie <[email protected]>
@bors
Copy link
Contributor

bors bot commented May 23, 2023

Build failed (retrying...):

@maribu
Copy link
Member

maribu commented May 23, 2023

diff --git a/tests/net/gnrc_netif/main.c b/tests/net/gnrc_netif/main.c
index 34fff1e905..caf86553e1 100644
--- a/tests/net/gnrc_netif/main.c
+++ b/tests/net/gnrc_netif/main.c
@@ -38,7 +38,6 @@
 #include "net/netif.h"
 #include "test_utils/expect.h"
 #include "utlist.h"
-#include "xtimer.h"
 
 #define ETHERNET_STACKSIZE          (THREAD_STACKSIZE_MAIN)
 #define IEEE802154_STACKSIZE        (THREAD_STACKSIZE_MAIN)

is required to fix the build failure for the waspmote-pro. (That board is fundamentally incompatible with xtimer. If USEMODULE += xtimer is used, ztimer_xtimer_compat is pulled in. But any #include "xtimer.h" without an USEMODULE += xtimer will break utterly, sadly.)

@maribu
Copy link
Member

maribu commented May 23, 2023

bors cancel

(The compilation issue with the waspmote-pro will cause this to fail again anyway, so let's take this out of the merge train for now.)

@bors
Copy link
Contributor

bors bot commented May 23, 2023

Canceled.

@aabadie aabadie force-pushed the pr/sys/more_kconfig branch from 0ef40af to 8b53e74 Compare May 24, 2023 08:15
@aabadie
Copy link
Contributor Author

aabadie commented May 24, 2023

bors merge

@bors
Copy link
Contributor

bors bot commented May 24, 2023

🕐 Waiting for PR status (GitHub check) to be set, probably by CI. Bors will automatically try to run when all required PR statuses are set.

@bors
Copy link
Contributor

bors bot commented May 24, 2023

GitHub status checks took too long to complete, so bors is giving up. You can adjust bors configuration to have it wait longer if you like.

@aabadie
Copy link
Contributor Author

aabadie commented May 24, 2023

bors merge

@bors
Copy link
Contributor

bors bot commented May 24, 2023

🕐 Waiting for PR status (GitHub check) to be set, probably by CI. Bors will automatically try to run when all required PR statuses are set.

bors bot added a commit that referenced this pull request May 24, 2023
19636: sys: model ecc, evtimer, pipe and shell_lock in kconfig r=aabadie a=aabadie



Co-authored-by: Alexandre Abadie <[email protected]>
@aabadie
Copy link
Contributor Author

aabadie commented May 24, 2023

bors cancel

@bors
Copy link
Contributor

bors bot commented May 24, 2023

Canceled.

@aabadie
Copy link
Contributor Author

aabadie commented May 24, 2023

bors merge

@bors
Copy link
Contributor

bors bot commented May 24, 2023

Build succeeded!

The publicly hosted instance of bors-ng is deprecated and will go away soon.

If you want to self-host your own instance, instructions are here.
For more help, visit the forum.

If you want to switch to GitHub's built-in merge queue, visit their help page.

@bors bors bot merged commit 7d16a1b into RIOT-OS:master May 24, 2023
@aabadie aabadie deleted the pr/sys/more_kconfig branch May 25, 2023 13:40
@benpicco benpicco added this to the Release 2023.07 milestone Aug 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: build system Area: Build system Area: Kconfig Area: Kconfig integration Area: network Area: Networking Area: sys Area: System Area: tests Area: tests and testing framework Area: timers Area: timer subsystems CI: no fast fail don't abort PR build after first error CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants