test(xce-test-rc-file): task 3.1 end-to-end rc-file discovery/loading/--norc
Adds test_rcfile_integration.sh, mirroring clean_failover_preservation.sh's shell-driven black-box pattern against the real built xce_test binary: - a valid rc file's set masters override takes effect in both a piped run and a genuine pty-driven interactive run, before the normal session begins - --norc leaves the default masters value untouched with the same rc file present Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AgYRU3zDTqNGV5Jk8aiKLg
This commit is contained in:
parent
e863d69993
commit
d258aa3d91
2 changed files with 288 additions and 1 deletions
|
|
@ -33,7 +33,7 @@
|
|||
- _Boundary: test.c::main_
|
||||
|
||||
- [ ] 3. Validation: end-to-end behavior against the built binary
|
||||
- [ ] 3.1 Verify rc-file discovery, loading, and skip-flag behavior end-to-end
|
||||
- [x] 3.1 Verify rc-file discovery, loading, and skip-flag behavior end-to-end
|
||||
- Scenario: a valid rc file's settings/context take effect in both a piped run and an interactive run
|
||||
- Scenario: the skip flag leaves default settings untouched even with a valid rc file present
|
||||
- Observable: an integration test run demonstrates both scenarios pass against the real built binary
|
||||
|
|
@ -60,3 +60,4 @@
|
|||
- Task 1.1: the 2 pre-existing `test_config_repl.c` failures (`test_conf_trim_keeps_only_n_versions`, `test_conf_get_saved_tag_no_config`) are the tracked `bug-1561` overlayfs-artifact regression, unrelated to this spec — expect them to keep appearing in every subsequent task's `controller_unit_test` run; do not treat them as a new regression.
|
||||
- Task 1.2: `fopen()` succeeds on a directory path on this platform's glibc — the EISDIR failure only surfaces on the first `getline()` call (`errno=EISDIR`, `ferror(f)` set). A naive `if (!f)` open-failure check misses this; a post-loop `ferror(f)` check is required to catch it (see `rcfile_load()`, bug-1716).
|
||||
- Task 1.2: an ASAN heap-use-after-free was observed ONCE in an ad-hoc standalone `controller_unit_test` run (`commit_resolve_pending`/`fsync_worker`/`tap_teardown` in `test_apply_pump.c`) — did not reproduce on a second run or in the canonical `xce-build.sh` run. Unrelated to this spec's files; logged as bug-1717 (unreproduced flake) for tracking. If it recurs on a later task's run, capture the full ASAN report before assuming it's this spec's fault.
|
||||
- Task 3.1: `test_rcfile_integration.sh`'s per-test scratch `$HOME` dirs are cleaned via explicit `rm -rf` in each test function's normal flow, but there's no script-level `trap ... EXIT INT TERM` (unlike `clean_failover_preservation.sh`'s global trap) — an interrupted run could leak a small scratch dir. Verified low-impact (small footprint, no leak in normal runs) but worth adding a trap if this script is extended later.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue