]> git.proxmox.com Git - mirror_lxc.git/blobdiff - src/tests/lxc-test-apparmor-generated
oss-fuzz: adapt options to oss-fuzz build
[mirror_lxc.git] / src / tests / lxc-test-apparmor-generated
index 25057e0c8caccfa03c931898dc60000fa72b8c0e..15b6a1128574887b6eda3f198e6cd1e80e9502d8 100755 (executable)
@@ -18,7 +18,7 @@
 # License along with this library; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
 
-if ! which apparmor_parser >/dev/null 2>&1; then
+if ! command -v apparmor_parser >/dev/null 2>&1; then
        echo 'SKIP: test for generated apparmor profiles: apparmor_parser missing'
 fi
 exit 0
@@ -54,8 +54,8 @@ echo "lxc.apparmor.profile = generated" >> $CONTAINER_PATH/config
 # Start it
 lxc-start -n $CONTAINER_NAME -lDEBUG -o "$LOGFILE"
 lxc-wait -n $CONTAINER_NAME -t 5 -s RUNNING || (echo "Container didn't start" && exit 1)
-pid=`lxc-info -p -H -n $CONTAINER_NAME`
-profile=`cat /proc/$pid/attr/current`
+pid=$(lxc-info -p -H -n $CONTAINER_NAME)
+profile=$(cat /proc/$pid/attr/current)
 expected_profile="lxc-${CONTAINER_NAME}_</var/lib/lxc>//&:lxc-${CONTAINER_NAME}_<-var-lib-lxc>:unconfined (enforce)"
 lxc-stop -n $CONTAINER_NAME -k
 if [ "x$profile" != "x$expected_profile" ]; then