diff mbox series

[2/7] support/testing: add an SELinuxSystemdSquashfs test

Message ID 20200928145425.2109095-3-antoine.tenart@bootlin.com
State Accepted
Headers show
Series SELinux tests | expand

Commit Message

Antoine Tenart Sept. 28, 2020, 2:54 p.m. UTC
Add a test called 'SELinuxSystemdSquashfs' which will perform the same
tests as the Ext4 version, but using a Squashfs filesystem. Thanks to
this, we'll have a test on a real only filesystem.

Signed-off-by: Antoine Tenart <antoine.tenart@bootlin.com>
---
 support/testing/tests/boot/test_selinux.py           | 12 ++++++++++++
 .../tests/boot/test_selinux/linux-squashfs.fragment  |  1 +
 2 files changed, 13 insertions(+)
 create mode 100644 support/testing/tests/boot/test_selinux/linux-squashfs.fragment
diff mbox series

Patch

diff --git a/support/testing/tests/boot/test_selinux.py b/support/testing/tests/boot/test_selinux.py
index b7e15655e7eb..d4e314a646ef 100644
--- a/support/testing/tests/boot/test_selinux.py
+++ b/support/testing/tests/boot/test_selinux.py
@@ -57,3 +57,15 @@  class TestSELinuxSystemdExt4(TestSELinuxSystemd):
 
     def test_run(self):
         self.run_tests("ext4")
+
+class TestSELinuxSystemdSquashfs(TestSELinuxSystemd):
+    config = TestSELinuxSystemd.config + \
+            """
+            BR2_TARGET_ROOTFS_SQUASHFS=y
+            BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="{}"
+            """.format(
+                infra.filepath("tests/boot/test_selinux/linux-squashfs.fragment"),
+            )
+
+    def test_run(self):
+        self.run_tests("squashfs")
diff --git a/support/testing/tests/boot/test_selinux/linux-squashfs.fragment b/support/testing/tests/boot/test_selinux/linux-squashfs.fragment
new file mode 100644
index 000000000000..7a89d006fa26
--- /dev/null
+++ b/support/testing/tests/boot/test_selinux/linux-squashfs.fragment
@@ -0,0 +1 @@ 
+CONFIG_SQUASHFS=y