support/testing/tests/init/test_systemd_selinux: new SELinuxSystemdSquashfs test
authorAntoine Tenart <antoine.tenart@bootlin.com>
Mon, 28 Sep 2020 14:54:20 +0000 (16:54 +0200)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Tue, 6 Oct 2020 13:30:12 +0000 (15:30 +0200)
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>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
DEVELOPERS
support/testing/tests/init/test_systemd_selinux.py
support/testing/tests/init/test_systemd_selinux/linux-squashfs.fragment [new file with mode: 0644]

index f147088996d0d85387d800989dc1523e649be413..3aed57dbc5dc1c03c7156643cc261ccd546b12eb 100644 (file)
@@ -255,6 +255,7 @@ F:  package/gnuplot/
 
 N:     Antoine Ténart <antoine.tenart@bootlin.com>
 F:     package/wf111/
+F:     support/testing/tests/init/test_systemd_selinux/
 F:     support/testing/tests/init/test_systemd_selinux.py
 
 N:     Antony Pavlov <antonynpavlov@gmail.com>
index 527dbf10ac698d1e97d9f3276c1b006dbb3c6875..9a98a328215993095a5036197d1d9a636669b9f7 100644 (file)
@@ -60,3 +60,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/init/test_systemd_selinux/linux-squashfs.fragment"),
+        )
+
+    def test_run(self):
+        self.run_tests("squashfs")
diff --git a/support/testing/tests/init/test_systemd_selinux/linux-squashfs.fragment b/support/testing/tests/init/test_systemd_selinux/linux-squashfs.fragment
new file mode 100644 (file)
index 0000000..7a89d00
--- /dev/null
@@ -0,0 +1 @@
+CONFIG_SQUASHFS=y