diff mbox

[v5,07/17] osstest: introduce rename_shared_mark_ready

Message ID 20170708074712.44451-8-roger.pau@citrix.com (mailing list archive)
State New, archived
Headers show

Commit Message

Roger Pau Monné July 8, 2017, 7:47 a.m. UTC
That allows marking a host as ready to be shared. Replace the current
caller that open-codes it.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
---
Changes since v4:
 - New in this version.
---
 Osstest/TestSupport.pm | 9 ++++++++-
 ts-xen-build-prep      | 4 ++--
 2 files changed, 10 insertions(+), 3 deletions(-)

Comments

Ian Jackson July 19, 2017, 3:34 p.m. UTC | #1
Roger Pau Monne writes ("[PATCH v5 07/17] osstest: introduce rename_shared_mark_ready"):
> That allows marking a host as ready to be shared. Replace the current
> caller that open-codes it.

You got the Subject wrong.  "rename" for "resource".  :-)

With that fixed:

Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>

Thanks,
Ian.
diff mbox

Patch

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});