fix(xce-test-cli-ux): fix bug-1557's join maxmem default
cmd_join_worker's simulated-worker maxmem default was 64 bytes -- a leftover from when the field was MB-scale, unfixed when maxmem became bytes-canonical elsewhere. Now 64 * 1024 * 1024. Extracted the argument-parsing/defaulting logic into join_worker_parse_attrs() (join_worker_args.c), since it runs entirely before the function's network call and is a genuine testable seam -- same precedent as task 2.5's joblist_display.c. Verified live against a real deployed cluster (workerlist reports MaxMem: 64.00 MB) plus a permanent 5-test regression suite. maxswap/maxtmp have the identical stale-default bug (logged as bug-1793) but are deliberately left unfixed here since USAGE_JOIN_WORKER's help text currently documents their stale values accurately -- fixing only the code would create a new docs mismatch; a locked-in sibling-defaults test documents this for the follow-up. 1353/1353 across the full controller suite (+5), 0 regressions. Task 2.6 of .kiro/specs/xce-test-cli-ux/tasks.md. Requirements: 12.1 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019jaMf9QEwpugH2W9KAuc7f
This commit is contained in:
parent
a8154acb0a
commit
878a42fb48
7 changed files with 304 additions and 40 deletions
|
|
@ -55,7 +55,7 @@ controller = executable('xce_controller',
|
|||
link_args: wrap_link_args,
|
||||
install: true)
|
||||
|
||||
xce_test_src = [ 'testsuite/test.c', 'testsuite/waldump.c', 'testsuite/walcompare.c', 'testsuite/snapverify.c', 'testsuite/snapdiff.c', 'testsuite/configcompare.c', 'testsuite/resval_typeresolve.c', 'testsuite/joblist_display.c', 'testsuite/rcfile.c', 'testsuite/flagspec.c', 'testsuite/interruptcall.c', 'testsuite/confirm.c', 'testsuite/listfmt_json.c']
|
||||
xce_test_src = [ 'testsuite/test.c', 'testsuite/waldump.c', 'testsuite/walcompare.c', 'testsuite/snapverify.c', 'testsuite/snapdiff.c', 'testsuite/configcompare.c', 'testsuite/resval_typeresolve.c', 'testsuite/joblist_display.c', 'testsuite/join_worker_args.c', 'testsuite/rcfile.c', 'testsuite/flagspec.c', 'testsuite/interruptcall.c', 'testsuite/confirm.c', 'testsuite/listfmt_json.c']
|
||||
|
||||
# BSD-licensed readline replacement (scheduler-core spec, task 12.1 review
|
||||
# finding): GNU readline is GPL; xce_test's REPL only needs readline()/
|
||||
|
|
@ -423,3 +423,29 @@ test('joblist display test', joblist_display_unit_test,
|
|||
timeout: 60,
|
||||
env: ['ASAN_OPTIONS=detect_leaks=0'])
|
||||
|
||||
# xce-test-cli-ux task 2.6 remediation: join_worker_args.c is a small,
|
||||
# dependency-light module (no networking/REPL/global state) extracted from
|
||||
# test.c's cmd_join_worker() specifically so the bug-1557 maxmem-default fix
|
||||
# can be unit-tested in isolation -- test.c itself cannot be white-box
|
||||
# included into a Unity test, same rationale as joblist_display_unit_test/
|
||||
# resval_typeresolve_unit_test above. Standalone binary (not folded into
|
||||
# controller_unit_test_src) since it has zero dependency on
|
||||
# controller.c/cluster.c internals, mirroring those tests' own
|
||||
# standalone-binary rationale.
|
||||
join_worker_args_unit_test_src = [
|
||||
'testsuite/test_join_worker_args.c',
|
||||
'testsuite/join_worker_args.c',
|
||||
]
|
||||
|
||||
join_worker_args_unit_test = executable('join_worker_args_unit_test',
|
||||
join_worker_args_unit_test_src,
|
||||
include_directories: [incdir],
|
||||
dependencies: controller_unit_test_deps,
|
||||
c_args: ['-DXCE_TESTING'],
|
||||
install: false)
|
||||
|
||||
test('join worker args test', join_worker_args_unit_test,
|
||||
suite: 'controller',
|
||||
timeout: 60,
|
||||
env: ['ASAN_OPTIONS=detect_leaks=0'])
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue