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

tests/posix_sleep: fix for invalid RTT configurations #15794

Merged
merged 3 commits into from
Jan 20, 2021

Conversation

fjmolinas
Copy link
Contributor

Contribution description

While testing RIOT-OS/Release-Specs#202 I found that posix_sleep was failing because of invalid RTT configurations. The proper fix is different than the one proposed here, I think it would mean adding a feature, but for a realease backport this is IMO the smallest change.

Testing procedure

Test on iotab-m3 now passes same for any kinetis or efm32 BOARD.

@fjmolinas fjmolinas added Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors) Area: tests Area: tests and testing framework Process: needs backport Integration Process: The PR is required to be backported to a release or feature branch labels Jan 19, 2021
Copy link
Contributor

@aabadie aabadie left a comment

Choose a reason for hiding this comment

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

Initial comments :)

These CPU families have a non configurable RTT of 1Hz, not enough for
ztimer_msec to run on periph_rtt.
@fjmolinas fjmolinas added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label Jan 19, 2021
@fjmolinas
Copy link
Contributor Author

ping @aabadie :)

Copy link
Contributor

@aabadie aabadie left a comment

Choose a reason for hiding this comment

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

works on iotlab-m3
make BOARD=iotlab-m3 -C tests/posix_sleep flash test IOTLAB_NODE=auto-ssh
make: Entering directory '/work/riot/RIOT/tests/posix_sleep'
Building application "tests_posix_sleep" for "iotlab-m3" with MCU "stm32".

"make" -C /work/riot/RIOT/boards/iotlab-m3
"make" -C /work/riot/RIOT/boards/common/iotlab
"make" -C /work/riot/RIOT/core
"make" -C /work/riot/RIOT/cpu/stm32
"make" -C /work/riot/RIOT/cpu/cortexm_common
"make" -C /work/riot/RIOT/cpu/cortexm_common/periph
"make" -C /work/riot/RIOT/cpu/stm32/periph
"make" -C /work/riot/RIOT/cpu/stm32/stmclk
"make" -C /work/riot/RIOT/cpu/stm32/vectors
"make" -C /work/riot/RIOT/drivers
"make" -C /work/riot/RIOT/drivers/periph_common
"make" -C /work/riot/RIOT/sys
"make" -C /work/riot/RIOT/sys/auto_init
"make" -C /work/riot/RIOT/sys/frac
"make" -C /work/riot/RIOT/sys/isrpipe
"make" -C /work/riot/RIOT/sys/malloc_thread_safe
"make" -C /work/riot/RIOT/sys/newlib_syscalls_default
"make" -C /work/riot/RIOT/sys/pm_layered
"make" -C /work/riot/RIOT/sys/posix/sleep
"make" -C /work/riot/RIOT/sys/stdio_uart
"make" -C /work/riot/RIOT/sys/test_utils/interactive_sync
"make" -C /work/riot/RIOT/sys/tsrb
"make" -C /work/riot/RIOT/sys/ztimer
   text	   data	    bss	    dec	    hex	filename
  12288	    176	   2520	  14984	   3a88	/work/riot/RIOT/tests/posix_sleep/bin/iotlab-m3/tests_posix_sleep.elf
iotlab-node --jmespath='keys(@)[0]' --format='int'  --list saclay,m3,1 --flash /work/riot/RIOT/tests/posix_sleep/bin/iotlab-m3/tests_posix_sleep.bin | grep 0
0
r
ssh -t [email protected] 'socat - tcp:m3-1.saclay.iot-lab.info:20000' 
READY
s
START
main(): This is RIOT! (Version: 2021.04-devel-68-gbafca-review_posix_sleep)
5 x usleep(i++ * 500000)
wake up
wake up
wake up
wake up
wake up
5 x sleep(i++)
wake up
wake up
wake up
wake up
wake up
DONE
works on arduino-zero
make BOARD=arduino-zero -C tests/posix_sleep flash test IOTLAB_NODE=auto-ssh
make: Entering directory '/work/riot/RIOT/tests/posix_sleep'
Building application "tests_posix_sleep" for "arduino-zero" with MCU "samd21".

"make" -C /work/riot/RIOT/boards/arduino-zero
"make" -C /work/riot/RIOT/boards/common/arduino-zero
"make" -C /work/riot/RIOT/core
"make" -C /work/riot/RIOT/cpu/samd21
"make" -C /work/riot/RIOT/cpu/cortexm_common
"make" -C /work/riot/RIOT/cpu/cortexm_common/periph
"make" -C /work/riot/RIOT/cpu/sam0_common
"make" -C /work/riot/RIOT/cpu/sam0_common/periph
"make" -C /work/riot/RIOT/cpu/samd21/periph
"make" -C /work/riot/RIOT/cpu/samd21/vectors
"make" -C /work/riot/RIOT/drivers
"make" -C /work/riot/RIOT/drivers/periph_common
"make" -C /work/riot/RIOT/sys
"make" -C /work/riot/RIOT/sys/auto_init
"make" -C /work/riot/RIOT/sys/frac
"make" -C /work/riot/RIOT/sys/isrpipe
"make" -C /work/riot/RIOT/sys/malloc_thread_safe
"make" -C /work/riot/RIOT/sys/newlib_syscalls_default
"make" -C /work/riot/RIOT/sys/pm_layered
"make" -C /work/riot/RIOT/sys/posix/sleep
"make" -C /work/riot/RIOT/sys/stdio_uart
"make" -C /work/riot/RIOT/sys/test_utils/interactive_sync
"make" -C /work/riot/RIOT/sys/tsrb
"make" -C /work/riot/RIOT/sys/ztimer
   text	   data	    bss	    dec	    hex	filename
  13088	    176	   2516	  15780	   3da4	/work/riot/RIOT/tests/posix_sleep/bin/arduino-zero/tests_posix_sleep.elf
iotlab-node --jmespath='keys(@)[0]' --format='int'  --list saclay,arduino-zero,1 --flash /work/riot/RIOT/tests/posix_sleep/bin/arduino-zero/tests_posix_sleep.bin | grep 0
0
r
ssh -t [email protected] 'socat - tcp:arduino-zero-1.saclay.iot-lab.info:20000' 
READY
s
START
main(): This is RIOT! (Version: 2021.04-devel-68-gbafca-review_posix_sleep)
5 x usleep(i++ * 500000)
wake up
wake up
wake up
wake up
wake up
5 x sleep(i++)
wake up
wake up
wake up
wake up
wake up
DONE

I don't have a kinetis and efm32 for testing but I trust your testing.

ACK

@aabadie aabadie merged commit 5bc7555 into RIOT-OS:master Jan 20, 2021
@aabadie
Copy link
Contributor

aabadie commented Jan 28, 2021

@fjmolinas this one still needs a backport !

@fjmolinas
Copy link
Contributor Author

Backport provided in #15876

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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 Process: needs backport Integration Process: The PR is required to be backported to a release or feature branch 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.

2 participants