public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [tests/selinux] pr775-checkpolicy-revdeps: kernel/genfs_fallback: use vfat instead of ramfs
@ 2026-09-11 13:20 Ondrej Mosnacek
  0 siblings, 0 replies; only message in thread
From: Ondrej Mosnacek @ 2026-09-11 13:20 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : tests/selinux
            Branch : pr775-checkpolicy-revdeps
            Commit : 25176f01cef9b5a45eda85edf41178075826c6b6
            Author : Ondrej Mosnacek <omosnace@redhat.com>
            Date   : 2022-09-13T11:06:41+02:00
            Stats  : +18/-9 in 2 file(s)
            URL    : https://src.fedoraproject.org/tests/selinux/c/25176f01cef9b5a45eda85edf41178075826c6b6?branch=pr775-checkpolicy-revdeps

            Log:
            kernel/genfs_fallback: use vfat instead of ramfs

ramfs is now treated as an xattr-supporting filesystem and has the
fs_use_trans directive in the base policy. Thus switch to vfat, which is
still genfs.

Signed-off-by: Ondrej Mosnacek <omosnace@redhat.com>

---
diff --git a/kernel/genfs_fallback/main.fmf b/kernel/genfs_fallback/main.fmf
index 5b42e80..36161e9 100644
--- a/kernel/genfs_fallback/main.fmf
+++ b/kernel/genfs_fallback/main.fmf
@@ -12,6 +12,7 @@ component:
 framework: beakerlib
 require:
 - policycoreutils
+- dosfstools
 duration: 5m
 tier: 2
 enabled: true

diff --git a/kernel/genfs_fallback/runtest.sh b/kernel/genfs_fallback/runtest.sh
index 63d8e1e..3b9372a 100755
--- a/kernel/genfs_fallback/runtest.sh
+++ b/kernel/genfs_fallback/runtest.sh
@@ -11,21 +11,29 @@ rlJournalStart
     rlPhaseStartSetup
         rlRun "uname -r"
 
-        rlRun "echo '(fsuse xattr ramfs (system_u object_r fs_t ((s0) (s0))))' >ramfs_xattr.cil"
-        rlRun "semodule -i ramfs_xattr.cil"
-        rlRun "mkdir /mnt/test-ramfs"
+        rlRun "dd if=/dev/zero of=diskfile bs=4M count=1"
+        rlRun "mkfs.vfat diskfile"
+        DEVICE="$(losetup -f)"
+        rlRun "losetup $DEVICE diskfile"
+
+        rlRun "echo '(fsuse xattr vfat (system_u object_r fs_t ((s0) (s0))))' >vfat_xattr.cil"
+        rlRun "semodule -i vfat_xattr.cil"
+        rlRun "mkdir /mnt/test-vfat"
     rlPhaseEnd
 
     rlPhaseStartTest
-        rlRun "mount -t ramfs none /mnt/test-ramfs"
-        rlRun "[ \"\$(secon -t -f /mnt/test-ramfs)\" = ramfs_t ]"
+        rlRun "mount -t vfat $DEVICE /mnt/test-vfat"
+        rlRun "[ \"\$(secon -t -f /mnt/test-vfat)\" = dosfs_t ]"
     rlPhaseEnd
 
     rlPhaseStartCleanup
-        rlRun "umount /mnt/test-ramfs" 0-1
-        rlRun "rmdir /mnt/test-ramfs"
-        rlRun "semodule -r ramfs_xattr"
-        rlRun "rm -f ramfs_xattr.cil"
+        rlRun "umount /mnt/test-vfat" 0-1
+        rlRun "rmdir /mnt/test-vfat"
+        rlRun "semodule -r vfat_xattr" 0-1
+        rlRun "rm -f vfat_xattr.cil"
+
+        rlRun "losetup -d $DEVICE" 0-1
+        rlRun "rm -f diskfile"
     rlPhaseEnd
 rlJournalPrintText
 rlJournalEnd

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-09-11 13:20 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-11 13:20 [tests/selinux] pr775-checkpolicy-revdeps: kernel/genfs_fallback: use vfat instead of ramfs Ondrej Mosnacek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox