]> xenbits.xensource.com Git - osstest.git/commitdiff
Introduce guest_mk_lv_name
authorIan Jackson <iwj@xenproject.org>
Mon, 19 Oct 2020 11:40:23 +0000 (12:40 +0100)
committerIan Jackson <iwj@xenproject.org>
Thu, 22 Oct 2020 16:38:52 +0000 (17:38 +0100)
This changes the way the disk name is constructed but not to any
overall effect.

Signed-off-by: Ian Jackson <iwj@xenproject.org>
Osstest/TestSupport.pm
ts-debian-install

index 5e6b15d9ab4dcc83d3f0a6d2d7b90c6e1a80690c..12aaba792255987e51400a5c17ee0accb4cc3230 100644 (file)
@@ -76,7 +76,7 @@ BEGIN {
                       target_jobdir target_extract_jobdistpath_subdir
                       target_extract_jobdistpath target_extract_distpart
                      target_tftp_prefix
-                      lv_create lv_dev_mapper
+                      lv_create lv_dev_mapper guest_mk_lv_name
 
                       poll_loop tcpconnect await_tcp
                       contents_make_cpio file_simple_write_contents
@@ -2177,6 +2177,11 @@ sub guest_var_commalist ($$) {
     return split /\,/, guest_var($gho,$runvartail,'');
 }
 
+sub guest_mk_lv_name ($$) {
+    my ($gho, $suffix) = @_;
+    return "$gho->{Name}".$suffix;
+}
+
 sub prepareguest ($$$$$$) {
     my ($ho, $gn, $hostname, $tcpcheckport, $mb,
         $boot_timeout) = @_;
@@ -2205,7 +2210,7 @@ sub prepareguest ($$$$$$) {
     # If we have defined guest specific disksize, use it
     $mb = guest_var($gho,'disksize',$mb);
     if (defined $mb) {
-       store_runvar("${gn}_disk_lv", $r{"${gn}_hostname"}.'-disk');
+       store_runvar("${gn}_disk_lv", guest_mk_lv_name($gho, '-disk'));
     }
 
     if (defined $mb) {
index f07dd67628a0b3691b18f916c290de6f0a0d720c..8caa9d7685ee8eed3fd0f1ed8f998d231dab820a 100755 (executable)
@@ -100,7 +100,7 @@ END
 
     my $cfg= "/etc/xen/$gho->{Name}.cfg";
     store_runvar("$gho->{Guest}_cfgpath", $cfg);
-    store_runvar("$gho->{Guest}_swap_lv", "$gho->{Name}-swap");
+    store_runvar("$gho->{Guest}_swap_lv", guest_mk_lv_name($gho, "-swap"));
 }
 
 prep();