mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-11-13 04:53:23 +09:00
[Test] (.github/workflows, docs/ci, MG_IntegrationTest, MG_IntegrationTest/Harness, scripts/data): assert each split entry's transport in-test
- the split fixture fails an armed Split/Spawn/Tcp entry whose process did not resolve the transport its registration claims, or whose server is not where the claim says: a thread here for inproc, a process of its own for spawn and tcp (SplitRuntimePeek now names spawn, reads ClientSession::PeerServerPid() and this process's pid, _getpid() on Windows; an unknown own pid leaves only that comparison unjudged) - SplitLaneHarness.TransportClaimRule, a GL-free unit test, proves the rule red and green on canned inputs; skip census: added to junit-integration-split-strict/unit-strict (test/unit and unit-split borrow that list) - integration-split drops its post-hoc grep of one entry's log; the step keeps the IPC default proof as 'Default-knob resolution check', on the disaggregation branches only, and a strict default that changed falls back to Transport A/B like the other two
This commit is contained in:
+11
-27
@@ -1562,7 +1562,8 @@ jobs:
|
||||
# --no-tests=error is half the gate, exactly as in integration-verify: the integration-split
|
||||
# entries exist only when the library was configured with -DMOBILEGL_BUILD_DISAGGREGATED=ON,
|
||||
# so a build that lost the option matches nothing and reds here instead of reporting a green
|
||||
# run of nothing. The other half is the transport-resolution check below.
|
||||
# run of nothing. The other half is in-test: the split fixture fails an armed entry whose
|
||||
# process did not resolve the transport its registration claims.
|
||||
#
|
||||
# An entry whose owning package (c1 client, s1 session, v1 server) has not landed SKIPS with
|
||||
# the reason and never goes green - MG_IntegrationTest/CMakeLists.txt probes MG_Remote for
|
||||
@@ -1592,34 +1593,17 @@ jobs:
|
||||
python3 ../scripts/ci/junit_tally.py "${RUNNER_TEMP}/tcp-baseline.xml" --require-tcp-ran --require-run-ahead --discovery "${RUNNER_TEMP}/tcp-discovery.json"
|
||||
python3 ../scripts/ci/junit_tally.py "${RUNNER_TEMP}/tcp-baseline.xml" --require-entry-passed TcpLane.SupervisorProtocolControls --require-entry-passed TcpLane.EventForfeitPeer --require-entry-passed TcpLane.ControlFrameFuzz
|
||||
|
||||
# THE RUNTIME HALF OF "THIS IS REALLY A SPLIT BUILD". The build-level nm check in
|
||||
# build-linux-split proves the library CARRIES MG_Remote; this proves the transport
|
||||
# RESOLVED in a process of this lane. ConfigLoader::InitTransport logs one INFO line when it
|
||||
# selects InProcess, and the DirectGLES.Split.PersistentMapArm. entry retains its private
|
||||
# counting log (all Split entries now have private paths). It runs right after the lane, so
|
||||
# it reads the lane's own run rather than a later step's rerun of the same entry.
|
||||
# The line is written during bring-up, before any scenario decides to skip, so this
|
||||
# check is live from the day the lanes land rather than from the day they stop skipping.
|
||||
- name: Transport and default-knob resolution check
|
||||
# Whether each entry ran the transport it claims is asserted in-test: the split fixture
|
||||
# (Harness/ScenarioFixture.h) fails an armed entry whose process resolved another transport
|
||||
# or whose server is not where the claim says, and junit_tally's --require-*-ran above
|
||||
# require each arm to have passed entries. This step proves the IPC defaults the lanes
|
||||
# rely on, from every passed entry's own client log; it runs right after the lane, so it
|
||||
# reads the lane's own run rather than a later step's rerun of the same entry.
|
||||
- name: Default-knob resolution check
|
||||
id: resolution
|
||||
if: env.MOBILEGL_CI_DISAGGREGATED == 'ON'
|
||||
working-directory: ${{ env.SPLIT_BUILD_DIR }}
|
||||
run: |
|
||||
# P6: the sink writes one file per ROLE from the base MOBILEGL_LOG_FILE_PATH; the
|
||||
# transport-resolution line is ConfigLoader's, on the CLIENT thread, so it is in the
|
||||
# .client half. The base name itself names no file now.
|
||||
log=MobileGL/MG_IntegrationTest/persistent-map-arm-split-DirectGLES.client.log
|
||||
if [ ! -f "${log}" ]; then
|
||||
echo "::error::${log} does not exist: the DirectGLES.Split.PersistentMapArm. entry never ran (or the per-role split renamed it), so nothing in this job establishes that MOBILEGL_TRANSPORT ever resolved to inproc in a live process"
|
||||
exit 1
|
||||
fi
|
||||
# THE DISTINCTIVE PART OF THE INFO LINE, not the bare KEY=VALUE (review finding M-5):
|
||||
# ConfigLoader logs `Config: Accepted env variable: MOBILEGL_TRANSPORT=inproc` for the
|
||||
# env dump too, unconditionally and in a PULL build, and at DEBUG that line is live.
|
||||
if ! grep -q "MOBILEGL_TRANSPORT=inproc - the MGPipe record stream" "${log}"; then
|
||||
echo "::error::${log} carries no transport-resolution line. ConfigLoader::InitTransport logs it at INFO when it selects InProcess, and that code exists only in a MOBILEGL_BUILD_DISAGGREGATED build - so this lane ran a monolith library while claiming to be the split lane. (A bare MOBILEGL_TRANSPORT=inproc substring is NOT accepted: the env dump prints one in every build.)"
|
||||
exit 1
|
||||
fi
|
||||
echo "the split lane resolved MOBILEGL_TRANSPORT=inproc"
|
||||
# The IPC knobs every passed entry resolved, from its own client log: the defaults the
|
||||
# lane relies on (run-ahead and the role-split state on, strict off) unless the entry
|
||||
# pins its own. Proven defaults make Transport A/B below a repeat of the integration
|
||||
@@ -1628,7 +1612,7 @@ jobs:
|
||||
rc=0
|
||||
python3 "${GITHUB_WORKSPACE}/MobileGL/MG_IntegrationTest/Harness/split_log_paths.py" ipc-config \
|
||||
"${RUNNER_TEMP}/split-lane.json" "${RUNNER_TEMP}/split-baseline.xml" "${RUNNER_TEMP}/split-ipc.json" \
|
||||
strict=0 role-split-state=1 run-ahead=1 --assumed role-split-state,run-ahead || rc=$?
|
||||
strict=0 role-split-state=1 run-ahead=1 --assumed strict,role-split-state,run-ahead || rc=$?
|
||||
if [ "${rc}" -eq 0 ]; then
|
||||
echo "defaults-on=true" >> "${GITHUB_OUTPUT}"
|
||||
elif [ "${rc}" -eq 3 ]; then
|
||||
|
||||
Reference in New Issue
Block a user