From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [PATCH OSSTEST v2 09/18] Toolstack: Refactor consolecmd handling Date: Thu, 22 Jan 2015 11:24:15 +0000 Message-ID: <1421925855.23842.18.camel@citrix.com> References: <1417536141.29004.6.camel@citrix.com> <1417536299-1810-9-git-send-email-ian.campbell@citrix.com> <21694.40879.539769.975915@mariner.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <21694.40879.539769.975915@mariner.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Jackson Cc: Jim Fehlig , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On Tue, 2015-01-20 at 18:34 +0000, Ian Jackson wrote: > Ian Campbell writes ("[PATCH OSSTEST v2 09/18] Toolstack: Refactor consolecmd handling"): > ... > > diff --git a/Osstest/Toolstack/xend.pm b/Osstest/Toolstack/xend.pm > > index c921c20..896d949 100644 > > --- a/Osstest/Toolstack/xend.pm > > +++ b/Osstest/Toolstack/xend.pm > > @@ -36,5 +36,6 @@ sub new { > > # Defer to xl driver for most things > > sub destroy { return &Osstest::Toolstack::xl::destroy; } > > sub create { return &Osstest::Toolstack::xl::create; } > > +sub consolecmd { return &Osstest::Toolstack::xl::consolecmd; } > > I hesitate to suggest this, but perhaps Exporter(3pm)'s inheritance > feature (@ISA, I think) might do this more automatically ? Perhaps, I can't seem to find Exporter(3pm) any where either in Debian or online. Lots of Exporter::Lite, ::Simple, ::Heavy type stuff though... > > diff --git a/ts-logs-capture b/ts-logs-capture > > index 841ad5a..dbca13a 100755 > > --- a/ts-logs-capture > > +++ b/ts-logs-capture > > @@ -195,7 +195,7 @@ sub fetch_logs_guest ($) { > > logm("cannot find domid: $@"); > > return; > > } > > - my $consolecmd= toolstack($ho)->{Command}." console $gho->{Name}"; > > + my $consolecmd= toolstack($ho)->consolecmd($gho); > > try_cmd_output_save("sleep 1 | $consolecmd | cat", > > "guest-$gho->{Name}-console"); > > Does `virsh console' work the same way as xl console, particularly wrt > this weird thing with the sleep 1 etc. ? TBH I'm not sure. What is the reason for that weirdness? Ultimately libvirt/virsh opens the pty directly as opposed to via the xenconsole binary, AFAICT. Ian.