#!/bin/sh
# Exercise a bug whereby defining a valid domain could kill libvirtd.
# The bug can also be exercised with a simple define/dumpxml pair to virsh.
. "$(dirname $0)/test-lib.sh"
if test "$VERBOSE" = yes; then
set -x
$abs_top_builddir/tools/virsh --version
fi
fail=0
# Domain definition from Cole Robinson.
cat <<\EOF > D.xml || fail=1
D
aaa3ae22-fed2-bfbd-ac02-3bea3bcfad82
262144
262144
1
hvm
destroy
restart
destroy
/usr/bin/qemu-system-i386
EOF
url=test:///default
$abs_top_builddir/tools/virsh --connect "$url" 'define D.xml; dumpxml D' > out 2>&1 || fail=1
cat > exp <