Skip to contentSkip to conversation

Test f2fs SELinux support

PATCH Applied Stephen Smalley 2 participants 2 messages Apr 1 – Apr 2 SELinux security module

lore
Share & tools
lore

Stephen Smalley

author maintainer
#0 lore raw

PATCH 1/1 Test f2fs SELinux support

Add f2fs to the set of filesystem types being tested.

---
 README.md                      | 2 ++
 defconfig                      | 2 ++
 tests/Makefile                 | 2 +-
 tests/filesystem/Filesystem.pm | 3 +++
 tests/filesystem/f2fs          | 1 +
 tests/fs_filesystem/f2fs       | 1 +
 6 files changed, 10 insertions(+), 1 deletion(-)
 create mode 120000 tests/filesystem/f2fs
 create mode 120000 tests/fs_filesystem/f2fs
README.md +2 -0
index 0338964..5487085 100644
@@ -59,6 +59,7 @@ similar dependencies):
 * kernel-devel _(used by the kernel module tests)_
 * quota, xfsprogs-devel and libuuid-devel _(used by the filesystem tests)_
 * e2fsprogs _(used by the ext4 filesystem tests)_
+* f2fs-tools _(used by the f2fs filesystem tests)_
 * jfsutils _(used by the jfs filesystem tests)_
 * dosfstools _(used by the vfat filesystem tests)_
 * btrfs-progs _(used by the btrfs filesystem tests)_
@@ -89,6 +90,7 @@ following command (NOTE: On Fedora 32 and below you need to remove
 		xfsprogs-devel \
 		libuuid-devel \
 		e2fsprogs \
+		f2fs-tools \
 		jfsutils \
 		dosfstools \
 		btrfs-progs \
defconfig +2 -0
index 214eb26..3dcf710 100644
@@ -33,6 +33,8 @@ CONFIG_EXT4_FS_SECURITY=y
 CONFIG_JFS_SECURITY=y
 CONFIG_XFS_SECURITY=y
 CONFIG_JFFS2_FS_SECURITY=y
+CONFIG_F2FS_FS=m
+CONFIG_F2FS_FS_SECURITY=y
 
 # Network protocol implementations.
 # These are enabled to test the extended socket classes in
tests/Makefile +1 -1
index 07403be..4fe6f3c 100644
@@ -4,7 +4,7 @@ SBINDIR ?= $(PREFIX)/sbin
 POLDEV ?= $(PREFIX)/share/selinux/devel
 INCLUDEDIR ?= $(PREFIX)/include
 SELINUXFS ?= /sys/fs/selinux
-FILESYSTEMS ?= ext4 xfs jfs vfat btrfs
+FILESYSTEMS ?= ext4 xfs jfs vfat btrfs f2fs
 
 export CFLAGS+=-g -O0 -Wall -D_GNU_SOURCE
 
tests/filesystem/Filesystem.pm +3 -0
index ff9748e..9953923 100644
@@ -129,6 +129,9 @@ sub make_fs {
     elsif ( $mk_type eq "btrfs" ) {
         $mk_size = 128;
     }
+    elsif ( $mk_type eq "f2fs" ) {
+	$mk_size = 64;
+    }
 
     print "Create $mk_dir/fstest with dd\n";
     $result =
tests/filesystem/f2fs new file +1 -0
new file mode 120000
index 0000000..945c9b4
@@ -0,0 +1 @@
+.
\ No newline at end of file
tests/fs_filesystem/f2fs new file +1 -0
new file mode 120000
index 0000000..945c9b4
@@ -0,0 +1 @@
+.
\ No newline at end of file
Signature · 1 line
2.53.0
#1 lore raw
Quoted 4 lines · Stephen Smalley

Add f2fs to the set of filesystem types being tested.

Quoted 10 lines
---
 README.md                      | 2 ++
 defconfig                      | 2 ++
 tests/Makefile                 | 2 +-
 tests/filesystem/Filesystem.pm | 3 +++
 tests/filesystem/f2fs          | 1 +
 tests/fs_filesystem/f2fs       | 1 +
 6 files changed, 10 insertions(+), 1 deletion(-)
 create mode 120000 tests/filesystem/f2fs
 create mode 120000 tests/fs_filesystem/f2fs

Thanks, applied with minor corrections (tab vs. spaces & added the new dep to tmt/tests.fmf):
https://github.com/SELinuxProject/selinux-testsuite/commit/03577f572fea0def8f3b7ba86c88f3ed292a6c03

Signature · 3 lines
Ondrej Mosnacek
Senior Software Engineer, Linux Security - SELinux kernel
Red Hat, Inc.