]> xenbits.xensource.com Git - people/iwj/osstest.git/commitdiff
TestSupport: target_somefile_leaf rename and change a variable
authorIan Jackson <ian.jackson@eu.citrix.com>
Fri, 30 Nov 2018 16:42:26 +0000 (16:42 +0000)
committerIan Jackson <ian.jackson@eu.citrix.com>
Fri, 30 Nov 2018 16:42:26 +0000 (16:42 +0000)
Rename this function.  `getleaf' contains `get' which makes it sound
like the function copies something, or returns answers suitable for
getting, or something.

Also rename `$rdest' to `$rfile' since it might be a source too.
(Although we are not about to make it a source...)

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Osstest/TestSupport.pm

index 89e290a67710b35335f4df4d4c4c4c30454fd159..f9aebc85f1bf1cef8422775198800fbd862b014d 100644 (file)
@@ -498,10 +498,10 @@ sub remote_perl_script_done ($) {
     !$? or die "$thing->{What} $?";
 }
 
-sub target_somefile_getleaf ($$$) {
-    my ($lleaf_ref, $rdest, $ho) = @_;
+sub target_somefile_leaf ($$$) {
+    my ($lleaf_ref, $rfile, $ho) = @_;
     if (!defined $$lleaf_ref) {
-        $$lleaf_ref= $rdest;
+        $$lleaf_ref= $rfile;
         $$lleaf_ref =~ s,.*/,,;
     }
     $$lleaf_ref= hostnamepath($ho)."--$$lleaf_ref";
@@ -596,7 +596,7 @@ sub target_install_packages_norec ($@) {
 
 sub tpfcs_core {
     my ($tputfilef,$ho,$timeout,$filedata, $rdest,$lleaf) = @_;
-    target_somefile_getleaf(\$lleaf,$rdest,$ho);
+    target_somefile_leaf(\$lleaf,$rdest,$ho);
 
     my $h= new IO::File "$stash/$lleaf", 'w' or die "$lleaf $!";
     print $h $filedata or die $!;
@@ -654,7 +654,7 @@ sub teditfileex {
     if (!defined $rdest) {
         $rdest= $rfile;
     }
-    target_somefile_getleaf(\$lleaf,$rdest,$ho);
+    target_somefile_leaf(\$lleaf,$rdest,$ho);
     my $lfile;
     
     for (;;) {