feat(xce-harness-component): promote ctrlstatus_fmt.h to shared xce/ include path

Move the one genuinely shared header (header-only, static inline, zero
link dependency) from src/controller/testsuite/ to src/include/xce/,
alongside the existing cross-daemon shared headers (cluster.h, types.h,
errnox.h). Repoint its three current consumers (harness's test.c and
joblist_display.c, controller's test_ctrlstatus.c) to the new path.
test_joblist_display.c is intentionally left on the old path -- it
relocates in task 2.2.

Also removes src/harness/meson.build's temporary '../controller/testsuite'
incdir shim, which task 1.1 added and explicitly marked for removal once
this task landed.

controller_unit_test: 1228 Tests 0 Failures 0 Ignored (unchanged from
task 1.1's baseline, confirming a header-path-only change).

Task 1.2 of xce-harness-component.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RLSNJhNoULvVcUhXEFafQC
This commit is contained in:
Rongsong Shen 2026-09-14 05:20:21 +00:00
parent cf55d691de
commit 9ed680258e
No known key found for this signature in database
GPG key ID: 5BCDAAE0123E9FE2
6 changed files with 5 additions and 14 deletions

View file

@ -9,7 +9,7 @@
- The 11 removed test files' `.c` sources are left on disk at their current `src/controller/testsuite/` path for now (referenced by no build target) — task 2.1 physically relocates them together with `test_test_cli.c`/`test_xcetest_process_entry.c`
- Observable: a harness-scoped build produces an `xce_test` binary; a controller-scoped build run immediately after this single task (no later tasks applied) still succeeds, `controller_unit_test`'s reported test count has dropped by exactly the 11 removed entries, and none of the four standalone binaries are defined anymore
- _Requirements: 1.1, 1.2, 1.3, 2.1, 2.2, 2.4_
- [ ] 1.2 Promote the shared ctrlstatus_fmt.h header and repoint its current consumers
- [x] 1.2 Promote the shared ctrlstatus_fmt.h header and repoint its current consumers
- Move `ctrlstatus_fmt.h` to `src/include/xce/`; update the include path in harness's `test.c` and `joblist_display.c` (already relocated in 1.1) and in controller's `test_ctrlstatus.c`
- `joblist_display.c`'s own test file, `test_joblist_display.c`, still lives in `src/controller/testsuite/` at this point and is intentionally left untouched here — its include-path fix happens in task 2.2, when that file relocates
- Observable: a repo-wide search finds no remaining relative `#include "ctrlstatus_fmt.h"`; all three current consumers include it from `xce/ctrlstatus_fmt.h`

View file

@ -22,7 +22,7 @@
#include "persist.h"
#include "xce/cluster_def.h"
#include "ctrlstatus_fmt.h" /* ctrlstatus_format_time_ms (task 6.3) */
#include "xce/ctrlstatus_fmt.h" /* ctrlstatus_format_time_ms (task 6.3) */
/* ── helpers ────────────────────────────────────────────────── */

View file

@ -8,7 +8,7 @@
#include <stdio.h> /* snprintf */
#include "ctrlstatus_fmt.h" /* ctrlstatus_format_time_ms */
#include "xce/ctrlstatus_fmt.h" /* ctrlstatus_format_time_ms */
#include "xce/types.h" /* XCE_WORKER_*, JOB_STAT_* bit definitions */
char* worker_status_str(uint32_t status)

View file

@ -1,13 +1,4 @@
# TEMPORARY (xce-harness-component task 1.1): '../controller/testsuite' is
# only here so the bare `#include "ctrlstatus_fmt.h"` in test.c/
# joblist_display.c keeps resolving -- ctrlstatus_fmt.h itself still
# physically lives at src/controller/testsuite/ctrlstatus_fmt.h pending
# task 1.2, which promotes it to src/include/xce/ctrlstatus_fmt.h and
# repoints these two #include lines at it. Remove this entry when task 1.2
# lands (it will make it redundant, since src/include is already on this
# path via '../include').
incdir = include_directories('.', '../include', '../lib', 'include',
'../controller/testsuite')
incdir = include_directories('.', '../include', '../lib', 'include')
zlib_dep = dependency('zlib')

View file

@ -23,7 +23,7 @@
#include "client.h"
#include "config.h" /* XCE_MAXNAME_LEN */
#include "controller.capnp.h"
#include "ctrlstatus_fmt.h" /* ctrlstatus_format_time_ms (task 6.3) */
#include "xce/ctrlstatus_fmt.h" /* ctrlstatus_format_time_ms (task 6.3) */
#include "delay.h"
#include "flagspec.h" /* shared flagspec_t descriptor-table flag parsing,
* rejection (with typo suggestion), and help