mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-11-20 08:21:56 +09:00
[Merge] (MG_Remote, P5b): combine d1 draw migration with f1 i1 t2 and r2
This commit is contained in:
@@ -1,7 +1,10 @@
|
||||
# Included by CTest after all GoogleTest discovery files (ID-53).
|
||||
# CTest appends ENVIRONMENT here; keep all previously discovered lane settings.
|
||||
file(MAKE_DIRECTORY "@CMAKE_CURRENT_BINARY_DIR@/split-logs")
|
||||
foreach(entry IN LISTS MGL_SPLIT_CLEAR_TESTS MGL_SPLIT_TRIANGLE_TESTS MGL_SPLIT_PMAP_TESTS)
|
||||
# P5b t2's two lanes ride the same rule: one private log path per entry, or
|
||||
# SplitLogPaths.PrivateAndDistinct is red for them (ID-53).
|
||||
foreach(entry IN LISTS MGL_SPLIT_CLEAR_TESTS MGL_SPLIT_TRIANGLE_TESTS MGL_SPLIT_PMAP_TESTS
|
||||
MGL_SPLIT_T2_TESS_TESTS MGL_SPLIT_T2_XFB_TESTS)
|
||||
set_tests_properties("${entry}" PROPERTIES ENVIRONMENT
|
||||
"MOBILEGL_LOG_FILE_PATH=@CMAKE_CURRENT_BINARY_DIR@/split-logs/${entry}.log")
|
||||
endforeach()
|
||||
@@ -18,4 +21,14 @@ foreach(scenario @MGL_SPLIT_D1_SCENARIOS@)
|
||||
"MOBILEGL_LOG_FILE_PATH=@CMAKE_CURRENT_BINARY_DIR@/split-logs/${entry}.log")
|
||||
endforeach()
|
||||
endforeach()
|
||||
|
||||
# P5b package i1's four scenarios, the same shape as the small-ring loop above: every
|
||||
# DirectGLES.Split. entry owns exactly one absolute log path and shares it with nobody, which
|
||||
# is what SplitLogPaths.PrivateAndDistinct checks over the discovered set.
|
||||
foreach(scenario @MGL_SPLIT_I1_SCENARIOS@)
|
||||
foreach(entry IN LISTS MGL_SPLIT_I1_${scenario}_TESTS)
|
||||
set_tests_properties("${entry}" PROPERTIES ENVIRONMENT
|
||||
"MOBILEGL_LOG_FILE_PATH=@CMAKE_CURRENT_BINARY_DIR@/split-logs/${entry}.log")
|
||||
endforeach()
|
||||
endforeach()
|
||||
# PersistentMapArm retains its existing private path and RESOURCE_LOCK: b1 reads it.
|
||||
|
||||
@@ -19,10 +19,21 @@
|
||||
|
||||
#include <MG_Remote/Client/ClientSession.h>
|
||||
#include <MG_Remote/Client/EmitTables.h>
|
||||
#include <MG_Remote/Server/ServerLoop.h>
|
||||
#include <chrono>
|
||||
#include <thread>
|
||||
#define MGITEST_SPLIT_RUNTIME_PEEK_LIVE 1
|
||||
#endif
|
||||
|
||||
namespace MGITest {
|
||||
void DelaySplitRetirementForTesting(bool enabled) {
|
||||
#if defined(MGITEST_SPLIT_RUNTIME_PEEK_LIVE)
|
||||
MobileGL::MG_Remote::Server::ServerLoopInstance().SetBeforeRetireHookForTesting(
|
||||
enabled ? +[] { std::this_thread::sleep_for(std::chrono::milliseconds(30)); } : nullptr);
|
||||
#else
|
||||
(void)enabled;
|
||||
#endif
|
||||
}
|
||||
|
||||
SplitRuntimeState PeekSplitRuntime() {
|
||||
SplitRuntimeState state;
|
||||
|
||||
@@ -91,9 +91,8 @@ namespace MGITest {
|
||||
// than asserted: a uniform record stride over a power-of-two ring lands on the
|
||||
// boundary exactly and never straddles it.
|
||||
//
|
||||
// stageReclaimWaits: SEG_STAGE allocations that only fitted after the encoder reclaimed
|
||||
// what the server had retired - P5's one real producer wait (see PipeWireCodec.h for
|
||||
// why the command ring has none while the verb barrier is armed).
|
||||
// stageReclaimWaits: allocations blocked after immediate reclamation failed;
|
||||
// already-retired bytes reclaimed lazily do not count as a wait.
|
||||
unsigned long long maxRecordBytes = 0;
|
||||
unsigned long long maxRecordBytesCap = 0;
|
||||
unsigned long long cmdWraps = 0;
|
||||
@@ -103,6 +102,8 @@ namespace MGITest {
|
||||
};
|
||||
|
||||
SplitRuntimeState PeekSplitRuntime();
|
||||
// Scheduling-only perturbation; never changes a watermark or counter.
|
||||
void DelaySplitRetirementForTesting(bool enabled);
|
||||
|
||||
// Empty when this process is a real split run that can be asserted about; otherwise the
|
||||
// reason to GTEST_SKIP() with, naming the first fact that is not true and the package that
|
||||
|
||||
@@ -134,6 +134,9 @@ namespace MGITest::WireLedger {
|
||||
"kSmallRingLaneCmdByteTarget, which is sized for the 1 MiB ring this lane "
|
||||
"declares (MGL_ITEST_GLES_SPLIT_SMALL_RING_ENVIRONMENT); a larger ring needs a "
|
||||
"larger workload and is not what this lane is for";
|
||||
EXPECT_GE(state.stageReclaimWaits, 1u)
|
||||
<< where << ": exit gate E3(e) - producer NEVER WAITED for staging retirement; "
|
||||
"lazy reclamation of already-retired bytes is not back-pressure";
|
||||
::testing::Test::RecordProperty("ring_wraps", static_cast<int>(state.cmdWraps));
|
||||
::testing::Test::RecordProperty("ring_wrap_pads", static_cast<int>(state.cmdWrapPads));
|
||||
::testing::Test::RecordProperty("ring_waits", static_cast<int>(state.stageReclaimWaits));
|
||||
|
||||
@@ -68,6 +68,14 @@ def main():
|
||||
for n in selected for c in by_name[n])
|
||||
if not_failed:
|
||||
raise ValueError(f"{label} control: {not_failed} selected entries did not fail")
|
||||
elif mode == "assertion":
|
||||
cases = ET.parse(sys.argv[4]).getroot().findall(".//testcase")
|
||||
by_name = {case.get("name"): case for case in cases}
|
||||
for name in selected:
|
||||
case = by_name.get(name)
|
||||
output = "" if case is None else " ".join(" ".join(case.itertext()).split())
|
||||
if not re.search(sys.argv[5], output):
|
||||
raise ValueError(f"E3(a) FAILED: {name} red lacks its persistent-map push diagnostic")
|
||||
elif mode == "evidence":
|
||||
missing = []
|
||||
label = sys.argv[5] if len(sys.argv) > 5 else ""
|
||||
|
||||
Reference in New Issue
Block a user