Compare commits
3 Commits
feb04102e7
...
8b89b5b4c6
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8b89b5b4c6 | ||
|
|
21c242c9a4 | ||
|
|
945e839e9d |
@@ -35,7 +35,7 @@ if [[ ! -f "$manifest" ]]; then
|
||||
echo "missing kinematics manifest: $manifest" >&2
|
||||
exit 1
|
||||
fi
|
||||
LINUXCNC_ROOT="$linuxcnc_root" ./check-linuxcnc-inputs-cached.sh "$manifest"
|
||||
LINUXCNC_ROOT="$linuxcnc_root" ./check-linuxcnc-inputs-cached.sh "$manifest" --require-kinematics-complete
|
||||
|
||||
validate_manifest_switchkins_complete() {
|
||||
local manifest_file=$1
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include "tooldata.hh"
|
||||
|
||||
#include <cstdio>
|
||||
#include <cstring>
|
||||
#include <unistd.h>
|
||||
|
||||
@@ -15,7 +16,11 @@ bool db_live = false;
|
||||
extern "C" {
|
||||
|
||||
int tool_nml_register(CANON_TOOL_TABLE *tblptr) {
|
||||
return tblptr ? 0 : -1;
|
||||
if (!tblptr) {
|
||||
std::fprintf(stderr, "%5d!!!PROBLEM tool_nml_register()\n", getpid());
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
int tooldata_db_init(char progname_plus_args[], int) {
|
||||
@@ -29,10 +34,14 @@ int tooldata_db_init(char progname_plus_args[], int) {
|
||||
for (char *token = program; token; token = strtok_r(nullptr, " ", &saveptr)) {
|
||||
++argc;
|
||||
if (argc >= MAX_DB_PROGRAM_ARGS) {
|
||||
std::fprintf(stderr,
|
||||
"!!!!db_init: argc exceeds MAX_DB_PROGRAM_ARGS=%d\n",
|
||||
MAX_DB_PROGRAM_ARGS);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
if (!program || access(program, X_OK) != 0) {
|
||||
std::fprintf(stderr, "!!!!db_init: <%s> not executable\n", program ? program : "");
|
||||
return -1;
|
||||
}
|
||||
return -1;
|
||||
|
||||
@@ -114,6 +114,9 @@ Efficiency rules:
|
||||
nanosecond mtime stats, tracked generated table/case outputs, and the thin API/web bridge files that pass
|
||||
switchkins config aliases. Native, source-link, and build-wasm entry points
|
||||
must run this cached check before consuming those aliases.
|
||||
The uncached switchkins/remap checker must first run kinematics-manifest
|
||||
completeness validation so standalone table checks also cover the
|
||||
source-manifest contract used by M428/M429/M430 and RTCP coverage.
|
||||
- The switchkins/remap generator must treat LinuxCNC `[EMCIO] TOOL_TABLE`
|
||||
entries as source coverage only. Resolvable tool tables referenced by
|
||||
M428/M429/M430 INI files must be present as `tooldata` manifest entries and
|
||||
|
||||
@@ -143,7 +143,7 @@ grep -F 'LinuxCNC source basis: the wasm build preflights and compiles the' buil
|
||||
grep -F 'LinuxCNC source basis: manifest validation checks LinuxCNC-root relative' check-linuxcnc-inputs.sh >/dev/null
|
||||
grep -F 'LinuxCNC source basis: the cached input checker keys check-linuxcnc-inputs.sh' check-linuxcnc-inputs-cached.sh >/dev/null
|
||||
grep -F 'LinuxCNC source basis: switchkins/remap table validation derives M428/M429/M430' check-linuxcnc-switchkins-remap-table.sh >/dev/null
|
||||
grep -F 'LINUXCNC_ROOT="$linuxcnc_root" ./check-linuxcnc-inputs-cached.sh "$manifest"' check-linuxcnc-switchkins-remap-table.sh >/dev/null
|
||||
grep -F 'LINUXCNC_ROOT="$linuxcnc_root" ./check-linuxcnc-inputs-cached.sh "$manifest" --require-kinematics-complete' check-linuxcnc-switchkins-remap-table.sh >/dev/null
|
||||
grep -F 'missing LinuxCNC switchkins REMAP INI in manifest:' check-linuxcnc-switchkins-remap-table.sh >/dev/null
|
||||
grep -F 'missing LinuxCNC switchkins remap source in manifest:' check-linuxcnc-switchkins-remap-table.sh >/dev/null
|
||||
grep -F 'LinuxCNC source basis: cached switchkins/remap validation hashes the LinuxCNC' check-linuxcnc-switchkins-remap-table-cached.sh >/dev/null
|
||||
|
||||
@@ -11,5 +11,9 @@ probe=$(./build-linuxcnc-wasm-standalone-probe.sh --mode tooldata-link)
|
||||
"$probe" 2>"$probe.err"
|
||||
grep -F "tool_mmap_user(): tool mmap not available" "$probe.err" >/dev/null
|
||||
grep -F "tooldata_put() no tool_mmap_base" "$probe.err" >/dev/null
|
||||
grep -F "!!!PROBLEM tool_nml_register()" "$probe.err" >/dev/null
|
||||
grep -F "!!!!db_init: <" "$probe.err" >/dev/null
|
||||
grep -F "not executable" "$probe.err" >/dev/null
|
||||
grep -F "!!!!db_init: argc exceeds MAX_DB_PROGRAM_ARGS=10" "$probe.err" >/dev/null
|
||||
|
||||
echo "linuxcnc wasm tooldata shim link probe passed"
|
||||
|
||||
@@ -55,7 +55,7 @@ grep -F 'LinuxCNC source basis: the wasm build preflights and compiles the' buil
|
||||
grep -F 'LinuxCNC source basis: manifest validation checks LinuxCNC-root relative' check-linuxcnc-inputs.sh >/dev/null
|
||||
grep -F 'LinuxCNC source basis: the cached input checker keys check-linuxcnc-inputs.sh' check-linuxcnc-inputs-cached.sh >/dev/null
|
||||
grep -F 'LinuxCNC source basis: switchkins/remap table validation derives M428/M429/M430' check-linuxcnc-switchkins-remap-table.sh >/dev/null
|
||||
grep -F 'LINUXCNC_ROOT="$linuxcnc_root" ./check-linuxcnc-inputs-cached.sh "$manifest"' check-linuxcnc-switchkins-remap-table.sh >/dev/null
|
||||
grep -F 'LINUXCNC_ROOT="$linuxcnc_root" ./check-linuxcnc-inputs-cached.sh "$manifest" --require-kinematics-complete' check-linuxcnc-switchkins-remap-table.sh >/dev/null
|
||||
grep -F 'missing LinuxCNC switchkins REMAP INI in manifest:' check-linuxcnc-switchkins-remap-table.sh >/dev/null
|
||||
grep -F 'missing LinuxCNC switchkins remap source in manifest:' check-linuxcnc-switchkins-remap-table.sh >/dev/null
|
||||
grep -F 'LinuxCNC source basis: cached switchkins/remap validation hashes the LinuxCNC' check-linuxcnc-switchkins-remap-table-cached.sh >/dev/null
|
||||
|
||||
@@ -533,6 +533,7 @@ function installOpfsWorkspace(module, options) {
|
||||
} else {
|
||||
await removeOpfsFileEntry(workspacePath, `${path}.bak`);
|
||||
}
|
||||
cleanupLinuxCncParameterFiles(module);
|
||||
return data;
|
||||
},
|
||||
async removeFile(path) {
|
||||
|
||||
@@ -16,13 +16,13 @@ export async function runBrowserOpfsParameterSections(context, simulator) {
|
||||
withSmokeSimulator,
|
||||
} = context;
|
||||
const backend = { backend: "linuxcnc-rs274" };
|
||||
const parseWithParameters = (program, path) =>
|
||||
simulator.parseWithParameterFile(program, path, "linuxcnc", backend);
|
||||
const parseWithParameters = (program, path) => simulator.parseWithParameterFile(program, path, "linuxcnc", backend);
|
||||
|
||||
await runSection("opfs parameter save", async () => {
|
||||
await simulator.parseWithParameterFile("G21 G90\nG0 X1\nG28.1\nM30\n", "parameters/rs274ngc.var", "linuxcnc", backend);
|
||||
const opfsParameterFile = await readOpfsText(simulator, "parameters/rs274ngc.var");
|
||||
expectIncludes(opfsParameterFile, "5161\t1.000000", "LinuxCNC parameter file was not persisted into OPFS");
|
||||
expectWasmFilesMissing(simulator.fs.module.FS, ["rs274ngc.var", "rs274ngc.var.new", "rs274ngc.var.bak"], (parameterPath) => `LinuxCNC parameter scratch file remained outside OPFS after save: ${parameterPath}`);
|
||||
});
|
||||
|
||||
await runSection("opfs parameter restore in new instance", async () => {
|
||||
@@ -84,6 +84,7 @@ export async function runBrowserOpfsParameterSections(context, simulator) {
|
||||
const opfsParameterBackup = await readOpfsText(simulator, "parameters/backup-bridge.var.bak");
|
||||
expectIncludes(opfsParameterBackup, "5161\t1.000000",
|
||||
"LinuxCNC parameter backup file was not bridged into OPFS");
|
||||
expectWasmFilesMissing(simulator.fs.module.FS, ["rs274ngc.var", "rs274ngc.var.new", "rs274ngc.var.bak"], (parameterPath) => `LinuxCNC parameter scratch file remained outside OPFS after backup bridge: ${parameterPath}`);
|
||||
});
|
||||
|
||||
await runSection("opfs parameter backup after existing save", async () => {
|
||||
|
||||
Reference in New Issue
Block a user