fix(scheduler): extend core-isolation nm-audit to core_events.c/core_session.c/core_clock.c (Req 5 AC 1/2)
test_core_isolation.c's build-time proof (nm(1) undefined-symbol scan of sched_core_isolation_lib) previously covered only core.c -- core.c's own 800-line-cap siblings, holding scheduling logic just as boundary-sensitive as core.c itself, were "isolation-clean by review" only, with nothing mechanical catching a regression. Extends sched_core_isolation_lib to compile all four files together, and the source-text scans (forbidden headers/symbols, wall-clock calls) to also cover core_events.c/ core_session.c. core_clock.c joins only the nm(1) layer, not the wall-clock text scan -- it's the one sanctioned exception carrying the core family's single legitimate clock_gettime() call.
This commit is contained in:
parent
b450a6806b
commit
a13068dca6
4 changed files with 173 additions and 71 deletions
|
|
@ -65,16 +65,29 @@ scheduler = executable('xce_scheduler',
|
|||
install: true)
|
||||
|
||||
# Task 4.1 (scheduler-core spec, Req 5.1/5.2): isolated compile target for
|
||||
# core.c alone, consumed by testsuite/test_core_isolation.c to prove at
|
||||
# build time that core.c references zero symbols from the networking/API
|
||||
# libraries (netio/xceapi/client/delay/idgen). A static_library() here need
|
||||
# not LINK against anything for this purpose -- compiling src/core.c to an
|
||||
# object is enough; the object's own undefined-symbol table (inspected via
|
||||
# nm(1) in the test) reflects exactly what core.c's code calls, independent
|
||||
# of which libraries are nominally "dependencies" of this build target.
|
||||
# core.c AND its core_events.c/core_session.c/core_clock.c siblings (design
|
||||
# review follow-up: the isolation boundary is a core.c-family-wide property
|
||||
# -- Req 5 AC 1/AC 2 -- but until this fix the nm(1) undefined-symbol proof
|
||||
# below only ever mechanically covered core.c itself, leaving the other
|
||||
# three "kept isolation-clean by review" only, i.e. manually, with nothing
|
||||
# catching a regression), consumed by testsuite/test_core_isolation.c to
|
||||
# prove at build time that none of the four reference zero-I/O-boundary
|
||||
# symbols from the networking/API libraries (netio/xceapi/client/delay/
|
||||
# idgen). core_clock.c is the one SANCTIONED exception to the separate
|
||||
# wall-clock text-scan check (it owns the core family's one legitimate
|
||||
# clock_gettime() call, Req 5 AC 3) -- that exemption is enforced in
|
||||
# test_core_isolation.c itself, not here; this archive only proves the
|
||||
# networking/API isolation boundary, which core_clock.c fully satisfies
|
||||
# (clock_gettime()/gmtime_r()/tlog_reg_format_func() are not
|
||||
# networking/API symbols). A static_library() here need not LINK against
|
||||
# anything for this purpose -- compiling these four files to objects is
|
||||
# enough; the archive's own undefined-symbol table (inspected via nm(1) in
|
||||
# the test) reflects exactly what this code calls, independent of which
|
||||
# libraries are nominally "dependencies" of this build target.
|
||||
sched_core_isolation_lib = static_library(
|
||||
'sched_core_isolation',
|
||||
['src/core.c'],
|
||||
['src/core.c', 'src/core_events.c', 'src/core_session.c',
|
||||
'src/core_clock.c'],
|
||||
include_directories: incdir,
|
||||
dependencies: scheduler_deps,
|
||||
install: false)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue