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/ztimer64: fix ztimer64_remove() not properly clearing timer struct #17720

Merged
merged 2 commits into from
Mar 1, 2022

Conversation

kaspar030
Copy link
Contributor

Contribution description

ztimer64 wasn't properly clearing a removed timer struct, but depended on that for it's ztimer64_is_set().

This PR adds a fix, and a regression test.

regression test output with the fix reverted:

main(): This is RIOT! (Version: 2022.04-devel-568-g33dae8-fix_ztimer64_remove)
Help: Press s to start test, r to print it is ready
rs
READY
START
.......
ztimer64_tests.test_ztimer64_remove_clear (tests/unittests/tests-ztimer64/tests-ztimer64-core.c 238) !ztimer64_is_set(&timer)

run 7 failures 1

Testing procedure

CI tests this now. :)

Issues/PRs references

Found with #17365.

@kaspar030 kaspar030 added Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors) CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR labels Mar 1, 2022
@kaspar030 kaspar030 requested a review from miri64 as a code owner March 1, 2022 10:06
@github-actions github-actions bot added Area: sys Area: System Area: tests Area: tests and testing framework labels Mar 1, 2022
Copy link
Contributor

@fjmolinas fjmolinas left a comment

Choose a reason for hiding this comment

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

Nice catch! Thanks!

@kaspar030 kaspar030 changed the title Fix ztimer64 remove sys/ztimer64: fix ztimer64_remove() not properly clearing timer struct Mar 1, 2022
@fjmolinas
Copy link
Contributor

Independent build failure

--- result: BUILD FAILED!

--- [JUMP TO FIRST ERROR OUTPUT](https://ci.riot-os.org/RIOT-OS/RIOT/17720/e9227153c0b468811679f31750b7ee667df9169a/output.html#error0)

--- static tests: passed
-- running on worker riotbuild-0 thread 4, build number 173819.
--- can_fast_ci_run:
Currently changing modules require a full CI run

-- can_fast_ci_run.py exited non-zero

---
--- compile job results (1 failed, 106927 passed, 106928 total):
-- running on worker mobi3 thread 6, build number 111071.
make: Entering directory '/tmp/dwq.0.566681958266741/9708fce03c297ce05e3ed75e81cf3c56/examples/hello-world'
rm -rf /tmp/dwq.0.566681958266741/9708fce03c297ce05e3ed75e81cf3c56/build/pkg-build/esp8266_sdk
make: Leaving directory '/tmp/dwq.0.566681958266741/9708fce03c297ce05e3ed75e81cf3c56/examples/hello-world'
make: Entering directory '/tmp/dwq.0.566681958266741/9708fce03c297ce05e3ed75e81cf3c56/examples/hello-world'
[INFO] cloning esp8266_sdk
Building application "hello-world" for "esp8266-esp-12x" with MCU "esp8266".

git-cache: cloning from cache. tag=commit913a06a9ac3b2f18009e8fee8f092ca9ffeccd38-2924006
[INFO] updating esp8266_sdk /tmp/dwq.0.566681958266741/9708fce03c297ce05e3ed75e81cf3c56/build/pkg/esp8266_sdk/.pkg-state.git-downloaded
echo 913a06a9ac3b2f18009e8fee8f092ca9ffeccd38 > /tmp/dwq.0.566681958266741/9708fce03c297ce05e3ed75e81cf3c56/build/pkg/esp8266_sdk/.pkg-state.git-downloaded
[INFO] patch esp8266_sdk
   text	   data	    bss	    dec	    hex	filename
 275656	   5284	  28592	 309532	  4b91c	/tmp/dwq.0.566681958266741/9708fce03c297ce05e3ed75e81cf3c56/build/hello-world.elf
esptool.py v2.4.0
Parsing CSV input...
sha1sum /tmp/dwq.0.566681958266741/9708fce03c297ce05e3ed75e81cf3c56/build/hello-world.elf /tmp/dwq.0.566681958266741/9708fce03c297ce05e3ed75e81cf3c56/build/hello-world.elf.bin /tmp/dwq.0.566681958266741/9708fce03c297ce05e3ed75e81cf3c56/build/partitions.bin > /tmp/dwq.0.566681958266741/9708fce03c297ce05e3ed75e81cf3c56/build/test-input-hash.sha1
make: Leaving directory '/tmp/dwq.0.566681958266741/9708fce03c297ce05e3ed75e81cf3c56/examples/hello-world'
make: Entering directory '/tmp/dwq.0.566681958266741/9708fce03c297ce05e3ed75e81cf3c56/examples/hello-world'
Building application "hello-world" for "esp8266-esp-12x" with MCU "esp8266".
rm -rf /tmp/dwq.0.566681958266741/9708fce03c297ce05e3ed75e81cf3c56/build/pkg-build/esp8266_sdk

[INFO] cloning esp8266_sdk
git-cache: cloning from cache. tag=commit913a06a9ac3b2f18009e8fee8f092ca9ffeccd38-2952351
[INFO] updating esp8266_sdk /tmp/dwq.0.566681958266741/9708fce03c297ce05e3ed75e81cf3c56/build/pkg/esp8266_sdk/.pkg-state.git-downloaded
echo 913a06a9ac3b2f18009e8fee8f092ca9ffeccd38 > /tmp/dwq.0.566681958266741/9708fce03c297ce05e3ed75e81cf3c56/build/pkg/esp8266_sdk/.pkg-state.git-downloaded
[INFO] patch esp8266_sdk
   text	   data	    bss	    dec	    hex	filename
 275768	   5284	  28592	 309644	  4b98c	/tmp/dwq.0.566681958266741/9708fce03c297ce05e3ed75e81cf3c56/build/hello-world.elf
esptool.py v2.4.0
Parsing CSV input...
sha1sum /tmp/dwq.0.566681958266741/9708fce03c297ce05e3ed75e81cf3c56/build/hello-world.elf /tmp/dwq.0.566681958266741/9708fce03c297ce05e3ed75e81cf3c56/build/hello-world.elf.bin /tmp/dwq.0.566681958266741/9708fce03c297ce05e3ed75e81cf3c56/build/partitions.bin > /tmp/dwq.0.566681958266741/9708fce03c297ce05e3ed75e81cf3c56/build/test-input-hash.sha1
make: Leaving directory '/tmp/dwq.0.566681958266741/9708fce03c297ce05e3ed75e81cf3c56/examples/hello-world'
Hashes of binaries with and without Kconfig mismatch for examples/hello-world with esp8266-esp-12x
Please check that all used modules are modelled in Kconfig and enabled
rm -rf /tmp/dwq.0.566681958266741/9708fce03c297ce05e3ed75e81cf3c56/build/pkg-build/esp8266_sdk
rm -rf /tmp/dwq.0.566681958266741/9708fce03c297ce05e3ed75e81cf3c56/build/pkg-build/esp8266_sdk
-- build directory size: 100K

@fjmolinas fjmolinas added CI: skip compile test If set, CI server will run only non-compile jobs, but no compile jobs or their dependent jobs CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR and removed CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR labels Mar 1, 2022
@fjmolinas fjmolinas enabled auto-merge March 1, 2022 11:46
@fjmolinas fjmolinas merged commit fcc962e into RIOT-OS:master Mar 1, 2022
@OlegHahm OlegHahm added this to the Release 2022.04 milestone Apr 25, 2022
@kaspar030 kaspar030 deleted the fix_ztimer64_remove branch November 25, 2022 07:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: sys Area: System Area: tests Area: tests and testing framework CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR CI: skip compile test If set, CI server will run only non-compile jobs, but no compile jobs or their dependent jobs Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants