]> xenbits.xensource.com Git - osstest.git/commitdiff
target_editfile: Use the same user to retrieve and send
authorAnthony PERARD <anthony.perard@citrix.com>
Tue, 24 Oct 2023 10:51:06 +0000 (11:51 +0100)
committerAnthony PERARD <anthony.perard@citrix.com>
Thu, 28 Mar 2024 16:51:52 +0000 (16:51 +0000)
The file "/boot/grub/grub.cfg" on Debian Bookworm isn't accessible
from the "osstest" user, but target_editfile_root() tries to grab the
file as "osstest" then edit it as "root.

Change teditfileex() to use the same $user also to get the file. This
will fix ts-examine-serial-pre step.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Roger Pau Monné <roger.pau@citrix.com>
Osstest/TestSupport.pm

index 0dded9b2d8a4b9fc0ca4ac079f127cd1be1f3dbc..b86f1d96955739227ce43382bbe7ac526dbed168 100644 (file)
@@ -783,7 +783,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: $!";