Skip to content
Snippets Groups Projects
Commit afaf26b5 authored by Guido Günther's avatar Guido Günther
Browse files

Add qemu:///session smoke test

parent 4a41a35c
No related branches found
No related tags found
No related merge requests found
......@@ -2,6 +2,11 @@ Tests: smoke
Depends: @
Restrictions: allow-stderr
Tests: smoke-qemu-session
Depends: libvirt-daemon
Restrictions: allow-stderr, isolation-container
Tests: build-test
Depends: libvirt-dev
Restrictions: allow-stderr
#!/bin/sh
set -e
set -x
export LIBVIRT_DEFAULT_URI='qemu:///session'
cleanup()
{
if [ -z "$CLEANED_UP" ]; then
virsh destroy sqs || true
virsh undefine sqs || true
CLEANED_UP=1
fi
}
trap cleanup EXIT
if [ ! -f /vmlinuz ] || [ ! -f /initrd.img ]; then
echo "Kernel or initrd not found...skipping".
exit 0
fi
if [ $(uname -m) != "x86_64" ]; then
echo "Not on x86_64...skipping"
exit 0
fi
virsh define debian/tests/smoke-qemu-session.xml
virsh start sqs
virsh list | grep -qs 'sqs[[:space:]]\+running'
virsh destroy sqs
virsh undefine sqs
CLEANED_UP=1
echo 'Smoke test of qemu session:/// succesful'
exit 0
<domain type='kvm'>
<name>sqs</name>
<memory unit='KiB'>256000</memory>
<currentMemory unit='KiB'>256000</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='x86_64' machine='pc-i440fx-2.5'>hvm</type>
<kernel>/vmlinuz</kernel>
<initrd>/initrd.img</initrd>
<cmdline> console=ttyS0 quiet loglevel=0 edd=off printk.time=1 noreplace-smp cgroup_disable=memory pci=noearly noapic panic=-1 selinux=0</cmdline>
<boot dev='hd'/>
</os>
<features>
<acpi/>
</features>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>destroy</on_reboot>
<on_crash>destroy</on_crash>
<devices>
<emulator>/usr/bin/kvm</emulator>
<controller type='virtio-serial' index='0'>
<alias name='virtio-serial0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
</controller>
<filesystem type='mount' accessmode='squash'>
<source dir='/'/>
<target dir='sqs:root'/>
<readonly/>
</filesystem>
</devices>
</domain>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment