test(process_registry): pin that scope argv never emits OOMPolicy

The spawn_local systemd test asserted the property was present; it now
asserts the invariant the fix establishes (no OOMPolicy= on a transient
scope), so a reintroduction fails here instead of on older systemd hosts.
This commit is contained in:
kshitijk4poor
2026-09-06 14:07:50 +05:30
committed by kshitij
parent 611ee856c5
commit 04885c25cf
+4 -1
View File
@@ -1956,7 +1956,10 @@ class TestSystemdCgroupIsolation:
if value == "--property"
]
assert "MemoryAccounting=yes" in properties
assert "OOMPolicy=kill" in properties
# systemd rejects OOMPolicy= on transient --scope units across the versions
# users run (239/245/249, #102486); emitting it fails the probe and every
# cron worker dispatch. MemoryMax + MemoryAccounting carry the isolation.
assert not any(p.startswith("OOMPolicy=") for p in properties), properties
memory_max = next(
value for value in properties if value.startswith("MemoryMax=")
)