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

autopkgtests: check daemon restart and virtlogd

parent ec65bfbc
No related branches found
No related tags found
No related merge requests found
...@@ -17,6 +17,12 @@ cleanup() ...@@ -17,6 +17,12 @@ cleanup()
fi fi
} }
check_domain()
{
virsh list | grep -qs "${DOMAIN}[[:space:]]\+running"
virsh lxc-enter-namespace --noseclabel ${DOMAIN} /bin/ls /bin/ls
}
trap cleanup EXIT trap cleanup EXIT
virt-host-validate lxc virt-host-validate lxc
...@@ -25,9 +31,14 @@ virsh capabilities | grep -qs 'emulator>/usr/lib/libvirt/libvirt_lxc' ...@@ -25,9 +31,14 @@ virsh capabilities | grep -qs 'emulator>/usr/lib/libvirt/libvirt_lxc'
virsh capabilities | grep -qs 'os_type>exe' virsh capabilities | grep -qs 'os_type>exe'
virt-xml-validate ${XML} virt-xml-validate ${XML}
virsh define ${XML} virsh define ${XML}
rm -f /var/log/libvirt/lxc/sl.log
virsh start ${DOMAIN} virsh start ${DOMAIN}
virsh list | grep -qs "${DOMAIN}[[:space:]]\+running" # Check virtlogd is running
virsh lxc-enter-namespace --noseclabel ${DOMAIN} /bin/ls /bin/ls grep -qs "starting up" /var/log/libvirt/lxc/sl.log
check_domain
# Make sure a restart doesn't termiante the domain
/etc/init.d/libvirtd restart
check_domain
virsh destroy ${DOMAIN} virsh destroy ${DOMAIN}
virsh undefine ${DOMAIN} virsh undefine ${DOMAIN}
CLEANED_UP=1 CLEANED_UP=1
......
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