aboutsummaryrefslogtreecommitdiffstats
path: root/tools/xm-test/runtest.sh
diff options
context:
space:
mode:
authordan@localhost.localdomain <dan@localhost.localdomain>2005-11-18 13:00:13 +0100
committerdan@localhost.localdomain <dan@localhost.localdomain>2005-11-18 13:00:13 +0100
commite198273e0e055ee90a64252d09c22e8f0df1204f (patch)
tree1e5329be3f7fda8ebbe0a745edf2e9cd9af6ded3 /tools/xm-test/runtest.sh
parent600918671a9a37b862e3c15625caef73b1185f89 (diff)
downloadxen-e198273e0e055ee90a64252d09c22e8f0df1204f.tar.gz
xen-e198273e0e055ee90a64252d09c22e8f0df1204f.tar.bz2
xen-e198273e0e055ee90a64252d09c22e8f0df1204f.zip
Add hping to the ramdisk. Also, do some very simple versioning.
This is the first change to the ramdisk since v0.1.0. So, we now build the image as initrd-X.Y.img, and link initrd.img to it. This lets us have a few checks to make sure that people rebuild their ramdisks when necessary.
Diffstat (limited to 'tools/xm-test/runtest.sh')
-rwxr-xr-xtools/xm-test/runtest.sh16
1 files changed, 14 insertions, 2 deletions
diff --git a/tools/xm-test/runtest.sh b/tools/xm-test/runtest.sh
index c6a95b4e8b..f366a48c74 100755
--- a/tools/xm-test/runtest.sh
+++ b/tools/xm-test/runtest.sh
@@ -61,19 +61,31 @@ runnable_tests() {
fi
# See if the ramdisk has been built
- rdsize=$(stat -c %s ramdisk/initrd.img 2>/dev/null)
+ rdsize=$(stat -Lc %s ramdisk/initrd.img 2>/dev/null)
if [ -z "$rdsize" ] || [ $rdsize -le 16384 ]; then
echo "Cannot find a valid ramdisk. You need to run \"make\" or"
echo "copy in a previously-built ramdisk to the ramdisk/ directory"
exit 1
fi
+ # Figure out the version of the ramdisk link and compare it
+ # to what it should be as a cheap way of making sure we're
+ # using the right version
+ realrd=$(readlink ramdisk/initrd.img)
+ eval $(./lib/XmTestReport/xmtest.py)
+ rrdver="initrd-${XM_TEST_MAJ}.${XM_TEST_MIN}.img"
+ if [ "$realrd" != "$rrdver" ]; then
+ echo "Error: ramdisk/initrd.img is from an old version"
+ echo "You need to build a ramdisk from at least ${XM_TEST_MAJ}.${XM_TEST_MIN}"
+ exit 1
+ fi
+
# See if xend is running
if ! xm list >/dev/null 2>&1; then
echo "'xm list' failed: is xend running?"
exit 1
fi
-
+
}
# Get contact info if needed