From: Ian Campbell <ian.campbell@citrix.com>
To: Ian Jackson <Ian.Jackson@eu.citrix.com>
Cc: xen-devel@lists.xen.org
Subject: Re: [PATCH v3] Set {ident}_suite runvar when install a Debian guest.
Date: Tue, 24 Nov 2015 12:41:36 +0000 [thread overview]
Message-ID: <1448368896.4973.81.camel@citrix.com> (raw)
In-Reply-To: <22100.18250.523177.171252@mariner.uk.xensource.com>
On Tue, 2015-11-24 at 11:17 +0000, Ian Jackson wrote:
> Ian Campbell writes ("[PATCH v3] Set {ident}_suite runvar when install a
> Debian guest."):
> > Currently those places which want this open code a lookup of the
> > {ident}_suite runvar with a fallback to the configuration file.
> >
> > However selecthost was missing such a lookup in the case where it is
> > constructing a nested L1 host (which begins from the selectguest
> > template), which lead to ts-xen-install on Jessie missing the
> > installation of libnl-route-3-200.
> >
> > Fix this by providing debian_guest_suite($gho) which as well as
> > initialising $gho->{Suite} stores an {ident}_suite runvar (taking care
> > to handle the case where one is already set by e.g. make-flight). For
> > convenience debian_guest_suite() also returns the suite name.
> >
> > ts-debian-install, ts-debian-di-install and ts-debian-hvm-install now
> > use debian_guest_suite instead of open coding the lookup.
> >
> > The final piece of the puzzle is to have selectguest() pickup the
> > {ident}_suite runvar (if it is set) and initialise $gho->{Suite} from
> > it.
>
> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
>
> > Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
> > ---
> > I've kicked off an adhoc run testing:
> > + test-amd64-amd64-qemuu-nested);; # nested
> > + test-amd64-amd64-xl-qemuu-debianhvm-amd64);; # regular HVM
> > + test-amd64-amd64-xl-qcow2);; # DI install
> > + test-amd64-amd64-xl);; # Normal PV
FYI this last one failed, I'll investigate and no doubt there will be a v4.
I'll fix the style stuff as I go.
> > with this change.
>
> This looks like you wrote a case statement in sh. Did you know about
> OSSTEST_JOBS_ONLY (see cs-job-create) ?
Indeed, I hacked it into make-flights filter hooks. I'll investigate
OSSTEST_JOBS_ONLY for next time.
> FFR, I have some style tips:
>
> > +sub debian_guest_suite ($) {
> > + my ($gho) = @_;
> > +
> > + return $gho->{Suite} if $gho->{Suite};
> > +
> > + $gho->{Suite} = guest_var($gho,'suite',undef);
>
> If you do this instead
>
> + $gho->{Suite} //= guest_var($gho,'suite',undef);
>
> the previous line (`return ... if') is not needed.
Done. (I suppose this will elide the call to guest_var if ->{Suite} is
already defined, like an || would).
> > + if ( ! $gho->{Suite} ) {
>
> This is stylistically odd IMO. Seems to have been written by a
> hypervisor maintainer :-).
I think you are referring to the too many spaces and would normally do
if (!$gho->{Suite}) {
or was there something else?
Ian.
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
next prev parent reply other threads:[~2015-11-24 12:41 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <osstest-65001-mainreport@xen.org>
2015-11-23 10:40 ` [osstest test] 65001: regressions - trouble: broken/fail/pass Ian Campbell
2015-11-23 11:59 ` [PATCH OSSTEST] selecthost: Correctly set ->{Suite} for a nested host in selecthost() Ian Campbell
2015-11-23 12:35 ` [PATCH OSSTEST v2] Add $gho->{Suite} field to guest objects from {prepare, select}guest() Ian Campbell
2015-11-23 16:12 ` Ian Jackson
2015-11-23 16:19 ` Ian Campbell
2015-11-23 16:48 ` Ian Jackson
2015-11-23 16:57 ` Ian Campbell
2015-11-24 9:25 ` [PATCH v3] Set {ident}_suite runvar when install a Debian guest Ian Campbell
2015-11-24 11:17 ` Ian Jackson
2015-11-24 12:41 ` Ian Campbell [this message]
2015-11-24 13:40 ` Ian Campbell
2015-11-24 14:17 ` Ian Jackson
2015-11-24 15:14 ` [PATCH OSSTEST v4] " Ian Campbell
2015-11-24 15:26 ` Ian Campbell
2015-11-24 15:28 ` Ian Campbell
2015-11-24 15:36 ` Ian Campbell
2015-11-24 16:12 ` Ian Jackson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1448368896.4973.81.camel@citrix.com \
--to=ian.campbell@citrix.com \
--cc=Ian.Jackson@eu.citrix.com \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.