[libvirt] [PATCH libvirt] tests: run virshtest independent of current pwd

Bjoern Walk posted 1 patch 6 years, 2 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/20180208123825.201686-1-bwalk@linux.vnet.ibm.com
tests/virshtest.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
[libvirt] [PATCH libvirt] tests: run virshtest independent of current pwd
Posted by Bjoern Walk 6 years, 2 months ago
virshtest execves the virsh binary. Make sure that it finds the binary's
location independent of the current working directory by specifying the
absolute path as determined by the build environment.

Reviewed-by: Marc Hartmayer <mhartmay@linux.vnet.ibm.com>
Reviewed-by: Boris Fiuczynski <fiuczy@linux.vnet.ibm.com>
Signed-off-by: Bjoern Walk <bwalk@linux.vnet.ibm.com>
---
 tests/virshtest.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/virshtest.c b/tests/virshtest.c
index 67453bd9..94548a82 100644
--- a/tests/virshtest.c
+++ b/tests/virshtest.c
@@ -84,13 +84,13 @@ testCompareOutputLit(const char *expectData,
     return result;
 }
 
-# define VIRSH_DEFAULT     "../tools/virsh", \
+# define VIRSH_DEFAULT abs_topbuilddir "/tools/virsh", \
     "--connect", \
     "test:///default"
 
 static char *custom_uri;
 
-# define VIRSH_CUSTOM     "../tools/virsh", \
+# define VIRSH_CUSTOM  abs_topbuilddir "/tools/virsh", \
     "--connect", \
     custom_uri
 
-- 
2.13.4

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH libvirt] tests: run virshtest independent of current pwd
Posted by John Ferlan 6 years, 2 months ago

On 02/08/2018 07:38 AM, Bjoern Walk wrote:
> virshtest execves the virsh binary. Make sure that it finds the binary's
> location independent of the current working directory by specifying the
> absolute path as determined by the build environment.
> 
> Reviewed-by: Marc Hartmayer <mhartmay@linux.vnet.ibm.com>
> Reviewed-by: Boris Fiuczynski <fiuczy@linux.vnet.ibm.com>
> Signed-off-by: Bjoern Walk <bwalk@linux.vnet.ibm.com>
> ---
>  tests/virshtest.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 

Reviewed-by: John Ferlan <jferlan@redhat.com>

(and pushed)

John

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH libvirt] tests: run virshtest independent of current pwd
Posted by Bjoern Walk 6 years, 2 months ago
John Ferlan <jferlan@redhat.com> [2018-02-13, 10:32AM -0500]:
> 
> 
> On 02/08/2018 07:38 AM, Bjoern Walk wrote:
> > virshtest execves the virsh binary. Make sure that it finds the binary's
> > location independent of the current working directory by specifying the
> > absolute path as determined by the build environment.
> > 
> > Reviewed-by: Marc Hartmayer <mhartmay@linux.vnet.ibm.com>
> > Reviewed-by: Boris Fiuczynski <fiuczy@linux.vnet.ibm.com>
> > Signed-off-by: Bjoern Walk <bwalk@linux.vnet.ibm.com>
> > ---
> >  tests/virshtest.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> 
> Reviewed-by: John Ferlan <jferlan@redhat.com>
> 
> (and pushed)
> 
> John
> 

Thanks a bunch!
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list