diff --git a/test/env.bats b/test/env.bats index c28e2c6a..fe9cf439 100644 --- a/test/env.bats +++ b/test/env.bats @@ -20,7 +20,7 @@ test: url: $BUSYBOX_OCI run: | # make sure that /stacker is readonly - grep "/stacker" /proc/mounts | grep -P "\sro[\s,]" + grep "/stacker" /proc/mounts | grep "[[:space:]]ro[[:space:],]" # make sure stacker deleted the non-import [ ! -f /stacker/foo ] diff --git a/test/overlay-dirs.bats b/test/overlay-dirs.bats index e62e31fd..896a1837 100644 --- a/test/overlay-dirs.bats +++ b/test/overlay-dirs.bats @@ -184,8 +184,9 @@ first: dest: /usr/local run: | [ -f /usr/local/file ] - [ "\$(stat --format=%G /usr/local/file )" == "root" ] - [ "\$(stat --format=%U /usr/local/file )" == "root" ] + # -c == --format, but busybox does not support --format + [ "\$(stat -c%G /usr/local/file )" == "root" ] + [ "\$(stat -c%U /usr/local/file )" == "root" ] EOF stacker build diff --git a/test/unprivileged.bats b/test/unprivileged.bats index 6fa61ee2..1db0a475 100644 --- a/test/unprivileged.bats +++ b/test/unprivileged.bats @@ -154,6 +154,6 @@ EOF mkdir layer0 mount -t squashfs oci/blobs/sha256/$layer0 layer0 - echo "mount has uid $(stat --format "%u" layer0/usr/bin/mount)" - [ "$(stat --format "%u" layer0/usr/bin/mount)" = "0" ] + echo "mount has uid $(stat --format "%u" layer0/bin/mount)" + [ "$(stat --format "%u" layer0/bin/mount)" = "0" ] }