From feb04102e7f2b22e27f1e5834c952feed8b95ba4 Mon Sep 17 00:00:00 2001 From: cnc Date: Wed, 3 Jun 2026 21:08:35 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=82=E8=80=83=E6=89=80=E6=9C=89=E5=88=86?= =?UTF-8?q?=E7=BB=84=EF=BC=8C=E5=AE=8C=E6=88=90=E5=B0=BD=E9=87=8F=E5=A4=9A?= =?UTF-8?q?=E7=9A=84=E5=86=85=E5=AE=B9=E3=80=82=E7=A6=81=E6=AD=A2=E9=A1=BA?= =?UTF-8?q?=E6=89=8B=E6=89=A9=E5=8A=9F=E8=83=BD=20smoke?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 结论:补齐 cached LinuxCNC input 与 switchkins/remap 表检查器的 filesystem-root cache-dir 拒绝守卫,不新增 CNC 行为或 smoke 功能。 --- test-all-native.sh | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/test-all-native.sh b/test-all-native.sh index c60e18c..07da893 100755 --- a/test-all-native.sh +++ b/test-all-native.sh @@ -41,10 +41,12 @@ kinematics_unknown_filter_log=$(mktemp "${TMPDIR:-/tmp}/cnc_sim_kinematics_manif kinematics_unknown_output_log=$(mktemp "${TMPDIR:-/tmp}/cnc_sim_kinematics_manifest_unknown_output.XXXXXX.log") inputs_cached_missing_cache_dir_log=$(mktemp "${TMPDIR:-/tmp}/cnc_sim_inputs_cached_missing_cache_dir.XXXXXX.log") inputs_cached_whitespace_cache_dir_log=$(mktemp "${TMPDIR:-/tmp}/cnc_sim_inputs_cached_whitespace_cache_dir.XXXXXX.log") +inputs_cached_root_cache_dir_log=$(mktemp "${TMPDIR:-/tmp}/cnc_sim_inputs_cached_root_cache_dir.XXXXXX.log") switchkins_checker_unknown_option_log=$(mktemp "${TMPDIR:-/tmp}/cnc_sim_switchkins_checker_unknown_option.XXXXXX.log") switchkins_checker_too_many_args_log=$(mktemp "${TMPDIR:-/tmp}/cnc_sim_switchkins_checker_too_many_args.XXXXXX.log") switchkins_cached_missing_cache_dir_log=$(mktemp "${TMPDIR:-/tmp}/cnc_sim_switchkins_cached_missing_cache_dir.XXXXXX.log") switchkins_cached_whitespace_cache_dir_log=$(mktemp "${TMPDIR:-/tmp}/cnc_sim_switchkins_cached_whitespace_cache_dir.XXXXXX.log") +switchkins_cached_root_cache_dir_log=$(mktemp "${TMPDIR:-/tmp}/cnc_sim_switchkins_cached_root_cache_dir.XXXXXX.log") switchkins_generator_unknown_option_log=$(mktemp "${TMPDIR:-/tmp}/cnc_sim_switchkins_generator_unknown_option.XXXXXX.log") switchkins_generator_missing_output_dir_log=$(mktemp "${TMPDIR:-/tmp}/cnc_sim_switchkins_generator_missing_output_dir.XXXXXX.log") switchkins_generator_too_many_args_log=$(mktemp "${TMPDIR:-/tmp}/cnc_sim_switchkins_generator_too_many_args.XXXXXX.log") @@ -99,10 +101,12 @@ cleanup_native_test_temps() { "$kinematics_unknown_output_log" \ "$inputs_cached_missing_cache_dir_log" \ "$inputs_cached_whitespace_cache_dir_log" \ + "$inputs_cached_root_cache_dir_log" \ "$switchkins_checker_unknown_option_log" \ "$switchkins_checker_too_many_args_log" \ "$switchkins_cached_missing_cache_dir_log" \ "$switchkins_cached_whitespace_cache_dir_log" \ + "$switchkins_cached_root_cache_dir_log" \ "$switchkins_generator_unknown_option_log" \ "$switchkins_generator_missing_output_dir_log" \ "$switchkins_generator_too_many_args_log" \ @@ -254,10 +258,12 @@ for forbidden_manual_cleanup in \ 'rm -f "$kinematics_unknown_output_log"' \ 'rm -f "$inputs_cached_missing_cache_dir_log"' \ 'rm -f "$inputs_cached_whitespace_cache_dir_log"' \ + 'rm -f "$inputs_cached_root_cache_dir_log"' \ 'rm -f "$switchkins_checker_unknown_option_log"' \ 'rm -f "$switchkins_checker_too_many_args_log"' \ 'rm -f "$switchkins_cached_missing_cache_dir_log"' \ 'rm -f "$switchkins_cached_whitespace_cache_dir_log"' \ + 'rm -f "$switchkins_cached_root_cache_dir_log"' \ 'rm -f "$switchkins_generator_unknown_option_log"' \ 'rm -f "$switchkins_generator_missing_output_dir_log"' \ 'rm -f "$switchkins_generator_too_many_args_log"' \ @@ -1408,6 +1414,17 @@ if ! grep -F "CNC_SIM_PREFLIGHT_CACHE_DIR must not contain whitespace: build/inp sed -n '1,20p' "$inputs_cached_whitespace_cache_dir_log" >&2 exit 1 fi +if ./check-linuxcnc-inputs-cached.sh --cache-dir / linuxcnc-rs274-source-files.txt \ + >"$inputs_cached_root_cache_dir_log" 2>&1; then + echo "cached LinuxCNC input checker accepted filesystem-root cache dir" >&2 + exit 1 +fi +if ! grep -F "CNC_SIM_PREFLIGHT_CACHE_DIR must not be the filesystem root" \ + "$inputs_cached_root_cache_dir_log" >/dev/null; then + echo "cached LinuxCNC input checker did not report filesystem-root cache dirs clearly" >&2 + sed -n '1,20p' "$inputs_cached_root_cache_dir_log" >&2 + exit 1 +fi if ./check-linuxcnc-switchkins-remap-table-cached.sh --cache-dir >"$switchkins_cached_missing_cache_dir_log" 2>&1; then echo "cached switchkins remap table checker accepted --cache-dir without a value" >&2 exit 1 @@ -1428,6 +1445,17 @@ if ! grep -F "CNC_SIM_PREFLIGHT_CACHE_DIR must not contain whitespace: build/swi sed -n '1,20p' "$switchkins_cached_whitespace_cache_dir_log" >&2 exit 1 fi +if ./check-linuxcnc-switchkins-remap-table-cached.sh --cache-dir / \ + linuxcnc-kinematics-source-files.txt >"$switchkins_cached_root_cache_dir_log" 2>&1; then + echo "cached switchkins remap table checker accepted filesystem-root cache dir" >&2 + exit 1 +fi +if ! grep -F "CNC_SIM_PREFLIGHT_CACHE_DIR must not be the filesystem root" \ + "$switchkins_cached_root_cache_dir_log" >/dev/null; then + echo "cached switchkins remap table checker did not report filesystem-root cache dirs clearly" >&2 + sed -n '1,20p' "$switchkins_cached_root_cache_dir_log" >&2 + exit 1 +fi if ./generate-linuxcnc-switchkins-remap-table.sh --unknown >"$switchkins_generator_unknown_option_log" 2>&1; then echo "switchkins remap table generator accepted an unknown option" >&2 exit 1