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

examples/micropython: fix checked PID #14518

Merged
merged 1 commit into from
Jul 15, 2020
Merged

Conversation

miri64
Copy link
Member

@miri64 miri64 commented Jul 15, 2020

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

make -C examples/micropython flash test

Should now succeed again on e.g. Cortex-M platforms.

Issues/PRs references

Follow-up on #14224

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.
@miri64 miri64 added Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors) Area: pkg Area: External package ports CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR CI: run tests If set, CI server will run tests on hardware for the labeled PR Area: examples Area: Example Applications labels Jul 15, 2020
@miri64 miri64 added this to the Release 2020.07 milestone Jul 15, 2020
@miri64 miri64 added 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 Jul 15, 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 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)

@cgundogan cgundogan added 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 Jul 15, 2020
@miri64 miri64 added the Process: needs backport Integration Process: The PR is required to be backported to a release or feature branch label Jul 15, 2020
@miri64
Copy link
Member Author

miri64 commented Jul 15, 2020

Murdock failures as most of the times when using CI: run tests are unrelated:

    failed:
    tests/cpp_ctors/nrf52dk:gnu
    tests/cond_order/nrf52dk:gnu
    tests/driver_apds99xx_full/nrf52dk:gnu
    tests/driver_apds99xx_full/nrf52dk:llvm
    tests/event_threads/nrf52dk:llvm
    tests/event_wait_timeout/nrf52dk:gnu
    tests/float/nrf52dk:llvm
    tests/periph_flashpage/nrf52dk:llvm
    tests/mutex_order/nrf52dk:gnu
    tests/mtd_mapper/nrf52dk:gnu
    tests/pipe/nrf52dk:llvm
    tests/mtd_flashpage/nrf52dk:gnu
    tests/pkg_jsmn/nrf52dk:llvm
    tests/pkg_cayenne-lpp/nrf52dk:gnu
    tests/riotboot/nrf52dk:gnu
    tests/driver_nrfmin/nrf52dk:llvm
    tests/pkg_c25519/nrf52dk:llvm
    tests/pkg_micro-ecc-with-hwrng/nrf52dk:llvm
    tests/pkg_libhydrogen/nrf52dk:llvm
    tests/pkg_cn-cbor/nrf52dk:llvm
    tests/shell/nrf52dk:llvm
    tests/pkg_hacl/nrf52dk:llvm
    tests/periph_gpio/nrf52dk:llvm
    tests/pthread_barrier/nrf52dk:llvm
    tests/posix_time/nrf52dk:gnu
    tests/pkg_nanocbor/nrf52dk:gnu
    tests/devfs/nrf52dk:gnu
    tests/pkg_micro-ecc/nrf52dk:llvm
    tests/pkg_monocypher/nrf52dk:llvm
    tests/pkg_libb2/nrf52dk:gnu
    tests/pthread_cleanup/nrf52dk:gnu
    tests/pkg_nanopb/nrf52dk:gnu
    tests/pkg_spiffs/nrf52dk:llvm
    tests/pkg_cmsis-nn/nrf52dk:gnu
    tests/thread_msg_block_race/nrf52dk:gnu
    tests/thread_msg_seq/nrf52dk:gnu
    tests/thread_msg_block_wo_queue/nrf52dk:gnu
    tests/thread_msg/nrf52dk:llvm
    tests/pkg_littlefs/nrf52dk:gnu
    tests/pkg_littlefs/nrf52dk:llvm
    tests/rmutex/nrf52dk:llvm
    tests/pthread/nrf52dk:gnu
    tests/ztimer_msg/nrf52dk:llvm
    tests/pkg_qdsa/nrf52dk:gnu
    tests/thread_basic/nrf52dk:llvm
    tests/trickle/nrf52dk:gnu
    tests/trace/nrf52dk:gnu
    tests/pthread_flood/nrf52dk:llvm
    tests/xtimer_remove/nrf52dk:llvm
    tests/ztimer_underflow/nrf52dk:gnu
    tests/bench_sizeof_coretypes/nrf52dk:gnu
    tests/pthread_cooperation/nrf52dk:gnu
    tests/xtimer_mutex_lock_timeout/nrf52dk:gnu
    tests/xtimer_hang/nrf52dk:gnu
    tests/thread_race/nrf52dk:llvm
    tests/kconfig/nrf52dk:gnu
    tests/unittests/nrf52dk:gnu
    tests/unittests/nrf52dk:llvm
    tests/cpp11_mutex/nrf52dk:gnu
    tests/cpp11_mutex/nrf52dk:llvm

@miri64 miri64 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 CI: run tests If set, CI server will run tests on hardware 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 labels Jul 15, 2020
@aabadie aabadie merged commit 9f32545 into master Jul 15, 2020
@aabadie aabadie deleted the examples/fix/micropython-14224 branch July 15, 2020 19:50
@aabadie
Copy link
Contributor

aabadie commented Jul 15, 2020

It seems that the PR branch was pushed on the RIOT main fork. I deleted it.

@miri64
Copy link
Member Author

miri64 commented Jul 15, 2020

Yeah sorry 'bout that. I pushed this from the repo the release manager created since I accidentally was working there 😅

@miri64
Copy link
Member Author

miri64 commented Jul 15, 2020

Backport provided in #14530

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: examples Area: Example Applications Area: pkg Area: External package ports 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 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.

4 participants