2 KiB
| id | status | status_updated | status_note | component | severity | timestamp | last_seen | occurrences | files | tags | related | fix_commits | legacy | gitea_issue | gitea_synced_status | gitea_synced_hash | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| bug-1707 | fixed | 2026-09-28 | controller | unknown | 2026-08-26T09:32:18Z | 2026-09-19T09:00:00Z | 1 |
|
|
|
|
true | 302 | fixed | 923bc3cc473e |
bug-1707: cmd_resupdate: resupdate -n slots -v 4 -n mem silently drops the trailing mem resource with…
Description
cmd_resupdate: resupdate -n slots -v 4 -n mem silently drops the trailing mem resource with zero diagnostic (the final pending -n/-v pair is only flushed if a value was seen), yet the command still prints "resource update ok!" as if everything the user typed succeeded. A mid-list missing -v does print a warning; only the trailing one is silent.
Environment
Not recorded (migrated from buglog.json).
Reproduction
Not recorded (migrated from buglog.json).
Root cause
Trailing pending -n/-v pair flush logic only runs when resval_str != NULL, with no fallback warning path like the mid-list case has.
Fix
A trailing -n without -v now gets the same warning and default value as a mid-list one (resupdate_add()). cmd_resupdate also returns the RPC's failure instead of 0, refuses an empty update, and bounds the 16-entry vals[] array (a 17th -n overflowed it).
Verification
- Test: test_resupdate_trailing_name_without_value_warns and test_resupdate_rpc_failure_fails_the_session in src/harness/testsuite/test_test_cli.c: RED before the fix (no warning; exit 0 after the RPC failed), GREEN after
- Suites: harness 6/6 (asan): harness_unit_test 141/0, cmdutil 14/0, resval_typeresolve 7/0, joblist_display 22/0, join_worker_args 7/0, listrow_json 12/0
- Live: n/a; xce_test is a client tool and every case above runs without a controller
References
- Related: bug-1706