8000 nRF52840: Test extmod/machine_disable_irq.py hangs forever · Issue #17240 · micropython/micropython · GitHub
[go: up one dir, main page]

Skip to content
nRF52840: Test extmod/machine_disable_irq.py hangs forever #17240
Open
@Plaque-fcc

Description

@Plaque-fcc

Port, board and/or hardware

nrf port, PROMICRO board

MicroPython version

MicroPython v1.26.0-preview.59.g79abdad9e; PROMICRO with NRF52840

Reproduction

  1. Have nrf port v1.26.0-preview.59.g79abdad9e built and flashed (board PROMICRO in my case) onto an nRF52840 chip.
  2. Connect and reset the board to make sure it's running MicroPython and isn't busy.
  3. cd to tests and run ./run-tests.py -t /dev/ttyACM<port_number>.
  4. Some tests willl run just fine (like extmod/machine1.py), others should either be skipped or fail.
  5. In reality, this test will fail to fail and only hang.

Expected behaviour

Expected to pass this test. But this port probably doesn't support it yet.

Observed behaviour

$ strace ./run-tests.py -t dev/ttyACM0

…
openat(AT_FDCWD, "/micropython/tests/extmod/machine_disable_irq.py", O_RDONLY|O_CLOEXEC) = 8
fstat(8, {st_mode=S_IFREG|0664, st_size=663, ...}) = 0
ioctl(8, TCGETS, 0xfffff35d8b20)        = -1 ENOTTY (Inappropriate ioctl for device)
lseek(8, 0, SEEK_CUR)                   = 0
lseek(8, 0, SEEK_CUR)                   = 0
fstat(8, {st_mode=S_IFREG|0664, st_size=663, ...}) = 0
read(8, "# Test executing Python code whi"..., 664) = 663
read(8, "", 1)                          = 0
close(8)                                = 0
write(3, "\r\3", 2)                     = 2
pselect6(7, [6], [3], NULL, NULL, NULL) = 1 (out [3])
ioctl(3, FIONREAD, [1])                 = 0
pselect6(5, [3 4], NULL, NULL, NULL, NULL) = 1 (in [3])
read(3, ">", 1)                         = 1
ioctl(3, FIONREAD, [0])                 = 0
write(3, "\r\1", 2)                     = 2
pselect6(7, [6], [3], NULL, NULL, NULL) = 1 (out [3])
pselect6(5, [3 4], NULL, NULL, NULL, NULL) = 1 (in [3])
read(3, "r", 1)                         = 1
ioctl(3, FIONREAD, [26])                = 0
pselect6(5, [3 4], NULL, NULL, NULL, NULL) = 1 (in [3])
read(3, "a", 1)                         = 1
ioctl(3, FIONREAD, [25])                = 0
pselect6(5, [3 4], NULL, NULL, NULL, NULL) = 1 (in [3])
read(3, "w", 1)                         = 1
ioctl(3, FIONREAD, [24])                = 0
pselect6(5, [3 4], NULL, NULL, NULL, NULL) = 1 (in [3])
read(3, " ", 1)                         = 1
ioctl(3, FIONREAD, [23])                = 0
pselect6(5, [3 4], NULL, NULL, NULL, NULL) = 1 (in [3])
read(3, "R", 1)                         = 1
ioctl(3, FIONREAD, [22])                = 0
pselect6(5, [3 4], NULL, NULL, NULL, NULL) = 1 (in [3])
read(3, "E", 1)                         = 1
ioctl(3, FIONREAD, [21])                = 0
pselect6(5, [3 4], NULL, NULL, NULL, NULL) = 1 (in [3])
read(3, "P", 1)                         = 1
ioctl(3, FIONREAD, [20])                = 0
pselect6(5, [3 4], NULL, NULL, NULL, NULL) = 1 (in [3])
read(3, "L", 1)                         = 1
ioctl(3, FIONREAD, [19])                = 0
pselect6(5, [3 4], NULL, NULL, NULL, NULL) = 1 (in [3])
read(3, ";", 1)                         = 1
ioctl(3, FIONREAD, [18])                = 0
pselect6(5, [3 4], NULL, NULL, NULL, NULL) = 1 (in [3])
read(3, " ", 1)                         = 1
ioctl(3, FIONREAD, [17])                = 0
pselect6(5, [3 4], NULL, NULL, NULL, NULL) = 1 (in [3])
read(3, "C", 1)                         = 1
ioctl(3, FIONREAD, [16])                = 0
pselect6(5, [3 4], NULL, NULL, NULL, NULL) = 1 (in [3])
read(3, "T", 1)                         = 1
ioctl(3, FIONREAD, [15])                = 0
pselect6(5, [3 4], NULL, NULL, NULL, NULL) = 1 (in [3])
read(3, "R", 1)                         = 1
ioctl(3, FIONREAD, [14])                = 0
pselect6(5, [3 4], NULL, NULL, NULL, NULL) = 1 (in [3])
read(3, "L", 1)                         = 1
ioctl(3, FIONREAD, [13])                = 0
pselect6(5, [3 4], NULL, NULL, NULL, NULL) = 1 (in [3])
read(3, "-", 1)                         = 1
ioctl(3, FIONREAD, [12])                = 0
pselect6(5, [3 4], NULL, NULL, NULL, NULL) = 1 (in [3])
read(3, "B", 1)                         = 1
ioctl(3, FIONREAD, [11])                = 0
pselect6(5, [3 4], NULL, NULL, NULL, NULL) = 1 (in [3])
read(3, " ", 1)                         = 1
ioctl(3, FIONREAD, [10])                = 0
pselect6(5, [3 4], NULL, NULL, NULL, NULL) = 1 (in [3])
read(3, "t", 1)                         = 1
ioctl(3, FIONREAD, [9])                 = 0
pselect6(5, [3 4], NULL, NULL, NULL, NULL) = 1 (in [3])
read(3, "o", 1)                         = 1
ioctl(3, FIONREAD, [8])                 = 0
pselect6(5, [3 4], NULL, NULL, NULL, NULL) = 1 (in [3])
read(3, " ", 1)                         = 1
ioctl(3, FIONREAD, [7])                 = 0
pselect6(5, [3 4], NULL, NULL, NULL, NULL) = 1 (in [3])
read(3, "e", 1)                         = 1
ioctl(3, FIONREAD, [6])                 = 0
pselect6(5, [3 4], NULL, NULL, NULL, NULL) = 1 (in [3])
read(3, "x", 1)                         = 1
ioctl(3, FIONREAD, [5])                 = 0
pselect6(5, [3 4], NULL, NULL, NULL, NULL) = 1 (in [3])
read(3, "i", 1)                         = 1
ioctl(3, FIONREAD, [4])                 = 0
pselect6(5, [3 4], NULL, NULL, NULL, NULL) = 1 (in [3])
read(3, "t", 1)                         = 1
ioctl(3, FIONREAD, [3])                 = 0
pselect6(5, [3 4], NULL, NULL, NULL, NULL) = 1 (in [3])
read(3, "\r", 1)                        = 1
ioctl(3, FIONREAD, [2])                 = 0
pselect6(5, [3 4], NULL, NULL, NULL, NULL) = 1 (in [3])
read(3, "\n", 1)                        = 1
ioctl(3, FIONREAD, [1])                 = 0
pselect6(5, [3 4], NULL, NULL, NULL, NULL) = 1 (in [3])
read(3, ">", 1)                         = 1
write(3, "\4", 1)                       = 1
pselect6(7, [6], [3], NULL, NULL, NULL) = 1 (out [3])
pselect6(5, [3 4], NULL, NULL, NULL, NULL) = 1 (in [3])
read(3, "O", 1)                         = 1
ioctl(3, FIONREAD, [1])                 = 0
pselect6(5, [3 4], NULL, NULL, NULL, NULL) = 1 (in [3])
read(3, "K", 1)                         = 1
ioctl(3, FIONREAD, [0])                 = 0
clock_nanosleep(CLOCK_MONOTONIC, TIMER_ABSTIME, {tv_sec=52070, tv_nsec=587745735}, NULL) = 0
ioctl(3, FIONREAD, [47])                = 0
pselect6(5, [3 4], NULL, NULL, NULL, NULL) = 1 (in [3])
read(3, "\r", 1)                        = 1
ioctl(3, FIONREAD, [46])                = 0
pselect6(5, [3 4], NULL, NULL, NULL, NULL) = 1 (in [3])
read(3, "\n", 1)                        = 1
ioctl(3, FIONREAD, [45])                = 0
pselect6(5, [3 4], NULL, NULL, NULL, NULL) = 1 (in [3])
read(3, "M", 1)                         = 1
ioctl(3, FIONREAD, [44])                = 0
pselect6(5, [3 4], NULL, NULL, NULL, NULL) = 1 (in [3])
read(3, "P", 1)                         = 1
ioctl(3, FIONREAD, [43])                = 0
pselect6(5, [3 4], NULL, NULL, NULL, NULL) = 1 (in [3])
read(3, "Y", 1)                         = 1
ioctl(3, FIONREAD, [42])                = 0
pselect6(5, [3 4], NULL, NULL, NULL, NULL) = 1 (in [3])
read(3, ":", 1)                         = 1
ioctl(3, FIONREAD, [41])                = 0
pselect6(5, [3 4], NULL, NULL, NULL, NULL) = 1 (in [3])
read(3, " ", 1)                         = 1
ioctl(3, FIONREAD, [40])                = 0
pselect6(5, [3 4], NULL, NULL, NULL, NULL) = 1 (in [3])
read(3, "s", 1)                         = 1
ioctl(3, FIONREAD, [39])                = 0
pselect6(5, [3 4], NULL, NULL, NULL, NULL) = 1 (in [3])
read(3, "o", 1)                         = 1
ioctl(3, FIONREAD, [38])                = 0
pselect6(5, [3 4], NULL, NULL, NULL, NULL) = 1 (in [3])
read(3, "f", 1)                         = 1
ioctl(3, FIONREAD, [37])                = 0
pselect6(5, [3 4], NULL, NULL, NULL, NULL) = 1 (in [3])
read(3, "t", 1)                         = 1
ioctl(3, FIONREAD, [36])                = 0
pselect6(5, [3 4], NULL, NULL, NULL, NULL) = 1 (in [3])
read(3, " ", 1)                         = 1
ioctl(3, FIONREAD, [35])                = 0
pselect6(5, [3 4], NULL, NULL, NULL, NULL) = 1 (in [3])
read(3, "r", 1)                         = 1
ioctl(3, FIONREAD, [34])                = 0
pselect6(5, [3 4], NULL, NULL, NULL, NULL) = 1 (in [3])
read(3, "e", 1)                         = 1
ioctl(3, FIONREAD, [33])                = 0
pselect6(5, [3 4], NULL, NULL, NULL, NULL) = 1 (in [3])
read(3, "b", 1)                         = 1
ioctl(3, FIONREAD, [32])                = 0
pselect6(5, [3 4], NULL, NULL, NULL, NULL) = 1 (in [3])
read(3, "o", 1)                         = 1
ioctl(3, FIONREAD, [31])                = 0
pselect6(5, [3 4], NULL, NULL, NULL, NULL) = 1 (in [3])
read(3, "o", 1)                         = 1
ioctl(3, FIONREAD, [30])                = 0
pselect6(5, [3 4], NULL, NULL, NULL, NULL) = 1 (in [3])
read(3, "t", 1)                         = 1
ioctl(3, FIONREAD, [29])                = 0
pselect6(5, [3 4], NULL, NULL, NULL, NULL) = 1 (in [3])
read(3, "\r", 1)                        = 1
ioctl(3, FIONREAD, [28])                = 0
pselect6(5, [3 4], NULL, NULL, NULL, NULL) = 1 (in [3])
read(3, "\n", 1)                        = 1
pselect6(5, [3 4], NULL, NULL, NULL, NULL) = 1 (in [3])
read(3, "r", 1)                         = 1
ioctl(3, FIONREAD, [26])                = 0
pselect6(5, [3 4], NULL, NULL, NULL, NULL) = 1 (in [3])
read(3, "a", 1)                         = 1
ioctl(3, FIONREAD, [25])                = 0
pselect6(5, [3 4], NULL, NULL, NULL, NULL) = 1 (in [3])
read(3, "w", 1)                         = 1
ioctl(3, FIONREAD, [24])                = 0
pselect6(5, [3 4], NULL, NULL, NULL, NULL) = 1 (in [3])
read(3, " ", 1)                         = 1
ioctl(3, FIONREAD, [23])                = 0
pselect6(5, [3 4], NULL, NULL, NULL, NULL) = 1 (in [3])
read(3, "R", 1)                         = 1
ioctl(3, FIONREAD, [22])                = 0
pselect6(5, [3 4], NULL, NULL, NULL, NULL) = 1 (in [3])
read(3, "E", 1)                         = 1
ioctl(3, FIONREAD, [21])                = 0
pselect6(5, [3 4], NULL, NULL, NULL, NULL) = 1 (in [3])
read(3, "P", 1)                         = 1
ioctl(3, FIONREAD, [20])                = 0
pselect6(5, [3 4], NULL, NULL, NULL, NULL) = 1 (in [3])
read(3, "L", 1)                         = 1
ioctl(3, FIONREAD, [19])                = 0
pselect6(5, [3 4], NULL, NULL, NULL, NULL) = 1 (in [3])
read(3, ";", 1)                         = 1
ioctl(3, FIONREAD, [18])                = 0
pselect6(5, [3 4], NULL, NULL, NULL, NULL) = 1 (in [3])
read(3, " ", 1)                         = 1
ioctl(3, FIONREAD, [17])                = 0
pselect6(5, [3 4], NULL, NULL, NULL, NULL) = 1 (in [3])
read(3, "C", 1)                         = 1
ioctl(3, FIONREAD, [16])                = 0
pselect6(5, [3 4], NULL, NULL, NULL, NULL) = 1 (in [3])
read(3, "T", 1)                         = 1
ioctl(3, FIONREAD, [15])                = 0
pselect6(5, [3 4], NULL, NULL, NULL, NULL) = 1 (in [3])
read(3, "R", 1)                         = 1
ioctl(3, FIONREAD, [14])                = 0
pselect6(5, [3 4], NULL, NULL, NULL, NULL) = 1 (in [3])
read(3, "L", 1)                         = 1
ioctl(3, FIONREAD, [13])                = 0
pselect6(5, [3 4], NULL, NULL, NULL, NULL) = 1 (in [3])
read(3, "-", 1)                         = 1
ioctl(3, FIONREAD, [12])                = 0
pselect6(5, [3 4], NULL, NULL, NULL, NULL) = 1 (in [3])
read(3, "B", 1)                         = 1
ioctl(3, FIONREAD, [11])                = 0
pselect6(5, [3 4], NULL, NULL, NULL, NULL) = 1 (in [3])
read(3, " ", 1)                         = 1
ioctl(3, FIONREAD, [10])                = 0
pselect6(5, [3 4], NULL, NULL, NULL, NULL) = 1 (in [3])
read(3, "t", 1)                         = 1
ioctl(3, FIONREAD, [9])                 = 0
pselect6(5, [3 4], NULL, NULL, NULL, NULL) = 1 (in [3])
read(3, "o", 1)                         = 1
ioctl(3, FIONREAD, [8])                 = 0
pselect6(5, [3 4], NULL, NULL, NULL, NULL) = 1 (in [3])
read(3, " ", 1)                         = 1
ioctl(3, FIONREAD, [7])                 = 0
pselect6(5, [3 4], NULL, NULL, NULL, NULL) = 1 (in [3])
read(3, "e", 1)                         = 1
ioctl(3, FIONREAD, [6])                 = 0
pselect6(5, [3 4], NULL, NULL, NULL, NULL) = 1 (in [3])
read(3, "x", 1)                         = 1
ioctl(3, FIONREAD, [5])                 = 0
pselect6(5, [3 4], NULL, NULL, NULL, NULL) = 1 (in [3])
read(3, "i", 1)                         = 1
ioctl(3, FIONREAD, [4])                 = 0
pselect6(5, [3 4], NULL, NULL, NULL, NULL) = 1 (in [3])
read(3, "t", 1)                         = 1
ioctl(3, FIONREAD, [3])                 = 0
pselect6(5, [3 4], NULL, NULL, NULL, NULL) = 1 (in [3])
read(3, "\r", 1)                        = 1
ioctl(3, FIONREAD, [2])                 = 0
pselect6(5, [3 4], NULL, NULL, NULL, NULL) = 1 (in [3])
read(3, "\n", 1)                        = 1
pselect6(5, [3 4], NULL, NULL, NULL, NULL) = 1 (in [3])
read(3, ">", 1)                         = 1
write(3, "\5A\1", 3)                    = 3
pselect6(7, [6], [3], NULL, NULL, NULL) = 1 (out [3])
pselect6(5, [3 4], NULL, NULL, NULL, NULL) = 1 (in [3])
read(3, "R\1", 2)                       = 2
pselect6(5, [3 4], NULL, NULL, NULL, NULL) = 1 (in [3])
read(3, "\200\0", 2)                    = 2
ioctl(3, FIONREAD, [1])                 = 0
pselect6(5, [3 4], NULL, NULL, NULL, NULL) = 1 (in [3])
read(3, "\1", 1)                        = 1
ioctl(3, FIONREAD, [0])                 = 0
write(3, "# Test executing Python code whi"..., 256) = 256
pselect6(7, [6], [3], NULL, NULL, NULL) = 1 (out [3])
pselect6(5, [3 4], NULL, NULL, NULL, NULL) = 1 (in [3])
read(3, "\1", 1)                        = 1
ioctl(3, FIONREAD, [0])                 = 0
write(3, "_irq = disable_irq()\n    if n:\n "..., 128) = 128
pselect6(7, [6], [3], NULL, NULL, NULL) = 1 (out [3])
pselect6(5, [3 4], NULL, NULL, NULL, NULL) = 1 (in [3])
read(3, "\1", 1)                        = 1
ioctl(3, FIONREAD, [0])                 = 0
write(3, "rk in a critical section\n       "..., 128) = 128
pselect6(7, [6], [3], NULL, NULL, NULL) = 1 (out [3])
pselect6(5, [3 4], NULL, NULL, NULL, NULL) = 1 (in [3])
read(3, "\1", 1)                        = 1
ioctl(3, FIONREAD, [0])                 = 0
write(3, "     for _ in range(100):\n      "..., 128) = 128
pselect6(7, [6], [3], NULL, NULL, NULL) = 1 (out [3])
pselect6(5, [3 4], NULL, NULL, NULL, NULL) = 1 (in [3])
read(3, "\1", 1)                        = 1
ioctl(3, FIONREAD, [0])                 = 0
write(3, "ge(5):\n        f(nest)\n", 23) = 23
pselect6(7, [6], [3], NULL, NULL, NULL) = 1 (out [3])
write(3, "\4", 1)                       = 1
pselect6(7, [6], [3], NULL, NULL, NULL) = 1 (out [3])
pselect6(5, [3 4], NULL, NULL, NULL, NULL) = 1 (in [3])
read(3, "\1", 1)                        = 1
ioctl(3, FIONREAD, [0])                 = 0
clock_nanosleep(CLOCK_MONOTONIC, TIMER_ABSTIME, {tv_sec=52070, tv_nsec=642399969}, NULL) = 0
ioctl(3, FIONREAD, [1])                 = 0
pselect6(5, [3 4], NULL, NULL, NULL, NULL) = 1 (in [3])
read(3, "\4", 1)                        = 1
pselect6(5, [3 4], NULL, NULL, NULL, NULL                               

Additional Information

No, I've provided everything above.

Code of Conduct

Yes, I agree

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0