]> xenbits.xensource.com Git - people/aperard/osstest.git/commitdiff
TestSupport: In teditfileex, get the file with the requested user
authorAnthony PERARD <anthony.perard@citrix.com>
Wed, 15 Nov 2017 18:35:07 +0000 (18:35 +0000)
committerAnthony PERARD <anthony.perard@citrix.com>
Thu, 12 Jul 2018 15:49:19 +0000 (16:49 +0100)
e.g. If the file to be edited is only accessible to the root user,
target_getfile() would not work.

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

index ea546011c63db0ad6bde62dfdc51be8521cd8f2c..87a06462ede2f3a7868d06e59dea87a17054c898 100644 (file)
@@ -637,7 +637,7 @@ sub teditfileex {
         logm("editing $rfile to $rdest as $lfile".'{,.new}');
     }
 
-    target_getfile($ho, 60, $rfile, $lfile);
+    tgetfileex($user, $ho, 60, $rfile, $lfile);
     open '::EI', "$lfile" or die "$lfile: $!";
     open '::EO', "> $lfile.new" or die "$lfile.new: $!";