1.8 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-1709 | fixed | 2026-09-28 | controller | unknown | 2026-08-26T09:32:18Z | 2026-09-19T09:00:00Z | 1 |
|
|
|
true | 304 | fixed | 1e79d6a000e9 |
bug-1709: cmd_jobinfo always returns 0 (success) even when its -j jobid is malformed (parse_jobid's return…
Description
cmd_jobinfo always returns 0 (success) even when its -j jobid is malformed (parse_jobid's return code is discarded), when no -j is given at all, or when xcecli_jobinfo fails for every -j given -- breaking the tool's own scripted-mode exit-code-verdict contract for this command specifically.
Environment
Not recorded (migrated from buglog.json).
Reproduction
Not recorded (migrated from buglog.json).
Root cause
No error/found flag tracked across the -j loop; the function unconditionally return 0s regardless of whether any valid lookup succeeded.
Fix
cmd_jobinfo counts the -j values given and the lookups that succeeded: a malformed jobid prints "invalid jobid", no -j prints "no jobid given", and the command fails unless at least one lookup succeeded.
Verification
- Test: test_jobinfo_without_valid_jobid_fails in src/harness/testsuite/test_test_cli.c: RED before the fix (exit 0 for both
jobinfoandjobinfo -j garbage), 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
Not recorded (migrated from buglog.json).