Expand LinuxCNC interpreter regression coverage

This commit is contained in:
2026-06-09 14:54:54 +08:00
parent 50757e45ba
commit 5bd8f12872
143 changed files with 10895 additions and 219 deletions

View File

@@ -0,0 +1,31 @@
N..... USE_LENGTH_UNITS(CANON_UNITS_MM)
N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000)
N..... SET_G92_OFFSET(0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000)
N..... SET_XY_ROTATION(0.0000)
N..... SET_FEED_REFERENCE(CANON_XYZ)
N..... ON_RESET()
N..... COMMENT("interpreter: feed mode set to units per revolution")
N..... SET_FEED_MODE(0, 1)
N..... SET_FEED_RATE(0.0000)
N..... SELECT_PLANE(CANON_PLANE_XZ)
N..... SET_SPINDLE_MODE(0 700.0000)
N..... SET_SPINDLE_SPEED(0, 250.0000)
N..... START_SPINDLE_CLOCKWISE(0)
N..... SET_FEED_RATE(0.2400)
N..... STRAIGHT_TRAVERSE(168.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000)
N..... STRAIGHT_TRAVERSE(168.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000)
N..... STRAIGHT_FEED(168.0000, 0.0000, -333.0000, 0.0000, 0.0000, 0.0000)
N..... STRAIGHT_FEED(170.0000, 0.0000, -333.0000, 0.0000, 0.0000, 0.0000)
N..... STRAIGHT_FEED(170.0000, 0.0000, -415.0000, 0.0000, 0.0000, 0.0000)
N..... STRAIGHT_TRAVERSE(300.0000, 0.0000, 10.0000, 0.0000, 0.0000, 0.0000)
N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000)
N..... SET_XY_ROTATION(0.0000)
N..... SELECT_PLANE(CANON_PLANE_XY)
N..... SET_FEED_MODE(0, 0)
N..... SET_FEED_RATE(0.0000)
N..... STOP_SPINDLE_TURNING(0)
N..... SET_SPINDLE_MODE(0 0.0000)
N..... PALLET_SHUTTLE()
N..... PROGRAM_END()
N..... ON_RESET()
N..... ON_RESET()

View File

@@ -0,0 +1,12 @@
G18G95
G96 M3 S250 D700
O2 SUB
Z-333
G1 X170
Z-415
O2 ENDSUB
G71 Q2 X168 Z0 F.24
G0 X300 Z10
M30

View File

@@ -0,0 +1,26 @@
#!/bin/bash
set -e
# Demonstrate endless loop when an additional segment is added in the G71 call.
# This is a subset of a file that was supplied in
# https://github.com/LinuxCNC/linuxcnc/issues/2844 and which worked up to and
# including 2.9.1~pre1. It entered an endless loop after
# https://github.com/LinuxCNC/linuxcnc/pull/2677
rs274 -g g71-endless-loop2.ngc | awk '{$1=""; print}' > result &
pid=$!
# Give it 5 seconds to complete
count=5
while [ 0 -lt $count ] && kill -0 $pid > /dev/null 2>&1 ; do
sleep 1
count=$((count - 1))
done
if kill -0 $pid > /dev/null 2>&1; then
kill -9 $pid
echo "error: g71-endless-loop2.ngc program seem to be stuck, killing"
exit 1
fi
exit 0