[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[libvirt] [PATCH] libvirt-tck: Skip Test when no security model is in use



Hi,
if I'm reading this test correctly it's supposed to fail without a
security model at work.

The file images are always readable/writeable to the libvirt user and
group without one.

Cheers,
 -- Guido

---
 scripts/qemu/205-qcow2-double-backing-file.t |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/scripts/qemu/205-qcow2-double-backing-file.t b/scripts/qemu/205-qcow2-double-backing-file.t
index 7ae278d..d3a5e33 100644
--- a/scripts/qemu/205-qcow2-double-backing-file.t
+++ b/scripts/qemu/205-qcow2-double-backing-file.t
@@ -52,17 +52,22 @@ my $conn = eval { $tck->setup(); };
 BAIL_OUT "failed to setup test harness: $@" if $@;
 END { $tck->cleanup if $tck; }
 
+my $info;
+eval {
+    $info = $conn->get_node_security_model();
+};
+
 SKIP: {
     skip "Only relevant to QEMU driver", 26 unless $conn->get_type() eq "QEMU";
     skip "Only relevant when run as root", 26 unless $< == 0;
     skip "Only relevant for system driver", 26 unless
 	$conn->get_uri() =~ m/system/;
-
+    skip "Only relevant when using a security model", 26 unless
+	$info && $info->{model};
 
     my $xml = $tck->generic_pool("dir")
 	->mode("0755")->as_xml;
 
-
     diag "Defining transient storage pool $xml";
     my $pool;
     ok_pool(sub { $pool = $conn->define_storage_pool($xml) }, "define transient storage pool");
-- 
1.7.7


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]