All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/1] selinux-testsuite: Add btrfs support for filesystem tests
@ 2020-10-13 14:54 Richard Haines
  2020-10-13 14:54 ` [PATCH 1/1] " Richard Haines
  2020-10-30 21:55 ` [PATCH 0/1] " Ondrej Mosnacek
  0 siblings, 2 replies; 13+ messages in thread
From: Richard Haines @ 2020-10-13 14:54 UTC (permalink / raw)
  To: selinux; +Cc: Richard Haines

This patch allows BTRFS filesystems to be tested.

The tests/filesystem all pass using './test -f btrfs' on Fedora 32.
The tests/fs_filesystem fail 42 of 57 using './test -f btrfs' on Fedora 32.

As Fedora 33/Rawhide now defaults to using btrfs, running 'make test' will
fail 42 of 57 fs_filesystem tests (tested on Rawhide).

These fs_filesystem failures are caused by a bug when using the fsmount(2)
type calls that was reported in [1].

Note btrfs requires a much larger image size (min 115 MiB), and therefore
takes more than 2x longer to run tests than ext4.

[1] https://lore.kernel.org/selinux/c02674c970fa292610402aa866c4068772d9ad4e.camel@btinternet.com/

Richard Haines (1):
  selinux-testsuite: Add BTRFS support for filesystem tests

 tests/filesystem/Filesystem.pm | 10 +++++++++-
 tests/filesystem/test          |  6 ++++++
 tests/fs_filesystem/test       |  6 ++++++
 3 files changed, 21 insertions(+), 1 deletion(-)

-- 
2.26.2


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [PATCH 1/1] selinux-testsuite: Add btrfs support for filesystem tests
  2020-10-13 14:54 [PATCH 0/1] selinux-testsuite: Add btrfs support for filesystem tests Richard Haines
@ 2020-10-13 14:54 ` Richard Haines
  2020-10-30 21:55 ` [PATCH 0/1] " Ondrej Mosnacek
  1 sibling, 0 replies; 13+ messages in thread
From: Richard Haines @ 2020-10-13 14:54 UTC (permalink / raw)
  To: selinux; +Cc: Richard Haines

This allows btrfs filesystems to be created to support the
filesystem mount(2) type calls and the fs_filesystem fsmount(2)
type calls.

Signed-off-by: Richard Haines <richard_c_haines@btinternet.com>
---
 tests/filesystem/Filesystem.pm | 10 +++++++++-
 tests/filesystem/test          |  6 ++++++
 tests/fs_filesystem/test       |  6 ++++++
 3 files changed, 21 insertions(+), 1 deletion(-)

diff --git a/tests/filesystem/Filesystem.pm b/tests/filesystem/Filesystem.pm
index 2365ce8..3108eec 100644
--- a/tests/filesystem/Filesystem.pm
+++ b/tests/filesystem/Filesystem.pm
@@ -122,10 +122,18 @@ sub attach_dev {
 
 sub make_fs {
     my ( $mk_type, $mk_dev, $mk_dir ) = @_;
+
+    # BTRFS requires a larger minimum size that takes >2x longer to generate
+    if ( $mk_type eq "btrfs" ) {
+        $count = "28000";
+    }
+    else {
+        $count = "4096";
+    }
     print "Create $mk_dir/fstest with dd\n";
     $result =
       system(
-        "dd if=/dev/zero of=$mk_dir/fstest bs=4096 count=4096 2>/dev/null");
+        "dd if=/dev/zero of=$mk_dir/fstest bs=4096 count=$count 2>/dev/null");
     if ( $result != 0 ) {
         print "dd failed to create $mk_dir/fstest\n";
     }
diff --git a/tests/filesystem/test b/tests/filesystem/test
index 7d4654d..af59690 100755
--- a/tests/filesystem/test
+++ b/tests/filesystem/test
@@ -72,6 +72,12 @@ BEGIN {
         $test_count   = 55;
         $quota_checks = 0;
     }
+
+    # BTRFS uses internal quotas requiring no security hooks
+    elsif ( $fs_type eq "btrfs" ) {
+        $test_count   = 55;
+        $quota_checks = 0;
+    }
     else {
         $test_count = 69;
     }
diff --git a/tests/fs_filesystem/test b/tests/fs_filesystem/test
index 5dedf83..6bdcc50 100755
--- a/tests/fs_filesystem/test
+++ b/tests/fs_filesystem/test
@@ -75,6 +75,12 @@ BEGIN {
         $test_count   = 54;
         $quota_checks = 0;
     }
+
+    # BTRFS uses internal quotas requiring no security hooks
+    elsif ( $fs_type eq "btrfs" ) {
+        $test_count   = 54;
+        $quota_checks = 0;
+    }
     else {
         $test_count = 68;
     }
-- 
2.26.2


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* Re: [PATCH 0/1] selinux-testsuite: Add btrfs support for filesystem tests
  2020-10-13 14:54 [PATCH 0/1] selinux-testsuite: Add btrfs support for filesystem tests Richard Haines
  2020-10-13 14:54 ` [PATCH 1/1] " Richard Haines
@ 2020-10-30 21:55 ` Ondrej Mosnacek
  2020-10-30 23:44   ` Ondrej Mosnacek
  2020-11-02 19:20   ` Stephen Smalley
  1 sibling, 2 replies; 13+ messages in thread
From: Ondrej Mosnacek @ 2020-10-30 21:55 UTC (permalink / raw)
  To: Richard Haines; +Cc: SElinux list

On Tue, Oct 13, 2020 at 4:55 PM Richard Haines
<richard_c_haines@btinternet.com> wrote:
>
> This patch allows BTRFS filesystems to be tested.
>
> The tests/filesystem all pass using './test -f btrfs' on Fedora 32.

For me, also these tests are failing (41 of 58):

Test Summary Report
-------------------
filesystem/btrfs/test     (Wstat: 10496 Tests: 58 Failed: 41)
  Failed tests:  3-4, 10, 13-15, 17-25, 27-28, 30-37, 39-45
                47-55
  Non-zero exit status: 41
fs_filesystem/btrfs/test  (Wstat: 10752 Tests: 57 Failed: 42)
  Failed tests:  3, 9-10, 13-26, 28-36, 38-44, 46-54
  Non-zero exit status: 42

See full log here:
https://travis-ci.com/github/WOnder93/selinux-testsuite/jobs/422684295#L2711

(Don't be confused by the unusual test output - I'm experimenting with
running the tests for all filesystems in a single testsuite run.)

And on related note, the existing vfat tests are also failing:
Test Summary Report
-------------------
filesystem/vfat/test      (Wstat: 7936 Tests: 43 Failed: 31)
  Failed tests:  3-4, 6-7, 10-12, 14-19, 21-22, 24-36, 38-40
  Non-zero exit status: 31
fs_filesystem/vfat/test   (Wstat: 8192 Tests: 42 Failed: 32)
  Failed tests:  3, 5-7, 10-20, 22-35, 37-39
  Non-zero exit status: 32

Full log here: https://travis-ci.com/github/WOnder93/selinux-testsuite/jobs/422652226#L2703

> The tests/fs_filesystem fail 42 of 57 using './test -f btrfs' on Fedora 32.
>
> As Fedora 33/Rawhide now defaults to using btrfs, running 'make test' will
> fail 42 of 57 fs_filesystem tests (tested on Rawhide).
>
> These fs_filesystem failures are caused by a bug when using the fsmount(2)
> type calls that was reported in [1].

I'll try to dig into this a little bit. It seems that FS maintainers
are not interested :(

>
> Note btrfs requires a much larger image size (min 115 MiB), and therefore
> takes more than 2x longer to run tests than ext4.
>
> [1] https://lore.kernel.org/selinux/c02674c970fa292610402aa866c4068772d9ad4e.camel@btinternet.com/
>
> Richard Haines (1):
>   selinux-testsuite: Add BTRFS support for filesystem tests
>
>  tests/filesystem/Filesystem.pm | 10 +++++++++-
>  tests/filesystem/test          |  6 ++++++
>  tests/fs_filesystem/test       |  6 ++++++
>  3 files changed, 21 insertions(+), 1 deletion(-)
>
> --
> 2.26.2
>

--
Ondrej Mosnacek
Software Engineer, Platform Security - SELinux kernel
Red Hat, Inc.


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 0/1] selinux-testsuite: Add btrfs support for filesystem tests
  2020-10-30 21:55 ` [PATCH 0/1] " Ondrej Mosnacek
@ 2020-10-30 23:44   ` Ondrej Mosnacek
  2020-10-31  0:04     ` Ondrej Mosnacek
  2020-10-31  9:03     ` Ondrej Mosnacek
  2020-11-02 19:20   ` Stephen Smalley
  1 sibling, 2 replies; 13+ messages in thread
From: Ondrej Mosnacek @ 2020-10-30 23:44 UTC (permalink / raw)
  To: Richard Haines; +Cc: SElinux list

On Fri, Oct 30, 2020 at 10:55 PM Ondrej Mosnacek <omosnace@redhat.com> wrote:
> On Tue, Oct 13, 2020 at 4:55 PM Richard Haines
> <richard_c_haines@btinternet.com> wrote:
> >
> > This patch allows BTRFS filesystems to be tested.
> >
> > The tests/filesystem all pass using './test -f btrfs' on Fedora 32.
>
> For me, also these tests are failing (41 of 58):
>
> Test Summary Report
> -------------------
> filesystem/btrfs/test     (Wstat: 10496 Tests: 58 Failed: 41)
>   Failed tests:  3-4, 10, 13-15, 17-25, 27-28, 30-37, 39-45
>                 47-55
>   Non-zero exit status: 41

Oh, never mind... The reason why these were failing was that
btrfs-progs was not installed on the system. After installing that
package, only the fs_filesystem tests fail for btrfs.

Please add btrfs-progs as a dependency to README.md and
travis-ci/run-testsuite.sh in future versions of the patch.

> fs_filesystem/btrfs/test  (Wstat: 10752 Tests: 57 Failed: 42)
>   Failed tests:  3, 9-10, 13-26, 28-36, 38-44, 46-54
>   Non-zero exit status: 42
>
> See full log here:
> https://travis-ci.com/github/WOnder93/selinux-testsuite/jobs/422684295#L2711
>
> (Don't be confused by the unusual test output - I'm experimenting with
> running the tests for all filesystems in a single testsuite run.)
>
> And on related note, the existing vfat tests are also failing:
> Test Summary Report
> -------------------
> filesystem/vfat/test      (Wstat: 7936 Tests: 43 Failed: 31)
>   Failed tests:  3-4, 6-7, 10-12, 14-19, 21-22, 24-36, 38-40
>   Non-zero exit status: 31
> fs_filesystem/vfat/test   (Wstat: 8192 Tests: 42 Failed: 32)
>   Failed tests:  3, 5-7, 10-20, 22-35, 37-39
>   Non-zero exit status: 32

And this might be the same problem, but with dosfstools... I'll need to check.

>
> Full log here: https://travis-ci.com/github/WOnder93/selinux-testsuite/jobs/422652226#L2703
>
> > The tests/fs_filesystem fail 42 of 57 using './test -f btrfs' on Fedora 32.
> >
> > As Fedora 33/Rawhide now defaults to using btrfs, running 'make test' will
> > fail 42 of 57 fs_filesystem tests (tested on Rawhide).
> >
> > These fs_filesystem failures are caused by a bug when using the fsmount(2)
> > type calls that was reported in [1].
>
> I'll try to dig into this a little bit. It seems that FS maintainers
> are not interested :(
>
> >
> > Note btrfs requires a much larger image size (min 115 MiB), and therefore
> > takes more than 2x longer to run tests than ext4.
> >
> > [1] https://lore.kernel.org/selinux/c02674c970fa292610402aa866c4068772d9ad4e.camel@btinternet.com/
> >
> > Richard Haines (1):
> >   selinux-testsuite: Add BTRFS support for filesystem tests
> >
> >  tests/filesystem/Filesystem.pm | 10 +++++++++-
> >  tests/filesystem/test          |  6 ++++++
> >  tests/fs_filesystem/test       |  6 ++++++
> >  3 files changed, 21 insertions(+), 1 deletion(-)
> >
> > --
> > 2.26.2
> >
>
> --
> Ondrej Mosnacek
> Software Engineer, Platform Security - SELinux kernel
> Red Hat, Inc.



-- 
Ondrej Mosnacek
Software Engineer, Platform Security - SELinux kernel
Red Hat, Inc.


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 0/1] selinux-testsuite: Add btrfs support for filesystem tests
  2020-10-30 23:44   ` Ondrej Mosnacek
@ 2020-10-31  0:04     ` Ondrej Mosnacek
  2020-10-31 10:57       ` Richard Haines
  2020-10-31  9:03     ` Ondrej Mosnacek
  1 sibling, 1 reply; 13+ messages in thread
From: Ondrej Mosnacek @ 2020-10-31  0:04 UTC (permalink / raw)
  To: Richard Haines; +Cc: SElinux list

On Sat, Oct 31, 2020 at 12:44 AM Ondrej Mosnacek <omosnace@redhat.com> wrote:
> On Fri, Oct 30, 2020 at 10:55 PM Ondrej Mosnacek <omosnace@redhat.com> wrote:
> > And on related note, the existing vfat tests are also failing:
> > Test Summary Report
> > -------------------
> > filesystem/vfat/test      (Wstat: 7936 Tests: 43 Failed: 31)
> >   Failed tests:  3-4, 6-7, 10-12, 14-19, 21-22, 24-36, 38-40
> >   Non-zero exit status: 31
> > fs_filesystem/vfat/test   (Wstat: 8192 Tests: 42 Failed: 32)
> >   Failed tests:  3, 5-7, 10-20, 22-35, 37-39
> >   Non-zero exit status: 32
>
> And this might be the same problem, but with dosfstools... I'll need to check.

Yeah, that was it. With dosfstools installed the tests pass.

There are some fsetfilecon(3) errors visible in the test output, though:
https://travis-ci.com/github/WOnder93/selinux-testsuite/jobs/422914927#L2697

-- 
Ondrej Mosnacek
Software Engineer, Platform Security - SELinux kernel
Red Hat, Inc.


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 0/1] selinux-testsuite: Add btrfs support for filesystem tests
  2020-10-30 23:44   ` Ondrej Mosnacek
  2020-10-31  0:04     ` Ondrej Mosnacek
@ 2020-10-31  9:03     ` Ondrej Mosnacek
  2020-10-31 11:00       ` Richard Haines
  1 sibling, 1 reply; 13+ messages in thread
From: Ondrej Mosnacek @ 2020-10-31  9:03 UTC (permalink / raw)
  To: Richard Haines; +Cc: SElinux list

On Sat, Oct 31, 2020 at 12:44 AM Ondrej Mosnacek <omosnace@redhat.com> wrote:
> On Fri, Oct 30, 2020 at 10:55 PM Ondrej Mosnacek <omosnace@redhat.com> wrote:
> > On Tue, Oct 13, 2020 at 4:55 PM Richard Haines
> > <richard_c_haines@btinternet.com> wrote:
> > >
> > > This patch allows BTRFS filesystems to be tested.
> > >
> > > The tests/filesystem all pass using './test -f btrfs' on Fedora 32.
> >
> > For me, also these tests are failing (41 of 58):
> >
> > Test Summary Report
> > -------------------
> > filesystem/btrfs/test     (Wstat: 10496 Tests: 58 Failed: 41)
> >   Failed tests:  3-4, 10, 13-15, 17-25, 27-28, 30-37, 39-45
> >                 47-55
> >   Non-zero exit status: 41
>
> Oh, never mind... The reason why these were failing was that
> btrfs-progs was not installed on the system. After installing that
> package, only the fs_filesystem tests fail for btrfs.
>
> Please add btrfs-progs as a dependency to README.md and
> travis-ci/run-testsuite.sh in future versions of the patch.

...and please also don't forget to update defconfig :)

-- 
Ondrej Mosnacek
Software Engineer, Platform Security - SELinux kernel
Red Hat, Inc.


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 0/1] selinux-testsuite: Add btrfs support for filesystem tests
  2020-10-31  0:04     ` Ondrej Mosnacek
@ 2020-10-31 10:57       ` Richard Haines
  2020-10-31 11:05         ` Richard Haines
  2020-10-31 11:27         ` Ondrej Mosnacek
  0 siblings, 2 replies; 13+ messages in thread
From: Richard Haines @ 2020-10-31 10:57 UTC (permalink / raw)
  To: Ondrej Mosnacek; +Cc: SElinux list

On Sat, 2020-10-31 at 01:04 +0100, Ondrej Mosnacek wrote:
> On Sat, Oct 31, 2020 at 12:44 AM Ondrej Mosnacek <omosnace@redhat.com
> > wrote:
> > On Fri, Oct 30, 2020 at 10:55 PM Ondrej Mosnacek <
> > omosnace@redhat.com> wrote:
> > > And on related note, the existing vfat tests are also failing:
> > > Test Summary Report
> > > -------------------
> > > filesystem/vfat/test      (Wstat: 7936 Tests: 43 Failed: 31)
> > >   Failed tests:  3-4, 6-7, 10-12, 14-19, 21-22, 24-36, 38-40
> > >   Non-zero exit status: 31
> > > fs_filesystem/vfat/test   (Wstat: 8192 Tests: 42 Failed: 32)
> > >   Failed tests:  3, 5-7, 10-20, 22-35, 37-39
> > >   Non-zero exit status: 32
> > 
> > And this might be the same problem, but with dosfstools... I'll
> > need to check.
> 
> Yeah, that was it. With dosfstools installed the tests pass.
> 
> There are some fsetfilecon(3) errors visible in the test output,
> though:
> https://travis-ci.com/github/WOnder93/selinux-testsuite/jobs/422914927#L2697
> 

These tests pass as for vfat Operation not supported is correct. The
tests just need " 2>&1" added to stop output. I'll submit a patch, also
to add dosfstools (also to travis run-testsuite.sh).

I guess I also really need to add to defconfig:

CONFIG_VFAT_FS=m



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 0/1] selinux-testsuite: Add btrfs support for filesystem tests
  2020-10-31  9:03     ` Ondrej Mosnacek
@ 2020-10-31 11:00       ` Richard Haines
  0 siblings, 0 replies; 13+ messages in thread
From: Richard Haines @ 2020-10-31 11:00 UTC (permalink / raw)
  To: Ondrej Mosnacek; +Cc: SElinux list

On Sat, 2020-10-31 at 10:03 +0100, Ondrej Mosnacek wrote:
> On Sat, Oct 31, 2020 at 12:44 AM Ondrej Mosnacek <omosnace@redhat.com
> > wrote:
> > On Fri, Oct 30, 2020 at 10:55 PM Ondrej Mosnacek <
> > omosnace@redhat.com> wrote:
> > > On Tue, Oct 13, 2020 at 4:55 PM Richard Haines
> > > <richard_c_haines@btinternet.com> wrote:
> > > > This patch allows BTRFS filesystems to be tested.
> > > > 
> > > > The tests/filesystem all pass using './test -f btrfs' on Fedora
> > > > 32.
> > > 
> > > For me, also these tests are failing (41 of 58):
> > > 
> > > Test Summary Report
> > > -------------------
> > > filesystem/btrfs/test     (Wstat: 10496 Tests: 58 Failed: 41)
> > >   Failed tests:  3-4, 10, 13-15, 17-25, 27-28, 30-37, 39-45
> > >                 47-55
> > >   Non-zero exit status: 41
> > 
> > Oh, never mind... The reason why these were failing was that
> > btrfs-progs was not installed on the system. After installing that
> > package, only the fs_filesystem tests fail for btrfs.
> > 
> > Please add btrfs-progs as a dependency to README.md and
> > travis-ci/run-testsuite.sh in future versions of the patch.
> 
> ...and please also don't forget to update defconfig :)

I'll send updated patch soon.
> 


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 0/1] selinux-testsuite: Add btrfs support for filesystem tests
  2020-10-31 10:57       ` Richard Haines
@ 2020-10-31 11:05         ` Richard Haines
  2020-10-31 11:27         ` Ondrej Mosnacek
  1 sibling, 0 replies; 13+ messages in thread
From: Richard Haines @ 2020-10-31 11:05 UTC (permalink / raw)
  To: Ondrej Mosnacek; +Cc: SElinux list

On Sat, 2020-10-31 at 10:57 +0000, Richard Haines wrote:
> On Sat, 2020-10-31 at 01:04 +0100, Ondrej Mosnacek wrote:
> > On Sat, Oct 31, 2020 at 12:44 AM Ondrej Mosnacek <
> > omosnace@redhat.com
> > > wrote:
> > > On Fri, Oct 30, 2020 at 10:55 PM Ondrej Mosnacek <
> > > omosnace@redhat.com> wrote:
> > > > And on related note, the existing vfat tests are also failing:
> > > > Test Summary Report
> > > > -------------------
> > > > filesystem/vfat/test      (Wstat: 7936 Tests: 43 Failed: 31)
> > > >   Failed tests:  3-4, 6-7, 10-12, 14-19, 21-22, 24-36, 38-40
> > > >   Non-zero exit status: 31
> > > > fs_filesystem/vfat/test   (Wstat: 8192 Tests: 42 Failed: 32)
> > > >   Failed tests:  3, 5-7, 10-20, 22-35, 37-39
> > > >   Non-zero exit status: 32
> > > 
> > > And this might be the same problem, but with dosfstools... I'll
> > > need to check.
> > 
> > Yeah, that was it. With dosfstools installed the tests pass.
> > 
> > There are some fsetfilecon(3) errors visible in the test output,
> > though:
> > https://travis-ci.com/github/WOnder93/selinux-testsuite/jobs/422914927#L2697
> > 
> 
> These tests pass as for vfat Operation not supported is correct. The
> tests just need " 2>&1" added to stop output. I'll submit a patch,
> also
> to add dosfstools (also to travis run-testsuite.sh).
> 

No as already there:
> I guess I also really need to add to defconfig:
> 
> CONFIG_VFAT_FS=m
> 
> 


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 0/1] selinux-testsuite: Add btrfs support for filesystem tests
  2020-10-31 10:57       ` Richard Haines
  2020-10-31 11:05         ` Richard Haines
@ 2020-10-31 11:27         ` Ondrej Mosnacek
  2020-10-31 11:40           ` Richard Haines
  1 sibling, 1 reply; 13+ messages in thread
From: Ondrej Mosnacek @ 2020-10-31 11:27 UTC (permalink / raw)
  To: Richard Haines; +Cc: SElinux list

On Sat, Oct 31, 2020 at 11:58 AM Richard Haines
<richard_c_haines@btinternet.com> wrote:
> On Sat, 2020-10-31 at 01:04 +0100, Ondrej Mosnacek wrote:
> > On Sat, Oct 31, 2020 at 12:44 AM Ondrej Mosnacek <omosnace@redhat.com
> > > wrote:
> > > On Fri, Oct 30, 2020 at 10:55 PM Ondrej Mosnacek <
> > > omosnace@redhat.com> wrote:
> > > > And on related note, the existing vfat tests are also failing:
> > > > Test Summary Report
> > > > -------------------
> > > > filesystem/vfat/test      (Wstat: 7936 Tests: 43 Failed: 31)
> > > >   Failed tests:  3-4, 6-7, 10-12, 14-19, 21-22, 24-36, 38-40
> > > >   Non-zero exit status: 31
> > > > fs_filesystem/vfat/test   (Wstat: 8192 Tests: 42 Failed: 32)
> > > >   Failed tests:  3, 5-7, 10-20, 22-35, 37-39
> > > >   Non-zero exit status: 32
> > >
> > > And this might be the same problem, but with dosfstools... I'll
> > > need to check.
> >
> > Yeah, that was it. With dosfstools installed the tests pass.
> >
> > There are some fsetfilecon(3) errors visible in the test output,
> > though:
> > https://travis-ci.com/github/WOnder93/selinux-testsuite/jobs/422914927#L2697
> >
>
> These tests pass as for vfat Operation not supported is correct. The
> tests just need " 2>&1" added to stop output. I'll submit a patch, also
> to add dosfstools (also to travis run-testsuite.sh).

You can skip the dosfstools, I have a patch ready for that (it will
also add e2fsprogs and jfsutils, which are also missing). You might
also want to delay respinning the btrfs patch for after my "multi-fs
filesystem test" patches (it will need small tweaks to align with
that). Stay tuned, I should have the patches ready by today :)

-- 
Ondrej Mosnacek
Software Engineer, Platform Security - SELinux kernel
Red Hat, Inc.


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 0/1] selinux-testsuite: Add btrfs support for filesystem tests
  2020-10-31 11:27         ` Ondrej Mosnacek
@ 2020-10-31 11:40           ` Richard Haines
  0 siblings, 0 replies; 13+ messages in thread
From: Richard Haines @ 2020-10-31 11:40 UTC (permalink / raw)
  To: Ondrej Mosnacek; +Cc: SElinux list

On Sat, 2020-10-31 at 12:27 +0100, Ondrej Mosnacek wrote:
> On Sat, Oct 31, 2020 at 11:58 AM Richard Haines
> <richard_c_haines@btinternet.com> wrote:
> > On Sat, 2020-10-31 at 01:04 +0100, Ondrej Mosnacek wrote:
> > > On Sat, Oct 31, 2020 at 12:44 AM Ondrej Mosnacek <
> > > omosnace@redhat.com
> > > > wrote:
> > > > On Fri, Oct 30, 2020 at 10:55 PM Ondrej Mosnacek <
> > > > omosnace@redhat.com> wrote:
> > > > > And on related note, the existing vfat tests are also
> > > > > failing:
> > > > > Test Summary Report
> > > > > -------------------
> > > > > filesystem/vfat/test      (Wstat: 7936 Tests: 43 Failed: 31)
> > > > >   Failed tests:  3-4, 6-7, 10-12, 14-19, 21-22, 24-36, 38-40
> > > > >   Non-zero exit status: 31
> > > > > fs_filesystem/vfat/test   (Wstat: 8192 Tests: 42 Failed: 32)
> > > > >   Failed tests:  3, 5-7, 10-20, 22-35, 37-39
> > > > >   Non-zero exit status: 32
> > > > 
> > > > And this might be the same problem, but with dosfstools... I'll
> > > > need to check.
> > > 
> > > Yeah, that was it. With dosfstools installed the tests pass.
> > > 
> > > There are some fsetfilecon(3) errors visible in the test output,
> > > though:
> > > https://travis-ci.com/github/WOnder93/selinux-testsuite/jobs/422914927#L2697
> > > 
> > 
> > These tests pass as for vfat Operation not supported is correct.
> > The
> > tests just need " 2>&1" added to stop output. I'll submit a patch,
> > also
> > to add dosfstools (also to travis run-testsuite.sh).
> 
> You can skip the dosfstools, I have a patch ready for that (it will
> also add e2fsprogs and jfsutils, which are also missing). You might
> also want to delay respinning the btrfs patch for after my "multi-fs
> filesystem test" patches (it will need small tweaks to align with
> that). Stay tuned, I should have the patches ready by today :)
> 

Thanks for the update - I'll wait for your patches.



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 0/1] selinux-testsuite: Add btrfs support for filesystem tests
  2020-10-30 21:55 ` [PATCH 0/1] " Ondrej Mosnacek
  2020-10-30 23:44   ` Ondrej Mosnacek
@ 2020-11-02 19:20   ` Stephen Smalley
  2020-11-02 19:52     ` Ondrej Mosnacek
  1 sibling, 1 reply; 13+ messages in thread
From: Stephen Smalley @ 2020-11-02 19:20 UTC (permalink / raw)
  To: Ondrej Mosnacek; +Cc: Richard Haines, SElinux list

On Fri, Oct 30, 2020 at 5:56 PM Ondrej Mosnacek <omosnace@redhat.com> wrote:
>
> On Tue, Oct 13, 2020 at 4:55 PM Richard Haines
> <richard_c_haines@btinternet.com> wrote:
> > These fs_filesystem failures are caused by a bug when using the fsmount(2)
> > type calls that was reported in [1].
>
> I'll try to dig into this a little bit. It seems that FS maintainers
> are not interested :(

For further context and the corresponding fix for nfs, see
https://github.com/SELinuxProject/selinux-kernel/issues/49.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH 0/1] selinux-testsuite: Add btrfs support for filesystem tests
  2020-11-02 19:20   ` Stephen Smalley
@ 2020-11-02 19:52     ` Ondrej Mosnacek
  0 siblings, 0 replies; 13+ messages in thread
From: Ondrej Mosnacek @ 2020-11-02 19:52 UTC (permalink / raw)
  To: Stephen Smalley; +Cc: Richard Haines, SElinux list

On Mon, Nov 2, 2020 at 8:20 PM Stephen Smalley
<stephen.smalley.work@gmail.com> wrote:
> On Fri, Oct 30, 2020 at 5:56 PM Ondrej Mosnacek <omosnace@redhat.com> wrote:
> >
> > On Tue, Oct 13, 2020 at 4:55 PM Richard Haines
> > <richard_c_haines@btinternet.com> wrote:
> > > These fs_filesystem failures are caused by a bug when using the fsmount(2)
> > > type calls that was reported in [1].
> >
> > I'll try to dig into this a little bit. It seems that FS maintainers
> > are not interested :(
>
> For further context and the corresponding fix for nfs, see
> https://github.com/SELinuxProject/selinux-kernel/issues/49.

Hm... I was running the reproducer a few days ago on a kernel that
should have that fix (I think), and yet I'd swear I was still able to
reproduce the bug... It's possible I made a mistake somewhere, but it
might be that it's still not actually fixed (or reappeared again).
I'll continue investigating it hopefully sometime this week.

I also dug into the btrfs bug and it seems to have a slightly
different (albeit similar) cause. I think I have a possible fix, but I
haven't yet had time to fully finalize it and test it. I'll report
back once I have something final.

-- 
Ondrej Mosnacek
Software Engineer, Platform Security - SELinux kernel
Red Hat, Inc.


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2020-11-02 19:52 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-13 14:54 [PATCH 0/1] selinux-testsuite: Add btrfs support for filesystem tests Richard Haines
2020-10-13 14:54 ` [PATCH 1/1] " Richard Haines
2020-10-30 21:55 ` [PATCH 0/1] " Ondrej Mosnacek
2020-10-30 23:44   ` Ondrej Mosnacek
2020-10-31  0:04     ` Ondrej Mosnacek
2020-10-31 10:57       ` Richard Haines
2020-10-31 11:05         ` Richard Haines
2020-10-31 11:27         ` Ondrej Mosnacek
2020-10-31 11:40           ` Richard Haines
2020-10-31  9:03     ` Ondrej Mosnacek
2020-10-31 11:00       ` Richard Haines
2020-11-02 19:20   ` Stephen Smalley
2020-11-02 19:52     ` Ondrej Mosnacek

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.