-
Notifications
You must be signed in to change notification settings - Fork 2k
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
examples/micropython: fix checked PID #14518
Conversation
With #14224 the idle thread became optional, so the main thread can have either 1 or 2 as PID, depending if the idle thread is included or not. As this might also change in the future, it is probably the best to just expect any number.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK can reproduce:
pr
...
...
def inc_a(): global a; a+=1
...
>>> t = xtimer.xtimer(inc_a)
t = xtimer.xtimer(inc_a)
>>> utime.time()
utime.time()
2273
>>> t.set(500000)
t.set(500000)
>>> while a==0: pass
while a==0: pass
...
>>> utime.time()
utime.time()
2897
>>> [TEST PASSED]
master
BOARD=iotlab-m3 make -C examples/micropython test
make: Entering directory '/home/francisco/workspace/RIOT2/examples/micropython'
miniterm --eol LF "/dev/riot/tty-iotlab-m3" "500000"
--- Miniterm on /dev/riot/tty-iotlab-m3 500000,8,N,1 ---
--- Quit: Ctrl+] | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H ---
�main(): This is RIOT! (Version: 2020.10-devel-1-g5599b-pr-14518)
-- Executing boot.py
boot.py: MicroPython says hello!
-- boot.py exited. Starting REPL..
MicroPython v1.4.2-6568-gbb8e51f6d on 2020-07-15; riot-iotlab-m3 with stm32
Type "help()" for more information.
>>> print("echo this! " * 4)
print("echo this! " * 4)
echo this! echo this! echo this! echo this!
>>> import riot
print(riot.thread_getpid())
import riot
>>> print(riot.thread_getpid())
1
>>> Timeout in expect script at "child.expect_exact('2')" (examples/micropython/tests/01-run.py:25)
Murdock failures as most of the times when using
|
It seems that the PR branch was pushed on the RIOT main fork. I deleted it. |
Yeah sorry 'bout that. I pushed this from the repo the release manager created since I accidentally was working there 😅 |
Backport provided in #14530 |
Contribution description
With #14224 the idle thread became optional, so the main thread can have either 1 or 2 as PID, depending if the idle thread is included or not. As this might also change in the future, it is probably the best to just expect any number.
Testing procedure
Should now succeed again on e.g. Cortex-M platforms.
Issues/PRs references
Follow-up on #14224