From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: [OSSTEST v6 03/24] create_webfile: Support use with guests as well as hosts. Date: Wed, 6 May 2015 10:56:32 +0100 Message-ID: <1430906213-30108-3-git-send-email-ian.campbell@citrix.com> References: <1430905605.2660.187.camel@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1430905605.2660.187.camel@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: ian.jackson@eu.citrix.com Cc: Ian Campbell , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org In particular make the path unique by ensuring it includes the host and guest name in the guest case. Signed-off-by: Ian Campbell Acked-by: Ian Jackson --- v4: Dropped redundant -> from $ho->{Host}->{Name}. v3: New patch --- Osstest/TestSupport.pm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm index b6fc09a..8d6b349 100644 --- a/Osstest/TestSupport.pm +++ b/Osstest/TestSupport.pm @@ -1980,6 +1980,8 @@ sub await_webspace_fetch_byleaf ($$$$$) { sub create_webfile ($$$) { my ($ho, $tail, $contents) = @_; # $contents as for file_link_contents my $wf_rhs= $ho->{Name}."_".$tail; + # $ho->{Host} is set if $ho is a guest. + $wf_rhs= $ho->{Host}{Name}."_${wf_rhs}" if $ho->{Host}; my $wf_common= $c{WebspaceCommon}.$wf_rhs; my $wf_url= $c{WebspaceUrl}.$wf_common; my $wf_file= $c{WebspaceFile}.$wf_common; -- 2.1.4