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

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



This is required for FreeBSD, that will need to set some of the
hostflags at runtime. The current IDENT_hostflags will be keep as-is,
and they should only be set at job creation time.

Also introduce a helper to set the runtime hostflags.

Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
---
Changes since v3:
 - New in this version
---
 Osstest/TestSupport.pm | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm
index 94ace09c..1c5455ee 100644
--- a/Osstest/TestSupport.pm
+++ b/Osstest/TestSupport.pm
@@ -79,7 +79,7 @@ BEGIN {
 
                       selecthost get_hostflags get_host_property
                       get_target_property get_host_native_linux_console
-                      hostnamepath hostnamepath_list
+                      hostnamepath hostnamepath_list set_runtime_hostflag
                       power_state power_cycle power_cycle_sleep
                       serial_fetch_logs
                       propname_massage propname_check
@@ -1587,10 +1587,17 @@ sub get_hostflags ($) {
     my ($ident) = @_;
     # may be run outside transaction, or with flights locked
     my $flags= get_runvar_default('all_hostflags',     $job, '').','.
-               get_runvar_default("${ident}_hostflags", $job, '');
+               get_runvar_default("${ident}_hostflags", $job, '').','.
+               get_runvar_default("runtime_${ident}_hostflags", $job, '');
     return grep /./, split /\,/, $flags;
 }
 
+sub set_runtime_hostflag ($$) {
+    my ($ident,$value) = @_;
+
+    store_runvar("runtime_${ident}_hostflags", $value);
+}
+
 sub host_involves_pcipassthrough ($) {
     my ($ho) = @_;
     return !!grep m/^pcipassthrough\-/, get_hostflags($ho->{Ident});
-- 
2.11.0 (Apple Git-81)


_______________________________________________
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®.