]> 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>
Wed, 10 Apr 2019 14:14:15 +0000 (15:14 +0100)
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 4e2f120ae7dbcb78b5af4182fd489aa434846b70..a5870e4d748ec2c7df4385cfe0507cf6e47d857d 100644 (file)
@@ -504,10 +504,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";
@@ -602,7 +602,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 (;;) {