参考所有分组,完成尽量多的内容。禁止顺手扩功能 smoke
结论:补齐 LinuxCNC source file/CXX flag helper 的入口拒绝守卫,锁住缺失参数、未知选项、逃逸 source path 和未知 WASM profile,不新增 CNC 行为或 smoke 功能。
This commit is contained in:
@@ -51,6 +51,13 @@ puma560_dh_unknown_option_log=$(mktemp "${TMPDIR:-/tmp}/cnc_sim_puma560_dh_unkno
|
||||
puma560_dh_too_many_args_log=$(mktemp "${TMPDIR:-/tmp}/cnc_sim_puma560_dh_too_many_args.XXXXXX.log")
|
||||
puma560_dh_escaped_source_log=$(mktemp "${TMPDIR:-/tmp}/cnc_sim_puma560_dh_escaped_source.XXXXXX.log")
|
||||
puma560_dh_non_hal_source_log=$(mktemp "${TMPDIR:-/tmp}/cnc_sim_puma560_dh_non_hal_source.XXXXXX.log")
|
||||
source_files_missing_message_log=$(mktemp "${TMPDIR:-/tmp}/cnc_sim_source_files_missing_message.XXXXXX.log")
|
||||
source_files_unknown_option_log=$(mktemp "${TMPDIR:-/tmp}/cnc_sim_source_files_unknown_option.XXXXXX.log")
|
||||
source_files_escaped_source_log=$(mktemp "${TMPDIR:-/tmp}/cnc_sim_source_files_escaped_source.XXXXXX.log")
|
||||
source_cxxflag_unknown_option_log=$(mktemp "${TMPDIR:-/tmp}/cnc_sim_source_cxxflag_unknown_option.XXXXXX.log")
|
||||
wasm_cxxflag_missing_profile_log=$(mktemp "${TMPDIR:-/tmp}/cnc_sim_wasm_cxxflag_missing_profile.XXXXXX.log")
|
||||
wasm_cxxflag_unknown_option_log=$(mktemp "${TMPDIR:-/tmp}/cnc_sim_wasm_cxxflag_unknown_option.XXXXXX.log")
|
||||
wasm_cxxflag_unknown_profile_log=$(mktemp "${TMPDIR:-/tmp}/cnc_sim_wasm_cxxflag_unknown_profile.XXXXXX.log")
|
||||
bad_line_manifest=$(mktemp "${TMPDIR:-/tmp}/cnc_sim_bad_manifest_line.XXXXXX.txt")
|
||||
bad_line_log=$(mktemp "${TMPDIR:-/tmp}/cnc_sim_bad_manifest_line.XXXXXX.log")
|
||||
absolute_source_manifest=$(mktemp "${TMPDIR:-/tmp}/cnc_sim_absolute_manifest_source.XXXXXX.txt")
|
||||
@@ -100,6 +107,13 @@ cleanup_native_test_temps() {
|
||||
"$puma560_dh_too_many_args_log" \
|
||||
"$puma560_dh_escaped_source_log" \
|
||||
"$puma560_dh_non_hal_source_log" \
|
||||
"$source_files_missing_message_log" \
|
||||
"$source_files_unknown_option_log" \
|
||||
"$source_files_escaped_source_log" \
|
||||
"$source_cxxflag_unknown_option_log" \
|
||||
"$wasm_cxxflag_missing_profile_log" \
|
||||
"$wasm_cxxflag_unknown_option_log" \
|
||||
"$wasm_cxxflag_unknown_profile_log" \
|
||||
"$bad_line_manifest" \
|
||||
"$bad_line_log" \
|
||||
"$absolute_source_manifest" \
|
||||
@@ -134,6 +148,13 @@ grep -F 'unknown LinuxCNC puma560 DH generator option: $1' generate-linuxcnc-pum
|
||||
grep -F 'too many LinuxCNC puma560 DH generator arguments' generate-linuxcnc-puma560-dh-parameters.sh >/dev/null
|
||||
grep -F 'LinuxCNC puma560 DH HAL source path must stay LinuxCNC-root relative: $source_path' generate-linuxcnc-puma560-dh-parameters.sh >/dev/null
|
||||
grep -F 'LinuxCNC puma560 DH source must be a HAL file: $source_path' generate-linuxcnc-puma560-dh-parameters.sh >/dev/null
|
||||
grep -F 'missing --missing-message value' list-linuxcnc-source-files.sh >/dev/null
|
||||
grep -F 'unknown source file option: $1' list-linuxcnc-source-files.sh >/dev/null
|
||||
grep -F 'LinuxCNC source path must be root-relative: $source' list-linuxcnc-source-files.sh >/dev/null
|
||||
grep -F 'unknown source cxxflag option: $1' list-linuxcnc-source-common-cxxflags.sh >/dev/null
|
||||
grep -F 'missing --profile value' list-linuxcnc-wasm-common-cxxflags.sh >/dev/null
|
||||
grep -F 'unknown wasm cxxflag option: $1' list-linuxcnc-wasm-common-cxxflags.sh >/dev/null
|
||||
grep -F 'unknown wasm cxxflag profile: $profile' list-linuxcnc-wasm-common-cxxflags.sh >/dev/null
|
||||
grep -F 'LinuxCNC source basis: all-native guardrails lock source-backed manifests' test-all-native.sh >/dev/null
|
||||
test -x check-linuxcnc-inputs-cached.sh
|
||||
grep -F 'CNC_SIM_PREFLIGHT_CACHE_DIR' check-linuxcnc-inputs-cached.sh >/dev/null
|
||||
@@ -239,6 +260,13 @@ for forbidden_manual_cleanup in \
|
||||
'rm -f "$puma560_dh_too_many_args_log"' \
|
||||
'rm -f "$puma560_dh_escaped_source_log"' \
|
||||
'rm -f "$puma560_dh_non_hal_source_log"' \
|
||||
'rm -f "$source_files_missing_message_log"' \
|
||||
'rm -f "$source_files_unknown_option_log"' \
|
||||
'rm -f "$source_files_escaped_source_log"' \
|
||||
'rm -f "$source_cxxflag_unknown_option_log"' \
|
||||
'rm -f "$wasm_cxxflag_missing_profile_log"' \
|
||||
'rm -f "$wasm_cxxflag_unknown_option_log"' \
|
||||
'rm -f "$wasm_cxxflag_unknown_profile_log"' \
|
||||
'rm -f "$bad_line_manifest" "$bad_line_log"' \
|
||||
'rm -f "$absolute_source_manifest" "$absolute_source_log"' \
|
||||
'rm -f "$invalid_build_jobs_log"' \
|
||||
@@ -1471,6 +1499,72 @@ if ! grep -F "LinuxCNC puma560 DH source must be a HAL file: configs/sim/axis/vi
|
||||
sed -n '1,20p' "$puma560_dh_non_hal_source_log" >&2
|
||||
exit 1
|
||||
fi
|
||||
if ./list-linuxcnc-source-files.sh --missing-message >"$source_files_missing_message_log" 2>&1; then
|
||||
echo "LinuxCNC source file lister accepted --missing-message without a value" >&2
|
||||
exit 1
|
||||
fi
|
||||
if ! grep -F "missing --missing-message value" "$source_files_missing_message_log" >/dev/null; then
|
||||
echo "LinuxCNC source file lister did not report missing --missing-message values clearly" >&2
|
||||
sed -n '1,20p' "$source_files_missing_message_log" >&2
|
||||
exit 1
|
||||
fi
|
||||
if ./list-linuxcnc-source-files.sh --unknown src/emc/rs274ngc/interp_arc.cc \
|
||||
>"$source_files_unknown_option_log" 2>&1; then
|
||||
echo "LinuxCNC source file lister accepted an unknown option" >&2
|
||||
exit 1
|
||||
fi
|
||||
if ! grep -F "unknown source file option: --unknown" "$source_files_unknown_option_log" >/dev/null; then
|
||||
echo "LinuxCNC source file lister did not report unknown options clearly" >&2
|
||||
sed -n '1,20p' "$source_files_unknown_option_log" >&2
|
||||
exit 1
|
||||
fi
|
||||
if ./list-linuxcnc-source-files.sh ../src/emc/rs274ngc/interp_arc.cc \
|
||||
>"$source_files_escaped_source_log" 2>&1; then
|
||||
echo "LinuxCNC source file lister accepted an escaped source path" >&2
|
||||
exit 1
|
||||
fi
|
||||
if ! grep -F "LinuxCNC source path must be root-relative: ../src/emc/rs274ngc/interp_arc.cc" \
|
||||
"$source_files_escaped_source_log" >/dev/null; then
|
||||
echo "LinuxCNC source file lister did not report escaped source paths clearly" >&2
|
||||
sed -n '1,20p' "$source_files_escaped_source_log" >&2
|
||||
exit 1
|
||||
fi
|
||||
if ./list-linuxcnc-source-common-cxxflags.sh --unknown >"$source_cxxflag_unknown_option_log" 2>&1; then
|
||||
echo "LinuxCNC source CXX flag lister accepted an unknown option" >&2
|
||||
exit 1
|
||||
fi
|
||||
if ! grep -F "unknown source cxxflag option: --unknown" "$source_cxxflag_unknown_option_log" >/dev/null; then
|
||||
echo "LinuxCNC source CXX flag lister did not report unknown options clearly" >&2
|
||||
sed -n '1,20p' "$source_cxxflag_unknown_option_log" >&2
|
||||
exit 1
|
||||
fi
|
||||
if ./list-linuxcnc-wasm-common-cxxflags.sh --profile >"$wasm_cxxflag_missing_profile_log" 2>&1; then
|
||||
echo "LinuxCNC wasm CXX flag lister accepted --profile without a value" >&2
|
||||
exit 1
|
||||
fi
|
||||
if ! grep -F "missing --profile value" "$wasm_cxxflag_missing_profile_log" >/dev/null; then
|
||||
echo "LinuxCNC wasm CXX flag lister did not report missing profile values clearly" >&2
|
||||
sed -n '1,20p' "$wasm_cxxflag_missing_profile_log" >&2
|
||||
exit 1
|
||||
fi
|
||||
if ./list-linuxcnc-wasm-common-cxxflags.sh --unknown >"$wasm_cxxflag_unknown_option_log" 2>&1; then
|
||||
echo "LinuxCNC wasm CXX flag lister accepted an unknown option" >&2
|
||||
exit 1
|
||||
fi
|
||||
if ! grep -F "unknown wasm cxxflag option: --unknown" "$wasm_cxxflag_unknown_option_log" >/dev/null; then
|
||||
echo "LinuxCNC wasm CXX flag lister did not report unknown options clearly" >&2
|
||||
sed -n '1,20p' "$wasm_cxxflag_unknown_option_log" >&2
|
||||
exit 1
|
||||
fi
|
||||
if ./list-linuxcnc-wasm-common-cxxflags.sh --profile bogus >"$wasm_cxxflag_unknown_profile_log" 2>&1; then
|
||||
echo "LinuxCNC wasm CXX flag lister accepted an unknown profile" >&2
|
||||
exit 1
|
||||
fi
|
||||
if ! grep -F "unknown wasm cxxflag profile: bogus" "$wasm_cxxflag_unknown_profile_log" >/dev/null; then
|
||||
echo "LinuxCNC wasm CXX flag lister did not report unknown profiles clearly" >&2
|
||||
sed -n '1,20p' "$wasm_cxxflag_unknown_profile_log" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
./list-linuxcnc-rs274-dump-project-sources.sh >/dev/null
|
||||
rs274_dump_source=$(./list-linuxcnc-rs274-dump-project-sources.sh linuxcnc_rs274_dump.cpp)
|
||||
|
||||
Reference in New Issue
Block a user