[MG_Test] (P7): SubsystemDepsTest skips its two resolver cases in the pull build, and says what keeps the sweep alive

Rework round 1 of 4 after the D2 review (fable, ID-P7-8). Mirrors the integrator's
6da19f71 so that later commits from this worktree apply cleanly, and takes the two
review notes attached to the same file.

THE GUARD. The four Resolve<Family>SubsystemArm() declarations live inside
did not compile in the pull build (ID-P7-11). Both now GTEST_SKIP under
!MOBILEGL_PIPE_PUSH the way the client-side case already did. Verified by re-running
the file's own compile command with -DMOBILEGL_PIPE_PUSH=0 and MOBILEGL_BUILD_DISAGGREGATED
undefined: -fsyntax-only rc 0.

WHAT KEPT THE MASK SWEEP ALIVE, now asserted instead of assumed: every resolver ends in
ClassifyPipeSubsystemArm, and a NoArm verdict calls StopOnArmlessPipeSubsystem
(Managers.cpp:2928-2938), which ABORTS. The sweep deliberately drives masks that refuse a
family's handle arm, so it survives only because MOBILEGL_PIPE_LEGACY_MEMOS defaults ON
(Config.h:399) and leaves a legacy arm standing. ASSERT_TRUE on that, with the reason -
the day the default flips, this file would have aborted with no explanation.

THE FRAMEBUFFER RESOLVER IS RECORDED, NOT ASSERTED, and the asymmetry is the finding:
ResolveFramebufferSubsystemArm folds D-C3's wire-caps refusal in beside the dependency
rule (Managers.cpp:4323-4325), and that half asks the server's published caps, which a
bare unit binary with no session cannot answer in the affirmative. So a false says nothing
about D-K2 and asserting true would pin whatever the binary happens to have linked. The
sweep still covers it in the direction that matters. Also adds the 0x5ff refusal lane
beside 0x7ff.
This commit is contained in:
2026-09-22 18:17:25 -04:00
parent 310d4e90d1
commit b3334cf336
@@ -191,6 +191,19 @@ TEST(SubsystemDepsTest, TheClientNeverEmitsAFamilyTheTableRefuses) {
TEST(SubsystemDepsTest, TheServerConsumerGateNeverArmsAFamilyTheTableRefuses) {
#if MOBILEGL_PIPE_PUSH
using namespace MobileGL::MG_Backend::DirectGLES;
// THE RESOLVERS SURVIVE A SWEEP ONLY BECAUSE LEGACY MEMOS ARE ON. Each of them ends in
// ClassifyPipeSubsystemArm, and a verdict of NoArm calls StopOnArmlessPipeSubsystem
// (Managers.cpp:2928-2938), which aborts the process - that is the intended behaviour for a
// configuration with neither the handle arm nor the legacy arm, and it would turn this
// mask sweep into a crash rather than a failure. MOBILEGL_PIPE_LEGACY_MEMOS defaults ON
// (Config.h:399) and nothing in the unit lane clears it, so the legacy arm always survives
// and every resolver returns rather than stopping. Asserted rather than assumed, because the
// day that default flips this file would abort with no explanation.
ASSERT_TRUE(MG_Config::Features.PipeLegacyMemos)
<< "MOBILEGL_PIPE_LEGACY_MEMOS is clear, so a resolver whose handle arm this sweep "
"deliberately refuses has NO arm left and StopOnArmlessPipeSubsystem will abort the "
"process instead of returning false. Run this case with the legacy memos on, or teach "
"it to skip the masks that leave a family armless.";
struct Resolver {
const char* Name;
Uint64 Family;
@@ -221,10 +234,9 @@ TEST(SubsystemDepsTest, TheServerConsumerGateNeverArmsAFamilyTheTableRefuses) {
}
}
#else
// The resolvers are declared under MOBILEGL_PIPE_PUSH (Managers.h:664); the pull build has
// no consumer gate to compare against the table. Skipped, not omitted, so the unit name set
// stays the same in both flavours (ID-P7-11).
GTEST_SKIP() << "the server consumer gate is compiled only under MOBILEGL_PIPE_PUSH";
GTEST_SKIP() << "the four Resolve<Family>SubsystemArm() resolvers are declared and defined "
"only under MOBILEGL_PIPE_PUSH (Managers.h's P4a D-K3 block), so the pull "
"build has no server consumer gate to compare against";
#endif
}
@@ -235,6 +247,8 @@ TEST(SubsystemDepsTest, TheServerConsumerGateNeverArmsAFamilyTheTableRefuses) {
TEST(SubsystemDepsTest, TheTwoDocumentedRefusalLanesStillRefuseAndTheFullMaskStillArms) {
#if MOBILEGL_PIPE_PUSH
using namespace MobileGL::MG_Backend::DirectGLES;
ASSERT_TRUE(MG_Config::Features.PipeLegacyMemos)
<< "see the sweep above: a refused family with the legacy arm also off aborts the process";
{
PushMaskScope scope(kMGPipeSubsystemsMigratedAtP5e);
EXPECT_TRUE(ResolveTextureResourceSubsystemArm())
@@ -242,6 +256,14 @@ TEST(SubsystemDepsTest, TheTwoDocumentedRefusalLanesStillRefuseAndTheFullMaskSti
"refusal assertion in this file is vacuous";
EXPECT_TRUE(ResolveSamplerSubsystemArm());
EXPECT_TRUE(ResolveProgramSubsystemArm());
// THE FRAMEBUFFER RESOLVER IS RECORDED, NOT ASSERTED, and the asymmetry is the point:
// ResolveFramebufferSubsystemArm folds D-C3's wire-caps refusal in beside the dependency
// rule (Managers.cpp:4323-4325), and that half asks the SERVER's published caps - which a
// bare unit binary with no session and no registered backend cannot answer in the
// affirmative. So a false here says nothing about D-K2 and asserting true would pin
// whatever a test binary happens to have linked. The sweep above still covers it in the
// direction that matters (it may never ARM where the table refuses).
RecordProperty("framebuffer_resolver_at_p5e", ResolveFramebufferSubsystemArm() ? 1 : 0);
}
{
// 0x7ff: bits 0..10, i.e. the texture family WITHOUT the sampler family - D-K2's fourth
@@ -252,7 +274,15 @@ TEST(SubsystemDepsTest, TheTwoDocumentedRefusalLanesStillRefuseAndTheFullMaskSti
"D-K2's fourth row has been dropped on the server side while the client and the "
".def still carry it";
}
{
// 0x5ff: bits 0..8 and bit 10, i.e. the texture family WITHOUT the framebuffer bit and
// WITHOUT bit 11 - the second refusal lane CMakeLists.txt pins.
PushMaskScope scope(0x5ffull);
EXPECT_FALSE(ResolveTextureResourceSubsystemArm())
<< "0x5ff leaves bit 11 clear too, so the fourth row refuses it for the same reason";
}
#else
GTEST_SKIP() << "the server consumer gate is compiled only under MOBILEGL_PIPE_PUSH";
GTEST_SKIP() << "the four Resolve<Family>SubsystemArm() resolvers exist only under "
"MOBILEGL_PIPE_PUSH";
#endif
}