Skip to content

Commit b3cb176

Browse files
katexochen3u13r
andcommitted
tests: ignore EOPNOTSUPP in in fsverity tests
When executing the tests in a sandbox, this is the error we get when running on a kernel with fsverity support, but sandbox restrictions preventing us from mounting something. Co-authored-by: Leonard Cohnen <leonard.cohnen@gmail.com> Signed-off-by: Paul Meyer <katexochen0@gmail.com>
1 parent 6fc335c commit b3cb176

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tests/test-units.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,9 @@ function test_mount_digest () {
7070
# We should either successfully mount, or start trying and fail for one of these reasons:
7171
# * Permission denied, if not root
7272
# * No such file or directory, if /dev/loop-control is missing
73+
# * Operation not permitted, when running in a sandbox
7374
# What should not happen is that it should fail for fs-verity reasons before trying to mount.
74-
$BINDIR/mount.composefs -o basedir=$dir/objects,digest=$DIGEST $dir/test.cfs $dir/mnt 2> $dir/stderr || assert_file_has_content $dir/stderr "Permission denied\|No such file or directory"
75+
$BINDIR/mount.composefs -o basedir=$dir/objects,digest=$DIGEST $dir/test.cfs $dir/mnt 2> $dir/stderr || assert_file_has_content $dir/stderr "Permission denied\|No such file or directory\|Operation not permitted"
7576
umount $dir/mnt 2> $dir/stderr || true
7677
fi
7778
}

0 commit comments

Comments
 (0)