test: add selinux stage test

Add a simple check for the selinux check by building the f32-base
image with an added selinux stage. Use the options from a test
json file and verify the labels against a set of labels given in
the aforementioned test file.
This commit is contained in:
Christian Kellner 2020-06-13 19:38:18 +02:00
parent 0cf581a9a4
commit 15986d9297
2 changed files with 46 additions and 0 deletions

View file

@ -0,0 +1,15 @@
{
"options": {
"file_contexts": "etc/selinux/targeted/contexts/files/file_contexts"
},
"labels": {
"/bin": "system_u:object_r:bin_t:s0",
"/boot": "system_u:object_r:boot_t:s0",
"/dev": "system_u:object_r:device_t:s0",
"/etc": "system_u:object_r:etc_t:s0",
"/home": "system_u:object_r:home_root_t:s0",
"/lib": "system_u:object_r:lib_t:s0",
"/usr": "system_u:object_r:usr_t:s0",
"/usr/bin/cp": "system_u:object_r:bin_t:s0"
}
}