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

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

 



On Mon, Nov 07, 2011 at 10:00:25AM +0000, Daniel P. Berrange wrote:
> On Sun, Nov 06, 2011 at 04:30:02PM +0100, Guido Günther wrote:
> > 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");
> 
> ACK
Pushed. Thanks.
 -- Guido

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]