按建议继续完成后续工作

结论:native 兼容性验证已接入 interpreter init、rotary indexer、canonical 边界 fixture,并新增 upstream rs274 side-by-side 基线;完整 verify_native_probes.sh 已通过。
This commit is contained in:
2026-06-07 22:37:29 +08:00
parent 59cfc8406e
commit 7a20531ae4
20 changed files with 530 additions and 25 deletions

View File

@@ -24,10 +24,14 @@ The native validation script runs these checks in order:
vendored file exists, and every vendored file is byte-identical to upstream.
3. `tools/verify_no_standalone_cnc_semantics.sh`
Confirms standalone code has not reintroduced `Interp::convert_g()`.
4. `tools/build_native_probes.sh`
4. `tools/verify_native_linuxcnc_fixture_baseline.sh`
Runs a narrow side-by-side fixture baseline through upstream
`../linuxcnc/bin/rs274` and compares normalized canonical events for
fixtures that do not require standalone-only runtime adapters.
5. `tools/build_native_probes.sh`
Builds native source probes and standalone harnesses from vendored
LinuxCNC source plus narrow runtime wrappers.
5. `tests/native/verify_native_probes.sh`
6. `tests/native/verify_native_probes.sh`
Checks probe exit codes, source-probe coverage, harness stdout, canonical
fixture events, and expected error behavior.
@@ -51,6 +55,8 @@ The validation fails if:
| `linuxcnc_namedparam_harness` | Validates LinuxCNC named parameter behavior, `_ini[...]`, and `_hal[...]` adapter resolution. |
| `linuxcnc_interp_minimal_harness` | Runs G-code fixtures through vendored LinuxCNC parser/execution/conversion code and captures canonical events. |
| `linuxcnc_parameter_file_harness` | Validates LinuxCNC parameter file restore/save behavior and required/read-only parameter handling. |
| `linuxcnc_interp_init_harness` | Validates vendored LinuxCNC `Interp::init()` emits canonical initialization boundaries through the standalone event sink. |
| `linuxcnc_indexer_harness` | Validates vendored LinuxCNC single-axis rotary indexer dispatch emits lock/unlock and motion boundaries through the standalone event sink. |
| `linuxcnc_tp_api_probe` | Validates vendored LinuxCNC trajectory planner calls for linear, arc, and queued motion paths. |
| `linuxcnc_kinematics_probe` | Validates vendored LinuxCNC `trivkins.c` plus `kins_util.c` initialize and perform identity forward/inverse mapping through the standalone HAL/RTAPI boundary. |
| `linuxcnc_5axis_kinematics_probe` | Validates vendored LinuxCNC `5axiskins.c` through `switchkins.c`, including 5-axis forward/inverse round-trip behavior and switching to identity kinematics. |
@@ -75,6 +81,11 @@ Positive G-code fixtures currently cover:
- spindle orient
- tool semantics
- tool table setup
- tool-data reload boundary
- interpreter state-tag boundary
- percent-delimited file `FINISH` boundary
- file-open `ON_RESET` boundary
- comment logging canonical calls
- named and numbered parameters
- O-word subroutines
- program-end modal reset
@@ -96,9 +107,11 @@ Negative fixtures currently cover:
Current validation is native-only. WASM, browser, SDK, OPFS, and full
machine-session validation remain future work.
The current fixture expectations validate standalone behavior against the
vendored LinuxCNC source path. They do not yet run a side-by-side native
LinuxCNC executable comparison for each fixture.
The current fixture expectations validate standalone behavior against both the
vendored LinuxCNC source path and a first upstream `rs274` side-by-side
baseline for simple parser/conversion fixtures. Fixtures that depend on
standalone-only runtime adapters, HAL/INI/tool table setup, or richer machine
session state still need dedicated native LinuxCNC baselines.
The kinematics probes currently cover LinuxCNC identity/trivial kinematics,
the switchable `5axiskins` XYZBCW bridge-mill model, and the TRT `xyzac`/`xyzbc`