test: wrap even more binaries when running with sanitizers

Turns out that the util-linux dep on libsystemd caused more fun than I
originally anticipated:

$ lddtree /usr/bin/dfuzzer
dfuzzer => /usr/bin/dfuzzer (interpreter => /lib64/ld-linux-x86-64.so.2)
    libgio-2.0.so.0 => /lib64/libgio-2.0.so.0
        libgmodule-2.0.so.0 => /lib64/libgmodule-2.0.so.0
        libz.so.1 => /lib64/libz.so.1
        libmount.so.1 => /lib64/libmount.so.1
            libblkid.so.1 => /lib64/libblkid.so.1
            libsystemd.so.0 => /lib64/libsystemd.so.0
                libm.so.6 => /lib64/libm.so.6
                    ld-linux-x86-64.so.2 => /lib64/ld-linux-x86-64.so.2
        libselinux.so.1 => /lib64/libselinux.so.1
            libpcre2-8.so.0 => /lib64/libpcre2-8.so.0
...

Also, the tpm2 utils now depend on libudev through libcurl -> libssh ->
libfido2 dep chain:

$ lddtree /usr/bin/tpm2_pcrread
tpm2_pcrread => /usr/bin/tpm2_pcrread (interpreter => /lib64/ld-linux-x86-64.so.2)
    ...
    libcurl.so.4 => /lib64/libcurl.so.4
    ...
        libssh.so.4 => /lib64/libssh.so.4
            libfido2.so.1 => /lib64/libfido2.so.1
                libcbor.so.0.13 => /lib64/libcbor.so.0.13
                libudev.so.1 => /lib64/libudev.so.1
                    libgcc_s.so.1 => /lib64/libgcc_s.so.1
...

Follow-up for 8030e0b19e.

(cherry picked from commit a8400c8f1a)
(cherry picked from commit 13043ccbd1)
This commit is contained in:
Frantisek Sumsal
2026-04-23 13:44:59 +02:00
committed by Luca Boccassi
parent 55ee2c19a2
commit be2d065915
2 changed files with 9 additions and 9 deletions

View File

@@ -53,6 +53,7 @@ wrap=(
dbus-broker-launch
dbus-daemon
delv
dfuzzer
dhcpd
dig
dnf
@@ -67,6 +68,7 @@ wrap=(
groups
id
integritysetup
iscsiadm
iscsid
keymgr
knotc
@@ -76,12 +78,15 @@ wrap=(
login
ls
lsblk
lsns
lsof
lvm
mdadm
mkfs.btrfs
mkfs.ext4
mksquashfs
mount
mountpoint
multipath
multipathd
nvme
@@ -95,8 +100,12 @@ wrap=(
stat
stress-ng
su
swapoff
swapon
tar
tgtd
# The tpm2 tools (tpm2_readpublic, tpm2_pcrextend, ...) all are symlinks to tpm2
tpm2
umount
unix_chkpwd
useradd

View File

@@ -6,15 +6,6 @@ set -o pipefail
# shellcheck source=test/units/util.sh
. "$(dirname "$0")"/util.sh
# When sanitizers are used, export LD_PRELOAD with the sanitizers path,
# lsns doesn't work otherwise.
if [ -f /usr/lib/systemd/systemd-asan-env ]; then
# shellcheck source=/dev/null
. /usr/lib/systemd/systemd-asan-env
export LD_PRELOAD
export ASAN_OPTIONS
fi
# Only reuse the user namespace
systemd-run --unit=oldservice --property=Type=exec --property=PrivateUsers=true sleep 3600
OLD_PID=$(systemctl show oldservice -p MainPID | awk -F= '{print $2}')