On Wed, Aug 4, 2021 at 3:08 PM Ondrej Mosnacek <omosnace@xxxxxxxxxx> wrote: > BTRFS doesn't support the FIBMAP ioctl, which is used to test > CAP_SYS_RAWIO. It is already disabled for NFS, so disable that test also > on BTRFS. > > Fedora 35 cloud images already have BTRFS volumes instead of ext4 and > this patch is needed to make the testsuite pass there. > > Signed-off-by: Ondrej Mosnacek <omosnace@xxxxxxxxxx> > --- > tests/capable_sys/test | 7 ++++--- > 1 file changed, 4 insertions(+), 3 deletions(-) > > diff --git a/tests/capable_sys/test b/tests/capable_sys/test > index cd50ebc..a72616d 100755 > --- a/tests/capable_sys/test > +++ b/tests/capable_sys/test > @@ -9,10 +9,11 @@ BEGIN { > $basedir = $0; > $basedir =~ s|(.*)/[^/]*|$1|; > > - $isnfs = `stat -f --print %T $basedir`; > + $fs = `stat -f --print %T $basedir`; > + $test_fibmap = $fs ne "btrfs" and $fs ne "nfs"; > > $test_count = 7; > - if ( $isnfs ne "nfs" ) { > + if ($test_fibmap) { > $test_count += 1; > } > > @@ -26,7 +27,7 @@ system "rm -f $basedir/temp_file 2>&1"; > # Tests for the good domain. > # > > -if ( $isnfs ne "nfs" ) { > +if ($test_fibmap) { > > # CAP_SYS_RAWIO > system "touch $basedir/temp_file 2>&1"; > -- > 2.31.1 > This patch is now merged with minor modification - the logical expression in tests/capable_sys had to be parenthesized because of Perl bogosity (https://www.perlmonks.org/?node_id=734436). https://github.com/SELinuxProject/selinux-testsuite/commit/4ed5d11312d673203d93dafbcdad441c3afc36f9 -- Ondrej Mosnacek Software Engineer, Linux Security - SELinux kernel Red Hat, Inc.