]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test: don't strip directives from test units 41808/head
authorFrantisek Sumsal <frantisek@sumsal.cz>
Sat, 25 Apr 2026 21:39:47 +0000 (23:39 +0200)
committerFrantisek Sumsal <frantisek@sumsal.cz>
Sat, 25 Apr 2026 21:39:47 +0000 (23:39 +0200)
The original find was matching even our test units, which caused issues
when the check was extended with Memory*= directives, as we stripped
them off from test units for TEST-55-OOMD where we certainly need them.
Since the stripping was meant primarily for "production-grade" units,
let's limit it to units under /etc/systemd/system/ and
/usr/lib/systemd/system/.

mkosi/mkosi.sanitizers/mkosi.postinst

index 42bbd41063c34f379b8e6c4a059df447dc0b5f7f..f420a31b633e7968265ccdd22a72ed6ab187d226 100755 (executable)
@@ -11,7 +11,7 @@ fi
 
 # ASAN and syscall filters aren't compatible with each other. Also, drop any memory limits
 # as these are quite unpredictable when running under sanitizers.
-find "$BUILDROOT"/usr "$BUILDROOT"/etc -name '*.service' -type f | while read -r unit; do
+find "$BUILDROOT"/{etc,usr/lib}/systemd/system/ -name '*.service' -type f | while read -r unit; do
     if grep -q -e MemoryDeny -e MemoryMax -e MemoryHigh -e MemorySwapMax -e SystemCall "$unit" ; then
         mkdir -p "$unit.d"
         cat > "$unit.d/sanitizer-compat.conf" <<EOF