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

micropython: Example test fails #18487

Closed
chrysn opened this issue Aug 21, 2022 · 1 comment
Closed

micropython: Example test fails #18487

chrysn opened this issue Aug 21, 2022 · 1 comment
Assignees
Labels
Area: pkg Area: External package ports Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors)

Comments

@chrysn
Copy link
Member

chrysn commented Aug 21, 2022

Description

The test shipped with examples/micropython crashes on native. I vaguely doubt that what is tested here would have good changes to not be UB at some point, but I don't know the micropython port well enough to have more than a hunch that what happens with xtimer in this test would be extremely hard to implement.

Steps to reproduce the issue

  • On native, make -C examples/micropython all test

Expected results

It passes

Actual results

>>> t = xtimer.xtimer(inc_a)
t = xtimer.xtimer(inc_a)
>>> utime.time()
utime.time()
4920
>>> t.set(500000)
t.set(500000)
>>> while a==0: pass
while a==0: pass
... 

>>> utime.time()
utime.time()
make[1]: *** [/home/chrysn/git/RIOT/Makefile.include:869: cleanterm] Floating point exception

Traceback (most recent call last):
  File "/home/chrysn/git/RIOT/examples/micropython/tests/01-run.py", line 84, in <module>
    sys.exit(run(testfunc))
  File "/home/chrysn/git/RIOT/dist/pythonlibs/testrunner/__init__.py", line 30, in run
    testfunc(child)
  File "/home/chrysn/git/RIOT/examples/micropython/tests/01-run.py", line 77, in testfunc
    duration = get_time() - before
  File "/home/chrysn/git/RIOT/examples/micropython/tests/01-run.py", line 11, in get_time
    res = int(child.readline().rstrip())
ValueError: invalid literal for int() with base 10: 'make[1]: *** [/home/chrysn/git/RIOT/Makefile.include:869: cleanterm] Floating point exception'
make: *** [/home/chrysn/git/RIOT/makefiles/tests/tests.inc.mk:22: test] Error 1
make: Leaving directory '/home/chrysn/git/RIOT/examples/micropython'

Versions

current master and 2022.07-RC3

@chrysn chrysn added Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors) Area: pkg Area: External package ports labels Aug 21, 2022
@kaspar030
Copy link
Contributor

duplicate: #15870

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: pkg Area: External package ports Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors)
Projects
None yet
Development

No branches or pull requests

3 participants