Skip to content

Qwen3.8-Flash-Next on any consumer hardware: one-click install for Windows / Linux. Strata inference engine, OpenAI/Anthropic API on localhost, optional image input.

C++

memory_guard_test: a .. component in the cgroup path falls back without a cap

Niko122168d66b117f3c
diff --git a/tests/core/memory_guard_test.cpp b/tests/core/memory_guard_test.cpp
index b439ca4be..24528b0b3 100644
--- a/tests/core/memory_guard_test.cpp
+++ b/tests/core/memory_guard_test.cpp
@@ -189,7 +189,8 @@ int main() {
check(!f.sample(), "no meminfo is unknown");
f.meminfo(120 * GiB, 25 * GiB);
f.self("0::/a/../g");
- check(!f.sample(), "a .. component in the cgroup path is refused");
+ check(f.sample() && f.sample()->source == MemorySource::meminfo, "a .. component in the cgroup path: MemAvailable alone");
+ check(!f.sample(100 * GiB), "a .. component with the cap is refused");
f.self("garbage without colons");
check(f.sample() && f.sample()->available == 25 * GiB, "unparsable /proc/self/cgroup lines are ignored");
}