Fix tests running on systemd with a merged /usr
On merged /usr systems, launching ping
will end up executing
/usr/bin/ping
instead of /bin/ping
, causing tests to fail as the
AppArmor profile matches on the path.
To avoid that, use which
to discover the real location and generate
the appropriate AppArmor profile.