Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions tests/mdi-while-queuebuster-waitflag/README
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
This test tries to hit a race condition where an MDI command is
executed when a queue buster is waiting to be restarted after
INTERP_EXEC_FINISH.
An MDI sent while a queue buster waits to be restarted after
INTERP_EXECUTE_FINISH is queued, not executed while the remap is
suspended. This sends MDIs behind the yielding M400 remap and checks that
they run after it, in order.
2 changes: 0 additions & 2 deletions tests/mdi-while-queuebuster-waitflag/checkresult

This file was deleted.

10 changes: 10 additions & 0 deletions tests/mdi-while-queuebuster-waitflag/expected
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
pre 1
pre 2
self.input_flag pre
self.input_flag post
post 1
post 2
post 3
post 4
post 5
post 6
14 changes: 4 additions & 10 deletions tests/mdi-while-queuebuster-waitflag/test.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
#!/bin/bash -e

# Variable 'i' is unused, just a loop count
# shellcheck disable=SC2034
for i in $(seq 20); do
linuxcnc -r test.ini
if grep -q '^[^+].*Segmentation fault' stderr; then
exit 1
fi
done
#!/bin/bash
# The MDIs queued behind the yielding M400 remap run after it, in order
linuxcnc -r test.ini | awk '/^(pre|post) [0-9]|^self\.input_flag/ {sub(/ = .*/, ""); print}'
exit "${PIPESTATUS[0]}"
Loading