From: Ian Jackson <ian.jackson@eu.citrix.com>
To: xen-devel@lists.xenproject.org
Cc: Ian Jackson <Ian.Jackson@eu.citrix.com>,
Ian Campbell <ian.campbell@citrix.com>
Subject: [OSSTEST PATCH 3/4] Runvar functions: Provide target_xenkernel_ver
Date: Tue, 29 Sep 2015 17:21:27 +0100 [thread overview]
Message-ID: <1443543688-1195-4-git-send-email-ian.jackson@eu.citrix.com> (raw)
In-Reply-To: <1443543688-1195-1-git-send-email-ian.jackson@eu.citrix.com>
This abstracts away a number of places that do
guest_var($gho,'FOO',$r{xen_FOO})
We are going to change these runvar names.
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
---
Osstest/TestSupport.pm | 8 ++++++++
ts-debian-install | 6 +++---
ts-logs-capture | 2 +-
3 files changed, 12 insertions(+), 4 deletions(-)
diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm
index 09694f4..a21d835 100644
--- a/Osstest/TestSupport.pm
+++ b/Osstest/TestSupport.pm
@@ -89,6 +89,7 @@ BEGIN {
target_ping_check_down target_ping_check_up
target_kernkind_check target_kernkind_console_inittab
+ target_xenkernel_ver
target_var target_var_prefix
selectguest prepareguest more_prepareguest_hvm
guest_var guest_var_commalist guest_var_boolean
@@ -2018,6 +2019,13 @@ sub target_kernkind_check ($) {
}
}
+sub target_xenkernel_var ($$) {
+ my ($tho,$vn) = @_;
+ return
+ guest_var($gho,$vn,undef) //
+ $r{"xen_${vn}"};
+}
+
sub target_kernkind_console_inittab ($$$) {
my ($ho, $gho, $root) = @_;
diff --git a/ts-debian-install b/ts-debian-install
index 0dfe40c..510a766 100755
--- a/ts-debian-install
+++ b/ts-debian-install
@@ -49,10 +49,10 @@ sub ginstall () {
my $archarg= defined($arch) ? "--arch $arch" : '';
my $gsuite= guest_var($gho,'suite',$c{GuestDebianSuite});
- my $kernpath = guest_var($gho,'kernel_path',$r{xen_kernel_path});
- my $initrd = guest_var($gho,'initrd_path',$r{xen_initrd_path});
+ my $kernpath target_xenkernel_var($gho,'kernel_path');
+ my $initrd = target_xenkernel_ver($gho,'initrd_path');
if (!$kernpath) {
- my $kernver= guest_var($gho,'kernel_ver',$r{xen_kernel_ver});
+ my $kernver= target_xenkernel_ver($gho,'kernel_ver');
$kernver ||= target_cmd_output($ho, 'uname -r');
$kernpath = "/boot/vmlinuz-$kernver";
$initrd ||= "/boot/initrd.img-$kernver";
diff --git a/ts-logs-capture b/ts-logs-capture
index b99b1db..ec66e11 100755
--- a/ts-logs-capture
+++ b/ts-logs-capture
@@ -210,7 +210,7 @@ sub fetch_xenctx_guest ($) {
if (defined $gho->{Vcpus}) {
foreach (my $vcpu=0; $vcpu < $gho->{Vcpus}; $vcpu++) {
- my $kernpath = guest_var($gho,'kernel_path',$r{xen_kernel_path});
+ my $kernpath = target_xenkernel_var($gho,'kernel_path');
my $sysmaparg = !defined $kernpath ? '' :
$kernpath !~ m,/vmlinuz-, ? die "$kernpath ?" :
"-s $`/System.map-$'";
--
1.7.10.4
next prev parent reply other threads:[~2015-09-29 16:36 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-29 16:21 [OSSTEST PATCH 0/4] Miscellaneous bald yaks Ian Jackson
2015-09-29 16:21 ` [OSSTEST PATCH 1/4] ts-debian-fixup: Set password Ian Jackson
2015-09-29 16:21 ` [OSSTEST PATCH 2/4] Do not multiply console hvc0 getty entries Ian Jackson
2015-09-29 16:21 ` Ian Jackson [this message]
2015-09-29 16:21 ` [OSSTEST PATCH 4/4] Runvar functions: Introduce target_var and target_store_runvar Ian Jackson
2015-09-30 8:20 ` [OSSTEST PATCH 0/4] Miscellaneous bald yaks Ian Campbell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1443543688-1195-4-git-send-email-ian.jackson@eu.citrix.com \
--to=ian.jackson@eu.citrix.com \
--cc=ian.campbell@citrix.com \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).