selinux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH 0/1] selinux-testsuite: Use native filesystem for fs tests
@ 2020-02-13 16:30 Richard Haines
  2020-02-13 20:55 ` Stephen Smalley
  0 siblings, 1 reply; 4+ messages in thread
From: Richard Haines @ 2020-02-13 16:30 UTC (permalink / raw)
  To: selinux; +Cc: Richard Haines

This is a first attempt at running the filesystem and fs_filesystem tests
on the native filesystem.

It supports NFS when using the tools/nfs.sh script. NFS will support options
with rootcontext and fscontext, however due to the fsconfig(2) they bug will
not pass with these (see note in nfs.sh).

The filesystem types supported are: ext2, ext3, ext4, xfs, btrfs, hfsplus,
reiserfs, nfs4. If not in this list, tests are skipped. I'm not sure what
others need supporting, these seem reasonable and available on Fedora.

I've had to add a number of policy rules to support these types, however
I've made no attempt to consolidate them. Most are for supporting rootcontext
and fscontext on NFS. Rules for the 'context' option were many more so
decided not to add them - any views on this.

When testing btrfs, most tests will fail on tests/fs_filesystem due to
the fsconfig(2) bug.

I've had to finally disable udisk2(8) as it interferes with the tests. It
can be enabled locally with the -e flag. I'm sure there is a bug somewhere.

In the filesystem/test I've comments regarding quotas, as some fs require
different utilities to set them up. I've not tried these - any views.

This does need more testing, particularly on a 'real' NFS mounted system (not
tested). All feedback welcome.

Richard Haines (1):
  selinux-testsuite: Use native filesystem for fs tests

 policy/test_filesystem.te        | 122 ++++++-
 policy/test_filesystem_notify.te |  50 ++-
 tests/filesystem/Filesystem.pm   |  19 +-
 tests/filesystem/test            | 399 ++++++++++++---------
 tests/filesystem/test-nfs.pl     | 526 ++++++++++++++++++++++++++++
 tests/fs_filesystem/test         | 405 +++++++++++++---------
 tests/fs_filesystem/test-nfs.pl  | 576 +++++++++++++++++++++++++++++++
 tools/nfs.sh                     |  16 +
 8 files changed, 1795 insertions(+), 318 deletions(-)
 create mode 100755 tests/filesystem/test-nfs.pl
 create mode 100755 tests/fs_filesystem/test-nfs.pl

-- 
2.24.1


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

end of thread, other threads:[~2020-02-13 22:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-13 16:30 [RFC PATCH 0/1] selinux-testsuite: Use native filesystem for fs tests Richard Haines
2020-02-13 20:55 ` Stephen Smalley
2020-02-13 21:00   ` Stephen Smalley
2020-02-13 22:28     ` Paul Moore

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).