[Test, CI] (scripts/ci, workflows): E2's draw-drop control requires the SSIM red AND the library's dropped-record count, E3(a) requires its private-log line as well as the pixels, and the smoke red-check finally perturbs the split control (ID-65)

This commit is contained in:
2026-09-16 11:09:21 -04:00
parent a7b43cbbcd
commit 579118a1b3
8 changed files with 383 additions and 28 deletions
+4 -1
View File
@@ -7,7 +7,7 @@ trap 'rm -rf "${WORK}"' EXIT
cp "${HERE}/testdata/stub_ctest.sh" "${WORK}/ctest"
chmod +x "${WORK}/ctest"
passes=0
for mode in missing-fatal stdout-fatal stale-fatal evidence e3-unrelated; do
for mode in missing-fatal stdout-fatal stale-fatal evidence e3-unrelated e3-no-private; do
mkdir -p "${WORK}/${mode}"
rc=0
STUB_MODE="${mode}" CTEST="${WORK}/ctest" CONTROL_TMPDIR="${WORK}/${mode}" \
@@ -19,6 +19,9 @@ for mode in missing-fatal stdout-fatal stale-fatal evidence e3-unrelated; do
else
message='E1 FAILED: selected private logs lack expected Fatal'
[ "${mode}" != e3-unrelated ] || message='FAILED: red lacks its persistent-map push diagnostic'
# ID-65's half: the pixel assertion arrived, the library said nothing, and the control must
# refuse the red by naming the line it wanted rather than accepting the pixels alone.
[ "${mode}" != e3-no-private ] || message='no selected private log carries /MGPipe: persistent-map push disabled'
[ "${rc}" != 0 ] && grep -q "${message}" "${WORK}/${mode}.out" || {
cat "${WORK}/${mode}.out"; echo "NOT OK ${mode}: control must report FAILED for its own reason"; exit 1;
}
Vendored Executable → Regular
+71 -2
View File
@@ -15,6 +15,8 @@
# stdout-fatal Fatal exists only on stdout, never in the private file
# stale-fatal Fatal exists before reset, never from this control run
# e3-unrelated E1 has its private Fatal; E3(a) fails for an unrelated reason
# e3-no-private E1 has its private Fatal; E3(a) has its PIXEL assertion but the library
# never says the push was disabled (the half ID-65 added)
# green baseline green; the control's own run PASSES (the knob is not load-bearing)
# red-baseline the baseline itself has a failed entry
# all-skipped the baseline is entirely skipped (the disarmed lane, a legitimate exit 0)
@@ -22,6 +24,18 @@
# retrace-unrelated one match; the run fails without naming the transport
# retrace-evidence one match; the run fails with run_trace_case.cmake's own sentence
# retrace-green one match; the run PASSES
#
# EXIT GATE E2's DRAW-DROP CONTROL (scripts/ci/retrace_drop_draw_control.sh). The library's own
# log is modelled as a separate sink from ctest stdout, exactly as it is for the split lane: the
# console sink is compiled out of the configurations these lanes run, so the dropped-record count
# can only ever arrive through ${LIBRARY_LOG}.
# dropdraw-noselect `ctest -N` matches nothing
# dropdraw-green the retrace PASSES with the draws dropped
# dropdraw-nossim red, but no ssim summary at all (loader failure / timeout shape)
# dropdraw-ssimhigh red, and the ssim is ABOVE the threshold: something else reddened it
# dropdraw-nolog red with a low ssim, but the library never said the knob armed
# dropdraw-zero red with a low ssim, the knob armed, and it dropped NOTHING
# dropdraw-evidence red with a low ssim and N > 0 records dropped: the real thing
set -u
mode="${STUB_MODE:?STUB_MODE must be set}"
@@ -39,7 +53,7 @@ listing_requested="${listing_requested:-0}"
emit_listing() {
echo "Test project /stub"
if [ "${mode}" = "retrace-noselect" ]; then
if [ "${mode}" = "retrace-noselect" ] || [ "${mode}" = "dropdraw-noselect" ]; then
echo "Total Tests: 0"
return
fi
@@ -88,12 +102,29 @@ fi
# The control's own run.
if [ "${MOBILEGL_IPC_VERB_BARRIER:-1}" = 0 ]; then
case "${mode}" in
evidence|e3-unrelated) echo 'Fatal{BarrierViolation, "DrawVbo"}' > "${log}" ;;
evidence|e3-unrelated|e3-no-private) echo 'Fatal{BarrierViolation, "DrawVbo"}' > "${log}" ;;
missing-fatal) echo "library setup only; no fatal" > "${log}" ;;
stdout-fatal) echo 'Fatal{BarrierViolation, "DrawVbo"}' ;;
esac
fi
# E3(a)'s library line, in the PERSISTENT-MAP entry's own private file - a different file from
# E1's, exactly as the manifest above declares. `e3-no-private` is the mode that leaves it out:
# the pixel assertion arrives, the library says nothing, and the control must refuse the red.
if [ "${MOBILEGL_IPC_PERSISTENT_BLOCK_KB:-64}" = 0 ] && [ "${mode}" = evidence ]; then
echo 'MGPipe: persistent-map push disabled - MOBILEGL_IPC_PERSISTENT_BLOCK_KB=0 is exit gate E3(a)'"'"'s NEGATIVE CONTROL' \
> "${CONTROL_TMPDIR}/pmap.log"
fi
case "${mode}" in
e3-no-private)
# E1's half passes (its private Fatal is written above); E3(a)'s pixel assertion arrives on
# stdout and its private line does not, so the control must stop at the second half.
echo "1/1 Test #1: DirectGLES.Split.ClearThenReadPixelsScenario.ClearWithNoDrawIsVisibleToDefaultFramebufferReadPixels ...***Failed"
if [ "${MOBILEGL_IPC_PERSISTENT_BLOCK_KB:-64}" = 0 ]; then
echo "../MobileGL/MG_IntegrationTest/Scenarios/PersistentCoherentMapScenario.cpp:414: Failure"
echo "the SECOND write through the same mapping, announced by nothing: this is exit gate E3(b)"
fi
exit 8
;;
unrelated|missing-fatal|stdout-fatal|stale-fatal|e3-unrelated)
echo "1/1 Test #1: DirectGLES.Split.ClearThenReadPixelsScenario.ClearWithNoDrawIsVisibleToDefaultFramebufferReadPixels ...***Failed"
echo "UNRELATED_CONTROL_FAILURE: the harness aborted in setup before the knob was read"
@@ -138,6 +169,44 @@ case "${mode}" in
echo "100% tests passed, 0 tests failed out of 1"
exit 0
;;
dropdraw-*)
# The library's own log, written by the replay the way the real one is. The control removes
# it before the run, so anything here is this run's.
armed=""
case "${mode}" in
dropdraw-zero)
armed='MGPipe: E2 control armed - drop-draw=1 drop-clear=0, 0 records dropped on the wire (draw=0 clear=0), frame 29' ;;
dropdraw-nolog) armed="" ;;
*)
armed='MGPipe: E2 control armed - drop-draw=1 drop-clear=0, 758 records dropped on the wire (draw=758 clear=0), frame 29' ;;
esac
if [ -n "${LIBRARY_LOG:-}" ] && [ -n "${armed}" ]; then
mkdir -p "$(dirname "${LIBRARY_LOG}")"
printf '%s\n' "[10:38:30] [Linux mobilegl_trace_/WARN]: ${armed}" > "${LIBRARY_LOG}"
fi
case "${mode}" in
dropdraw-green)
echo "100% tests passed, 0 tests failed out of 1"
exit 0
;;
dropdraw-nossim)
echo "1/1 Test #1: MobileGLTraceReplay.OpenRA.DirectGLES ...***Failed"
echo "CMake Error: the replay could not load the library"
exit 8
;;
dropdraw-ssimhigh)
echo "1/1 Test #1: MobileGLTraceReplay.OpenRA.DirectGLES ...***Failed"
echo "-- retrace completed; ssim=1.000000, ssimThreshold=0.990000, mismatchPixels=0"
echo "CMake Error at run_trace_case.cmake:301 (message): 3 MGPipe Fatal(s)"
exit 8
;;
*)
echo "1/1 Test #1: MobileGLTraceReplay.OpenRA.DirectGLES ...***Failed"
echo "-- retrace completed; ssim=0.000036, ssimThreshold=0.990000, mismatchPixels=295296"
exit 8
;;
esac
;;
*)
echo "stub_ctest: unknown STUB_MODE '${mode}'" >&2
exit 127