summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2021-03-04 15:19:55 -0500
committerDaniel J Walsh <dwalsh@redhat.com>2021-03-04 17:01:04 -0500
commit793c52dd563a14d9636871bc8566f3b2191acf17 (patch)
tree434d8ff078b066cf5c4100f6b865be531eba898e /test
parent4e5cc6a3a61d9d2f1d3b97fc10684ec5617816ab (diff)
downloadpodman-793c52dd563a14d9636871bc8566f3b2191acf17.tar.gz
podman-793c52dd563a14d9636871bc8566f3b2191acf17.tar.bz2
podman-793c52dd563a14d9636871bc8566f3b2191acf17.zip
Add tests for selinux kvm/init labels
spc_t tests should be able to run rootless as well. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'test')
-rw-r--r--test/system/410-selinux.bats11
1 files changed, 6 insertions, 5 deletions
diff --git a/test/system/410-selinux.bats b/test/system/410-selinux.bats
index 215b2832e..49743ff33 100644
--- a/test/system/410-selinux.bats
+++ b/test/system/410-selinux.bats
@@ -77,13 +77,14 @@ function check_label() {
@test "podman selinux: inspect kvm labels" {
skip_if_no_selinux
skip_if_remote "runtime flag is not passed over remote"
- if [ ! -e /usr/bin/kata-runtime ]; then
- skip "kata-runtime not available"
- fi
- run_podman create --runtime=kata --name myc $IMAGE
+ tmpdir=$PODMAN_TMPDIR/kata-test
+ mkdir -p $tmpdir
+ KATA=${tmpdir}/kata-runtime
+ ln -s /bin/true ${KATA}
+ run_podman create --runtime=${KATA} --name myc $IMAGE
run_podman inspect --format='{{ .ProcessLabel }}' myc
- is "$output" ".*container_kvm_t.*"
+ is "$output" ".*container_kvm_t"
}
# pr #6752