Skip to contentSkip to conversation

support/testing: add test for file capabilities

Buildroot Peter Korsgaard 1 participant 1 message Aug 10, 2018

lore
Share & tools
lore
#0 lore raw

commit: https://git.buildroot.net/buildroot/commit/?id=510f2c91d9b1953b24c56a28f2ff0604065487c6
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/2018.02.x

(cherry picked from commit 5f201de0dca4f7ed9bd2be9d836fbb7955f5b572)
---
 .gitlab-ci.yml                                     |  1 +
 support/testing/tests/core/device_table2.txt       |  7 ++++
 .../tests/core/squashfs-xattr-kernel.config        |  1 +
 .../testing/tests/core/test_file_capabilities.py   | 47 ++++++++++++++++++++++
 4 files changed, 56 insertions(+)
.gitlab-ci.yml +1 -0
index 59ce6ae59e..271b938842 100644
@@ -237,6 +237,7 @@ zynq_zybo_defconfig: *defconfig
 tests.boot.test_atf.TestATFAllwinner: *runtime_test
 tests.boot.test_atf.TestATFMarvell: *runtime_test
 tests.boot.test_atf.TestATFVexpress: *runtime_test
+tests.core.test_file_capabilities.TestFileCapabilities: *runtime_test
 tests.core.test_post_scripts.TestPostScripts: *runtime_test
 tests.core.test_rootfs_overlay.TestRootfsOverlay: *runtime_test
 tests.core.test_timezone.TestGlibcAllTimezone: *runtime_test
support/testing/tests/core/device_table2.txt new file +7 -0
new file mode 100644
index 0000000000..f8323217f3
@@ -0,0 +1,7 @@
+# <name>				<type>	<mode>	<uid>	<gid>	<major>	<minor>	<start>	<inc>	<count>
+/usr/sbin/getcap                        f       755     0       0	-	-	-	-	-
+|xattr cap_sys_nice+eip
+# leading spaces are ignored for xattr
+  |xattr cap_kill+eip
+# leading tabs are ignored for xattr
+	|xattr cap_sys_time+eip
support/testing/tests/core/squashfs-xattr-kernel.config new file +1 -0
new file mode 100644
index 0000000000..81b21b94c5
@@ -0,0 +1 @@
+CONFIG_SQUASHFS_XATTR=y
support/testing/tests/core/test_file_capabilities.py new file +47 -0

47 lines not on this page · raw message