Skip to content

Commit

Permalink
Add testcase
Browse files Browse the repository at this point in the history
Add a testcase to bind mount a filesystem that is ro, nodev, noexec, nosuid
without providing ro, nodev, noexec, nosuid in the initial mount.
Try to remount with these options afterwards.

Signed-off-by: Ruediger Pluem <ruediger.pluem@vodafone.com>
  • Loading branch information
rpluem-vf committed Jan 25, 2023
1 parent a1c51c5 commit 0101589
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/integration/mounts_sshfs.bats
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ function setup() {
DIR="$BATS_RUN_TMPDIR/fuse-sshfs"
mkdir -p "$DIR"

if ! $sshfs -o ro rootless@localhost: "$DIR"; then
if ! $sshfs -o ro,nodev,nosuid,noexec rootless@localhost: "$DIR"; then
skip "test requires working sshfs mounts"
fi

Expand All @@ -33,7 +33,7 @@ function teardown() {
type: "bind",
source: "'"$DIR"'",
destination: "/mnt",
options: ["rw", "rprivate", "nosuid", "nodev", "rbind"]
options: ["rw", "rprivate", "rbind"]
}]'

runc run test_busybox
Expand Down

0 comments on commit 0101589

Please sign in to comment.