Skip to content

EMULATE=1 not concurrency safe #17555

@kaspar030

Description

@kaspar030

Description

The emulation machinery is using fixed port numbers / socket files for serial and monitor sockets, which makes them unusable in the parallel case (e.g., CI).
Could it use per-application socket files?

#17434 is blocked on this.

Steps to reproduce the issue

Run two instances of EMULATE=1 make test for e.g., microbit.

Expected results

Test passes.

Actual results

/tmp/dwq.0.5048392832189235/a33c1c69a48300216f746cb52394974e/dist/tools/emulator/term.sh qemu microbit /tmp/dwq.0.5048392832189235/a33c1c69a48300216f746cb52394974e/tests/xtimer_usleep /tmp/dwq.0.5048392832189235/a33c1c69a48300216f746cb52394974e/dist/tools/pyterm/pyterm '-p "/tmp/riot_tests_xtimer_usleep_microbit_uart" -b "115200" ' /tmp/riot_tests_xtimer_usleep_microbit_uart 
qemu-system-arm -machine microbit -device loader,file=/tmp/dwq.0.5048392832189235/a33c1c69a48300216f746cb52394974e/build/tests_xtimer_usleep.elf -serial telnet::5555,server,nowait,nodelay -monitor telnet::45454,server,nowait -nographic
qemu-system-arm: -monitor telnet::45454,server,nowait: Failed to find an available port: Address already in use
make[2]: *** [/tmp/dwq.0.5048392832189235/a33c1c69a48300216f746cb52394974e/Makefile.include:853: emulate] Error 1

Versions

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions