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/xtimer_mutex_lock_timeout: cleanup python automated test #15369

Merged

Conversation

aabadie
Copy link
Contributor

@aabadie aabadie commented Nov 3, 2020

Contribution description

This PR is a small clean of the tests/xtimer_mutex_lock_timeout Python test script: it uses expect_exact where appropriate and declare the expect regexp as raw string to avoid the flake8 error tests/sys/xtimer_mutex_lock_timeout/tests/01-run.py:32:30: W605 invalid escape sequence '\d'

Testing procedure

  • A green Murdock
  • Check the automated test script is still working:
$ make -C tests/xtimer_mutex_lock_timeout/ all test --no-print-directory 
Building application "tests_xtimer_mutex_lock_timeout" for "native" with MCU "native".

"make" -C /work/riot/RIOT/boards/native
"make" -C /work/riot/RIOT/boards/native/drivers
"make" -C /work/riot/RIOT/core
"make" -C /work/riot/RIOT/cpu/native
"make" -C /work/riot/RIOT/cpu/native/periph
"make" -C /work/riot/RIOT/cpu/native/stdio_native
"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/div
"make" -C /work/riot/RIOT/sys/shell
"make" -C /work/riot/RIOT/sys/test_utils/interactive_sync
"make" -C /work/riot/RIOT/sys/xtimer
/usr/bin/ld: /work/riot/RIOT/tests/xtimer_mutex_lock_timeout/bin/native/cpu/tramp.o: warning: relocation against `_native_saved_eip' in read-only section `.text'
/usr/bin/ld: warning: creating DT_TEXTREL in a PIE
   text	   data	    bss	    dec	    hex	filename
  44462	    692	  56060	 101214	  18b5e	/work/riot/RIOT/tests/xtimer_mutex_lock_timeout/bin/native/tests_xtimer_mutex_lock_timeout.elf


/work/riot/RIOT/tests/xtimer_mutex_lock_timeout/bin/native/tests_xtimer_mutex_lock_timeout.elf  
RIOT native interrupts/signals initialized.
LED_RED_OFF
LED_GREEN_ON
RIOT native board initialized.
RIOT native hardware initialization complete.

main(): This is RIOT! (Version: 2021.01-devel-568-g58de8-pr/tests/xtimer_mutex_lock_timeout_cleanup)
Starting shell...
> 
> 
> help
mutex_timeout_long_unlocked
help
Command              Description
---------------------------------------
mutex_timeout_long_unlocked unlocked mutex (no-spin timeout)
mutex_timeout_long_locked locked mutex (no-spin timeout)
mutex_timeout_long_locked_low lock low-prio-locked-mutex from high-prio-thread (no-spin timeout)
mutex_timeout_short_unlocked unlocked mutex (spin timeout)
mutex_timeout_short_locked locked mutex (spin timeout)
> mutex_timeout_long_unlocked
starting test: xtimer mutex lock timeout
OK

> mutex_timeout_long_locked
mutex_timeout_long_locked
starting test: xtimer mutex lock timeout
OK

> mutex_timeout_long_locked_low
mutex_timeout_long_locked_low
starting test: xtimer mutex lock timeout with thread
threads = 2
THREAD low prio: start
MAIN THREAD: calling xtimer_mutex_lock_timeout
OK
threads = 3
MAIN THREAD: waiting for created thread to end
THREAD low prio: exiting low
threads = 2

> mutex_timeout_short_locked
mutex_timeout_short_locked
starting test: xtimer mutex lock timeout with short timeout and locked mutex
OK

> mutex_timeout_short_unlocked
mutex_timeout_short_unlocked
starting test: xtimer mutex lock timeout with short timeout and unlocked mutex
OK

>

Issues/PRs references

Raised when running the static test locally in #15358

@aabadie aabadie added Area: tests Area: tests and testing framework Impact: minor The PR is small in size and might only require a quick look of a knowledgeable reviewer Type: cleanup The issue proposes a clean-up / The PR cleans-up parts of the codebase / documentation CI: skip compile test If set, CI server will run only non-compile jobs, but no compile jobs or their dependent jobs labels Nov 3, 2020
@aabadie aabadie requested a review from miri64 as a code owner November 3, 2020 13:42
@aabadie aabadie changed the title tests/xtimer_mutex_lock_timeout: clean python automated test tests/xtimer_mutex_lock_timeout: cleanup python automated test Nov 3, 2020
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.

ACK, test still passing and nor more flake8 complaints

@fjmolinas fjmolinas added CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR and removed CI: skip compile test If set, CI server will run only non-compile jobs, but no compile jobs or their dependent jobs labels Nov 4, 2020
@aabadie aabadie merged commit aab9ea2 into RIOT-OS:master Nov 4, 2020
@aabadie aabadie deleted the pr/tests/xtimer_mutex_lock_timeout_cleanup branch November 4, 2020 10:42
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 Impact: minor The PR is small in size and might only require a quick look of a knowledgeable reviewer Type: cleanup The issue proposes a clean-up / The PR cleans-up parts of the codebase / documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants