From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Jackson Subject: [OSSTEST PATCH 01/13] TestSupport: Provide target_editfile Date: Fri, 16 May 2014 19:01:28 +0100 Message-ID: <1400263300-22903-2-git-send-email-ian.jackson@eu.citrix.com> References: <1400263300-22903-1-git-send-email-ian.jackson@eu.citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta4.messagelabs.com ([85.158.143.247]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WlMSf-0002E6-9r for xen-devel@lists.xenproject.org; Fri, 16 May 2014 18:02:25 +0000 In-Reply-To: <1400263300-22903-1-git-send-email-ian.jackson@eu.citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xenproject.org Cc: Ian Jackson , Ian Campbell List-Id: xen-devel@lists.xenproject.org ... as well as target_editfile_root. No callers yet. Signed-off-by: Ian Jackson --- Osstest/TestSupport.pm | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm index 6558fc8..c95807a 100644 --- a/Osstest/TestSupport.pm +++ b/Osstest/TestSupport.pm @@ -54,7 +54,7 @@ BEGIN { target_putfile target_putfile_root target_putfilecontents_stash target_putfilecontents_root_stash - target_put_guest_image + target_put_guest_image target_editfile target_editfile_root target_file_exists target_run_apt target_install_packages target_install_packages_norec @@ -479,7 +479,8 @@ sub target_file_exists ($$) { die "$rfile $out ?"; } -sub target_editfile_root ($$$;$$) { +sub teditfileex { + my $user= shift @_; my $code= pop @_; my ($ho,$rfile,$lleaf,$rdest) = @_; @@ -512,9 +513,14 @@ sub target_editfile_root ($$$;$$) { '::EI'->error and die $!; close '::EI' or die $!; close '::EO' or die $!; - target_putfile_root($ho, 60, "$lfile.new", $rdest); + tputfileex($user, $ho, 60, "$lfile.new", $rdest); } +sub target_editfile_root ($$$;$$) { teditfileex('root',@_); } +sub target_editfile ($$$;$$) { teditfileex('osstest',@_); } + # my $code= pop @_; + # my ($ho,$rfile,$lleaf,$rdest) = @_; + sub target_cmd_build ($$$$) { my ($ho,$timeout,$builddir,$script) = @_; -- 1.7.10.4