resource_shared_mark_ready: Fix for non-`host' idents; fix $sharetype
PATCH 1/2 resource_shared_mark_ready: Fix for non-`host' idents; fix $sharetype
$ho->{Ident} is completely wrong here. That, ultimately, is going to be restype. But restype must be the fixed value host'. If this function were called with a $ho whose Ident was src_host' or something, it would fail because hosts are all restype `host' in the datanase, of course.
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).
CC Roger Pau Monné <[email protected]>
Signed-off-by Ian Jackson <[email protected]>
--- Osstest/TestSupport.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
Osstest/TestSupport.pm +3 -3
@@ -2859,10 +2859,10 @@ sub sha256file ($;$) { } sub resource_shared_mark_ready($$) { - my ($ho,$resource) = @_; + my ($ho,$sharetype) = @_; - $mjobdb->jobdb_resource_shared_mark_ready($ho->{Ident}, $ho->{Name}, - $resource); + $mjobdb->jobdb_resource_shared_mark_ready('host', $ho->{Name}, + $sharetype); } 1;
Signature · 7 lines
2.1.4 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
PATCH 2/2 host_shared_mark_ready: rename from resource_shared_mark_ready
This function only works on resource of restype `host'. Ie, hosts.
Signed-off-by Ian Jackson <[email protected]>
CC Roger Pau Monné <[email protected]>
--- Osstest/TestSupport.pm | 4 ++-- ts-freebsd-host-install | 4 ++-- ts-xen-build-prep | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-)
Osstest/TestSupport.pm +2 -2
@@ -134,7 +134,7 @@ BEGIN { guest_editconfig_nocd host_install_postboot_complete target_core_dump_setup - sha256file resource_shared_mark_ready + sha256file host_shared_mark_ready ); %EXPORT_TAGS = ( );
@@ -2858,7 +2858,7 @@ sub sha256file ($;$) { return $truncate ? substr($digest, 0, $truncate) : $digest; } -sub resource_shared_mark_ready($$) { +sub host_shared_mark_ready($$) { my ($ho,$sharetype) = @_; $mjobdb->jobdb_resource_shared_mark_ready('host', $ho->{Name},
ts-freebsd-host-install +2 -2
@@ -279,5 +279,5 @@ setup_netboot_local($ho); # Proceed with the install install(); -resource_shared_mark_ready($ho, "build-freebsd-". - sha256file("$path_prefix/install.img", 16)); +host_shared_mark_ready($ho, "build-freebsd-". + sha256file("$path_prefix/install.img", 16));
ts-xen-build-prep +1 -1
@@ -274,4 +274,4 @@ if (!$ho->{Flags}{'no-reinstall'}) { gitcache_setup(); } -resource_shared_mark_ready($ho, "build-".$ho->{Suite}."-".$r{arch}); +host_shared_mark_ready($ho, "build-".$ho->{Suite}."-".$r{arch});
Signature · 7 lines
2.1.4 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel