WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH 2 of 6] xl: allow check-xl-disk-parse to run against

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH 2 of 6] xl: allow check-xl-disk-parse to run against installed xl as well as build dir
From: Ian Campbell <ian.campbell@xxxxxxxxxx>
Date: Thu, 29 Sep 2011 17:20:29 +0100
Cc: Ian Campbell <ian.campbell@xxxxxxxxxx>
Delivery-date: Thu, 29 Sep 2011 09:22:18 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <patchbomb.1317313227@xxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <patchbomb.1317313227@xxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mercurial-patchbomb/1.6.4
# HG changeset patch
# User Ian Campbell <ian.campbell@xxxxxxxxxx>
# Date 1317312717 -3600
# Node ID 3fb003a5d5367ccdfb969fd786b57ef2e103f289
# Parent  030e844fccebcc3984c5792559c0cbd5424d277a
xl: allow check-xl-disk-parse to run against installed xl as well as build dir

I can't run from the current directory since my build box isn't running Xen so
if ./xl doesn't exist use the installed version on the assumption that I've
copied the script to a test host.

I think running from the build dir needs the blktap2 libraries, so update
LD_LIBRARY_PATH as appropriate.

Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>

diff -r 030e844fcceb -r 3fb003a5d536 tools/libxl/check-xl-disk-parse
--- a/tools/libxl/check-xl-disk-parse   Thu Sep 29 17:02:14 2011 +0100
+++ b/tools/libxl/check-xl-disk-parse   Thu Sep 29 17:11:57 2011 +0100
@@ -2,6 +2,13 @@
 
 set -e
 
+if [ -x ./xl ] ; then
+    export LD_LIBRARY_PATH=.:../libxc:../xenstore:../blktap2/control
+    XL=./xl
+else
+    XL=/usr/sbin/xl
+fi
+
 fprefix=tmp.check-xl-disk-parse
 
 expected () {
@@ -14,8 +21,7 @@ one () {
     expected_rc=$1; shift
     printf "test case %s...\n" "$*"
     set +e
-    LD_LIBRARY_PATH=.:../libxc:../xenstore \
-        ./xl -N block-attach 0 "$@" </dev/null >$fprefix.actual 2>/dev/null
+    ${XL} -N block-attach 0 "$@" </dev/null >$fprefix.actual 2>/dev/null
     actual_rc=$?
     diff -u $fprefix.expected $fprefix.actual
     diff_rc=$?

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel