diff --git a/docs/schemas/domainsnapshot.rng b/docs/schemas/domainsnapshot.rng
new file mode 100644
index 0000000000..86bab0b969
--- /dev/null
+++ b/docs/schemas/domainsnapshot.rng
@@ -0,0 +1,53 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/Makefile.am b/tests/Makefile.am
index c5e52e3d87..caf8cd07fc 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -76,6 +76,9 @@ EXTRA_DIST = \
nwfilterxml2xmlout \
nwfilterxml2xmlin \
nwfilterschematest \
+ domainsnapshotschematest \
+ domainsnapshotxml2xmlout \
+ domainsnapshotxml2xmlin \
$(patsubst %,qemuhelpdata/%,$(qemuhelpdata))
noinst_PROGRAMS = virshtest conftest \
@@ -123,7 +126,8 @@ test_scripts = \
storagevolschematest \
domainschematest \
nodedevschematest \
- nwfilterschematest
+ nwfilterschematest \
+ domainsnapshotschematest
if WITH_LIBVIRTD
test_scripts += \
diff --git a/tests/domainsnapshotschematest b/tests/domainsnapshotschematest
new file mode 100755
index 0000000000..1bdc5393cd
--- /dev/null
+++ b/tests/domainsnapshotschematest
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+: ${srcdir=.}
+. $srcdir/test-lib.sh
+. $abs_srcdir/schematestutils.sh
+
+DIRS="domainsnapshotxml2xmlin domainsnapshotxml2xmlout"
+SCHEMA="domainsnapshot.rng"
+
+check_schema "$DIRS" "$SCHEMA"
diff --git a/tests/domainsnapshotxml2xmlin/description_only.xml b/tests/domainsnapshotxml2xmlin/description_only.xml
new file mode 100644
index 0000000000..b76fca2f93
--- /dev/null
+++ b/tests/domainsnapshotxml2xmlin/description_only.xml
@@ -0,0 +1,3 @@
+
+ My description
+
diff --git a/tests/domainsnapshotxml2xmlin/empty.xml b/tests/domainsnapshotxml2xmlin/empty.xml
new file mode 100644
index 0000000000..f2bcfbe4bf
--- /dev/null
+++ b/tests/domainsnapshotxml2xmlin/empty.xml
@@ -0,0 +1 @@
+
diff --git a/tests/domainsnapshotxml2xmlin/name_and_description.xml b/tests/domainsnapshotxml2xmlin/name_and_description.xml
new file mode 100644
index 0000000000..90ce774741
--- /dev/null
+++ b/tests/domainsnapshotxml2xmlin/name_and_description.xml
@@ -0,0 +1,4 @@
+
+ snap1
+ A longer description!
+
diff --git a/tests/domainsnapshotxml2xmlin/name_only.xml b/tests/domainsnapshotxml2xmlin/name_only.xml
new file mode 100644
index 0000000000..8123a02d27
--- /dev/null
+++ b/tests/domainsnapshotxml2xmlin/name_only.xml
@@ -0,0 +1,3 @@
+
+ snapshot1
+
diff --git a/tests/domainsnapshotxml2xmlout/all_parameters.xml b/tests/domainsnapshotxml2xmlout/all_parameters.xml
new file mode 100644
index 0000000000..ed4a60006c
--- /dev/null
+++ b/tests/domainsnapshotxml2xmlout/all_parameters.xml
@@ -0,0 +1,13 @@
+
+ my snap name
+ !@#$%^
+
+ earlier_snap
+
+ running
+ 1272917631
+
+ 9d37b878-a7cc-9f9a-b78f-49b3abad25a8
+
+ 1
+
diff --git a/tests/domainsnapshotxml2xmlout/noparent.xml b/tests/domainsnapshotxml2xmlout/noparent.xml
new file mode 100644
index 0000000000..cbac0d8585
--- /dev/null
+++ b/tests/domainsnapshotxml2xmlout/noparent.xml
@@ -0,0 +1,9 @@
+
+ my snap name
+ !@#$%^
+ running
+ 1272917631
+
+ 9d37b878-a7cc-9f9a-b78f-49b3abad25a8
+
+
diff --git a/tests/domainsnapshotxml2xmlout/noparent_nodescription.xml b/tests/domainsnapshotxml2xmlout/noparent_nodescription.xml
new file mode 100644
index 0000000000..0de202d058
--- /dev/null
+++ b/tests/domainsnapshotxml2xmlout/noparent_nodescription.xml
@@ -0,0 +1,7 @@
+
+ my snap name
+ !@#$%^
+ running
+ 1272917631
+ 1
+
diff --git a/tests/domainsnapshotxml2xmlout/noparent_nodescription_noactive.xml b/tests/domainsnapshotxml2xmlout/noparent_nodescription_noactive.xml
new file mode 100644
index 0000000000..25b60f3a09
--- /dev/null
+++ b/tests/domainsnapshotxml2xmlout/noparent_nodescription_noactive.xml
@@ -0,0 +1,6 @@
+
+ my snap name
+ !@#$%^
+ running
+ 1272917631
+