  		$(PIE_LDFLAGS) \
 diff --git a/tools/virtcov.in b/tools/virtcov.in
 new file mode 100644
-index 0000000..099a58f
+index 0000000..38abe3f
 --- /dev/null
 +++ b/tools/virtcov.in
 @@ -0,0 +1,208 @@

+
+startfunc(){
+    preparefunc
+    systemctl stop libvirtd virtlogd 2>/dev/null
+    echo "Stop libvirtd virtlogd"
+    lcov --directory "$WORKPATH" --zerocounters >/dev/null 2>&1
+    echo "Clear exist gcda file"
+    systemctl start libvirtd virtlogd 2>/dev/null
+    echo "Start libvirtd virtlogd"
+    gengcdafunc
+    echo "create empty gcda file"
+    echo "Done!"

+    local testname=$1
+
+    setenforce 0
+    service libvirtd stop 2>/dev/null
+    echo "Stop libvirtd"
+    setenforce 1
+    lcov --capture --directory "$WORKPATH" --output-file /tmp/coverage.info --test-name "$testname" >/dev/null 2>&1
+    echo "Create coverage.info in tmp directory"
+    service libvirtd start 2>/dev/null
+    echo "Start libvirtd"
+}
+
+reportfunc(){
