Re: [tck PATCH 2/3] hooks: Refresh the service status after performing an action

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

 



On Tue, Nov 12, 2019 at 03:44:07PM +0000, Daniel P. Berrangé wrote:
> On Tue, Nov 12, 2019 at 04:10:19PM +0100, Erik Skultety wrote:
> > Presumably, the original intent of the code was to query the status of
> > the service to refresh the internal state variable, but the intended
> > method was never called because of a typo.
> > ---
> >  lib/Sys/Virt/TCK/Hooks.pm | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/lib/Sys/Virt/TCK/Hooks.pm b/lib/Sys/Virt/TCK/Hooks.pm
> > index ef3403d..a3615e4 100644
> > --- a/lib/Sys/Virt/TCK/Hooks.pm
> > +++ b/lib/Sys/Virt/TCK/Hooks.pm
> > @@ -263,7 +263,7 @@ sub service_libvirtd {
> >
> >      die "failed on $action daemon" if system $cmd;
> >
> > -    $self->libvirtd_status;
> > +    $self->libvirtd_status();
>
> There's no need for () when invoking a method if it doesn't need any
> parameters. Actually even if it does need parameters there's some
> silly ways you can invoke it without round brackets. Welcome to the
> wonderful world of perl :-)

/o\

Anyhow, I had a bunch of other changes in place and this confused me into
thinking that without this patch, the other changes didn't work. Re-running
without this patch still works as expected.
Thanks for the comments, I'll drop this patch.

Erik

--
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]

  Powered by Linux