From 72a4cba5ad4e8599a63a31ce89f9a51a922618e1 Mon Sep 17 00:00:00 2001 From: rereview Date: Fri, 11 Sep 2026 13:05:05 -0400 Subject: [PATCH] [Fix, Test] (MG_Test): include the header that defines MOBILEGL_PIPE_POISON - seven emitter suites tested the macro without it, compiled the non-aborting arm, and turned eighteen expected refusals into aborts the moment a disaggregated build armed it --- MobileGL/MG_Test/Pipe/CompositeResolverTest.cpp | 7 +++++++ MobileGL/MG_Test/Pipe/FramebufferEmitTest.cpp | 7 +++++++ MobileGL/MG_Test/Pipe/ImageEmitTest.cpp | 7 +++++++ MobileGL/MG_Test/Pipe/ProgramEmitTest.cpp | 7 +++++++ MobileGL/MG_Test/Pipe/ResourceEmitTest.cpp | 14 +++++++++++++- MobileGL/MG_Test/Pipe/SamplerEmitTest.cpp | 7 +++++++ MobileGL/MG_Test/Pipe/TextureEmitTest.cpp | 7 +++++++ 7 files changed, 55 insertions(+), 1 deletion(-) diff --git a/MobileGL/MG_Test/Pipe/CompositeResolverTest.cpp b/MobileGL/MG_Test/Pipe/CompositeResolverTest.cpp index 8a4cf117..b93c9db0 100644 --- a/MobileGL/MG_Test/Pipe/CompositeResolverTest.cpp +++ b/MobileGL/MG_Test/Pipe/CompositeResolverTest.cpp @@ -51,6 +51,13 @@ #include #if MOBILEGL_PIPE_PUSH #include "Init.h" +// MOBILEGL_PIPE_POISON is DERIVED in the header below (PipeInputs.h:20-26) and nowhere +// else, so a TU that tests it without this include silently reads it as 0. That is +// invisible in a push build (where it really is 0) and in a verify build (where +// -DMOBILEGL_PIPE_VERIFY=1 is on the command line); MOBILEGL_BUILD_DISAGGREGATED is the +// one arming condition that lives behind the header, so a split build is the first place +// the refusals below stop being fatal while the expectations still say they are. +#include #include #include #include diff --git a/MobileGL/MG_Test/Pipe/FramebufferEmitTest.cpp b/MobileGL/MG_Test/Pipe/FramebufferEmitTest.cpp index d5191edc..7860fff4 100644 --- a/MobileGL/MG_Test/Pipe/FramebufferEmitTest.cpp +++ b/MobileGL/MG_Test/Pipe/FramebufferEmitTest.cpp @@ -57,6 +57,13 @@ #include "Includes.h" #include #if MOBILEGL_PIPE_PUSH +// MOBILEGL_PIPE_POISON is DERIVED in the header below (PipeInputs.h:20-26) and nowhere +// else, so a TU that tests it without this include silently reads it as 0. That is +// invisible in a push build (where it really is 0) and in a verify build (where +// -DMOBILEGL_PIPE_VERIFY=1 is on the command line); MOBILEGL_BUILD_DISAGGREGATED is the +// one arming condition that lives behind the header, so a split build is the first place +// the refusals below stop being fatal while the expectations still say they are. +#include #include #include #include diff --git a/MobileGL/MG_Test/Pipe/ImageEmitTest.cpp b/MobileGL/MG_Test/Pipe/ImageEmitTest.cpp index 524b3232..f3c7f056 100644 --- a/MobileGL/MG_Test/Pipe/ImageEmitTest.cpp +++ b/MobileGL/MG_Test/Pipe/ImageEmitTest.cpp @@ -45,6 +45,13 @@ #include #if MOBILEGL_PIPE_PUSH #include "Init.h" +// MOBILEGL_PIPE_POISON is DERIVED in the header below (PipeInputs.h:20-26) and nowhere +// else, so a TU that tests it without this include silently reads it as 0. That is +// invisible in a push build (where it really is 0) and in a verify build (where +// -DMOBILEGL_PIPE_VERIFY=1 is on the command line); MOBILEGL_BUILD_DISAGGREGATED is the +// one arming condition that lives behind the header, so a split build is the first place +// the refusals below stop being fatal while the expectations still say they are. +#include #include #include #include diff --git a/MobileGL/MG_Test/Pipe/ProgramEmitTest.cpp b/MobileGL/MG_Test/Pipe/ProgramEmitTest.cpp index 4b6e087e..4f63b495 100644 --- a/MobileGL/MG_Test/Pipe/ProgramEmitTest.cpp +++ b/MobileGL/MG_Test/Pipe/ProgramEmitTest.cpp @@ -50,6 +50,13 @@ #include #if MOBILEGL_PIPE_PUSH #include "Init.h" +// MOBILEGL_PIPE_POISON is DERIVED in the header below (PipeInputs.h:20-26) and nowhere +// else, so a TU that tests it without this include silently reads it as 0. That is +// invisible in a push build (where it really is 0) and in a verify build (where +// -DMOBILEGL_PIPE_VERIFY=1 is on the command line); MOBILEGL_BUILD_DISAGGREGATED is the +// one arming condition that lives behind the header, so a split build is the first place +// the refusals below stop being fatal while the expectations still say they are. +#include #include #include #include diff --git a/MobileGL/MG_Test/Pipe/ResourceEmitTest.cpp b/MobileGL/MG_Test/Pipe/ResourceEmitTest.cpp index d1d9f696..6c8cd3c3 100644 --- a/MobileGL/MG_Test/Pipe/ResourceEmitTest.cpp +++ b/MobileGL/MG_Test/Pipe/ResourceEmitTest.cpp @@ -56,6 +56,13 @@ #include #if MOBILEGL_PIPE_PUSH #include +// MOBILEGL_PIPE_POISON is DERIVED in the header below (PipeInputs.h:20-26) and nowhere +// else, so a TU that tests it without this include silently reads it as 0. That is +// invisible in a push build (where it really is 0) and in a verify build (where +// -DMOBILEGL_PIPE_VERIFY=1 is on the command line); MOBILEGL_BUILD_DISAGGREGATED is the +// one arming condition that lives behind the header, so a split build is the first place +// the refusals below stop being fatal while the expectations still say they are. +#include #include #include #include @@ -1246,7 +1253,12 @@ namespace { TEST(ResourceEmit, TheLiveHostWritesWireFiresOnTheCallAPersistentMapProducerWouldSetItOn) { #if !MOBILEGL_PIPE_PUSH GTEST_SKIP() << "MOBILEGL_PIPE_PUSH is off: there is no applier in this build"; -#elif !(MOBILEGL_PIPE_POISON || MOBILEGL_PIPE_VERIFY) + // MOBILEGL_PIPE_VERIFY alone, NOT `POISON || VERIFY`. PinNoLiveHostWrites is compiled + // under `#if MOBILEGL_PIPE_VERIFY` only (PipeApply.cpp:838-853), so in a split build - + // where POISON is armed by MOBILEGL_BUILD_DISAGGREGATED but VERIFY is off - the wire + // genuinely is compiled out and this case must skip. The wrong disjunction was masked + // until now by POISON being invisible in this TU at all (see the include at the top). +#elif !MOBILEGL_PIPE_VERIFY GTEST_SKIP() << "Fatal{PipeLiveHostWrites} is a MOBILEGL_PIPE_VERIFY wire and is compiled out here"; #elif !MGTEST_HAVE_FORK GTEST_SKIP() << "no fork on this platform; the wire's verdict is std::abort()"; diff --git a/MobileGL/MG_Test/Pipe/SamplerEmitTest.cpp b/MobileGL/MG_Test/Pipe/SamplerEmitTest.cpp index e720af3b..b0a03f5e 100644 --- a/MobileGL/MG_Test/Pipe/SamplerEmitTest.cpp +++ b/MobileGL/MG_Test/Pipe/SamplerEmitTest.cpp @@ -56,6 +56,13 @@ #include #include "Init.h" +// MOBILEGL_PIPE_POISON is DERIVED in the header below (PipeInputs.h:20-26) and nowhere +// else, so a TU that tests it without this include silently reads it as 0. That is +// invisible in a push build (where it really is 0) and in a verify build (where +// -DMOBILEGL_PIPE_VERIFY=1 is on the command line); MOBILEGL_BUILD_DISAGGREGATED is the +// one arming condition that lives behind the header, so a split build is the first place +// the refusals below stop being fatal while the expectations still say they are. +#include #include #include #include diff --git a/MobileGL/MG_Test/Pipe/TextureEmitTest.cpp b/MobileGL/MG_Test/Pipe/TextureEmitTest.cpp index 6c04f426..2d2f4160 100644 --- a/MobileGL/MG_Test/Pipe/TextureEmitTest.cpp +++ b/MobileGL/MG_Test/Pipe/TextureEmitTest.cpp @@ -57,6 +57,13 @@ #include "Includes.h" #include #if MOBILEGL_PIPE_PUSH +// MOBILEGL_PIPE_POISON is DERIVED in the header below (PipeInputs.h:20-26) and nowhere +// else, so a TU that tests it without this include silently reads it as 0. That is +// invisible in a push build (where it really is 0) and in a verify build (where +// -DMOBILEGL_PIPE_VERIFY=1 is on the command line); MOBILEGL_BUILD_DISAGGREGATED is the +// one arming condition that lives behind the header, so a split build is the first place +// the refusals below stop being fatal while the expectations still say they are. +#include #include #include #include