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

Re: [Xen-devel] [PATCH v4 10/16] osstest: add support for runtime_IDENT_hostflags



Roger Pau Monne writes ("Re: [PATCH v4 10/16] osstest: add support for 
runtime_IDENT_hostflags"):
> On Thu, Jul 06, 2017 at 04:28:09PM +0100, Ian Jackson wrote:
> > I like the implied interface better than the one which implicitly
> > overwrites all previous runtime hostflags.
> 
> Right.
> 
> > Should set_runtime_hostflag take a $ho, instead ?  Can you ever see us
> > using it without a $ho ?  If not then it probably should.
> 
> I'm sorry but I don't follow. I'm not sure how I'm supposed to use the
> $ho parameter, neither get_hostflags or store_runvar take such a
> parameter. From the text above I thought that you wanted something
> like:

You can get $ident from $ho->{Ident}.

> sub set_runtime_hostflag ($$) {
>     my ($ident,$value) = @_;
> 
>     $value .= ','.get_runvar_default("runtime_${ident}_hostflags", $job, '');
>     store_runvar("runtime_${ident}_hostflags", $value);
> }
> 
> But I'm not sure.

Yes, something like that, only taking $ho rather than $ident.

Also your proposed computation is slightly wrong in that it will
produce   ,FLAG

I would use split and join.

Ian.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.