From: Anthony PERARD Date: Tue, 24 Oct 2023 10:51:06 +0000 (+0100) Subject: target_editfile: Use the same user to retrieve and send X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=3ea0b800b909eb77dad1890166b686d7aae9503e;p=osstest.git target_editfile: Use the same user to retrieve and send 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 Acked-by: Roger Pau Monné --- diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm index 0dded9b..b86f1d9 100644 --- a/Osstest/TestSupport.pm +++ b/Osstest/TestSupport.pm @@ -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: $!";