From: Daniel P. Berrange Date: Wed, 19 Dec 2012 10:05:17 +0000 (+0000) Subject: Fix SELinux security label test X-Git-Tag: v0.10.2.4~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=119c079c5b922eeef47316cb32db49287d98f876;p=thirdparty%2Flibvirt.git Fix SELinux security label test If securityselinuxtest was run on a system with newer SELinux policy it would fail, due to using svirt_tcg_t instead of svirt_t. Fixing the domain type to be KVM avoids this issue. (cherry picked from commit 32df483f1d5916f00e3ab15158f099234909e9c2) --- diff --git a/tests/securityselinuxtest.c b/tests/securityselinuxtest.c index 8bcf3a1ce8..0fa70ba9a9 100644 --- a/tests/securityselinuxtest.c +++ b/tests/securityselinuxtest.c @@ -77,6 +77,7 @@ testBuildDomainDef(bool dynamic, if (VIR_ALLOC(secdef) < 0) goto no_memory; + def->virtType = VIR_DOMAIN_VIRT_KVM; def->seclabels[0] = secdef; def->seclabels[0]->type = dynamic ? VIR_DOMAIN_SECLABEL_DYNAMIC : VIR_DOMAIN_SECLABEL_STATIC;