From: Frantisek Sumsal Date: Sat, 25 Apr 2026 21:39:47 +0000 (+0200) Subject: test: don't strip directives from test units X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=ef3c07352b5dfe04afefdf66f4693986562ddc2b;p=thirdparty%2Fsystemd.git test: don't strip directives from test units 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/. --- diff --git a/mkosi/mkosi.sanitizers/mkosi.postinst b/mkosi/mkosi.sanitizers/mkosi.postinst index 42bbd41063c..f420a31b633 100755 --- a/mkosi/mkosi.sanitizers/mkosi.postinst +++ b/mkosi/mkosi.sanitizers/mkosi.postinst @@ -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" <