Re: [Xen-devel] [PATCH v6 07/20] osstest: introduce resource_shared_mark_ready
Roger Pau Monne writes ("[PATCH v6 07/20] osstest: introduce resource_shared_mark_ready"): > That allows marking a host as ready to be shared. Replace the current > caller that open-codes it. ... > -$mjobdb->jobdb_resource_shared_mark_ready > - ($ho->{Ident}, $ho->{Name}, "build-".$ho->{Suite}."-".$r{arch}); > + Well. On trying to build something on top of this, I notice that $ho->{Ident} is completely wrong here. That, ultimately, is going to be restype. But restype must be the fixed value `host'. > +sub resource_shared_mark_ready($$) { > +my ($ho,$resource) = @_; > + > +$mjobdb->jobdb_resource_shared_mark_ready($ho->{Ident}, $ho->{Name}, > + $resource); > +} And this function `resource_shared_mark_ready' only marks hosts ready - since it takea $ho. I propose to send you a followup patch which renames your new resource_shared_mark_ready to host_shared_mark_ready, and passes 'host' instead of $ho->{Ident}. Alternatively I can wait for you to do this, if that would be disruptive to you. Also `$resource' here is the wrong variable name. This is actually the $sharetype (as is evident from jobdb_resource_shared_mark_ready and what is now executive_resource_shared_mark_ready. That is a bug which is introduced in your patch. Would you like to respin this as you are about to rebase this onto what is about to become master, anyway ? Thanks, Ian. ___ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel
[Xen-devel] [PATCH v6 07/20] osstest: introduce resource_shared_mark_ready
That allows marking a host as ready to be shared. Replace the current caller that open-codes it. Signed-off-by: Roger Pau MonnéAcked-by: Ian Jackson --- Changes since v4: - New in this version. --- Osstest/TestSupport.pm | 9 - ts-xen-build-prep | 4 ++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm index 66790575..77585562 100644 --- a/Osstest/TestSupport.pm +++ b/Osstest/TestSupport.pm @@ -133,7 +133,7 @@ BEGIN { guest_editconfig_nocd host_install_postboot_complete target_core_dump_setup - sha256file + sha256file resource_shared_mark_ready ); %EXPORT_TAGS = ( ); @@ -2802,4 +2802,11 @@ sub sha256file ($;$) { return $truncate ? substr($digest, 0, $truncate) : $digest; } +sub resource_shared_mark_ready($$) { +my ($ho,$resource) = @_; + +$mjobdb->jobdb_resource_shared_mark_ready($ho->{Ident}, $ho->{Name}, + $resource); +} + 1; diff --git a/ts-xen-build-prep b/ts-xen-build-prep index 37736b7f..2e9ae6ff 100755 --- a/ts-xen-build-prep +++ b/ts-xen-build-prep @@ -273,5 +273,5 @@ if (!$ho->{Flags}{'no-reinstall'}) { ccache_setup(); gitcache_setup(); } -$mjobdb->jobdb_resource_shared_mark_ready - ($ho->{Ident}, $ho->{Name}, "build-".$ho->{Suite}."-".$r{arch}); + +resource_shared_mark_ready($ho, "build-".$ho->{Suite}."-".$r{arch}); -- 2.11.0 (Apple Git-81) ___ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel