From a07b88ee03f350f0b4d62c3cc1481c16f7e369e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A1n=20Tomko?= Date: Thu, 16 May 2013 15:37:14 +0200 Subject: [PATCH] schema: require target path in storage pool xml Make target path mandatory for pool types that require target, since we refuse to parse a target without a path. https://bugzilla.redhat.com/show_bug.cgi?id=893273 --- docs/schemas/storagepool.rng | 8 +++----- tests/Makefile.am | 1 + .../dir-missing-target-path-invalid.xml | 12 ++++++++++++ tests/storagepoolschematest | 2 +- 4 files changed, 17 insertions(+), 6 deletions(-) create mode 100644 tests/storagepoolschemadata/dir-missing-target-path-invalid.xml diff --git a/docs/schemas/storagepool.rng b/docs/schemas/storagepool.rng index eb56497ea2..3c2158a18f 100644 --- a/docs/schemas/storagepool.rng +++ b/docs/schemas/storagepool.rng @@ -200,11 +200,9 @@ - - - - - + + + diff --git a/tests/Makefile.am b/tests/Makefile.am index 41c4067415..04b76ba0d3 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -73,6 +73,7 @@ EXTRA_DIST = \ securityselinuxlabeldata \ schematestutils.sh \ sexpr2xmldata \ + storagepoolschemadata \ storagepoolschematest \ storagepoolxml2xmlin \ storagepoolxml2xmlout \ diff --git a/tests/storagepoolschemadata/dir-missing-target-path-invalid.xml b/tests/storagepoolschemadata/dir-missing-target-path-invalid.xml new file mode 100644 index 0000000000..8536781190 --- /dev/null +++ b/tests/storagepoolschemadata/dir-missing-target-path-invalid.xml @@ -0,0 +1,12 @@ + + test + + + + + 0700 + -1 + -1 + + + diff --git a/tests/storagepoolschematest b/tests/storagepoolschematest index 9844c76771..d54b827c17 100755 --- a/tests/storagepoolschematest +++ b/tests/storagepoolschematest @@ -4,7 +4,7 @@ . $srcdir/test-lib.sh . $abs_srcdir/schematestutils.sh -DIRS="storagepoolxml2xmlin storagepoolxml2xmlout" +DIRS="storagepoolxml2xmlin storagepoolxml2xmlout storagepoolschemadata" SCHEMA="storagepool.rng" check_schema "$DIRS" "$SCHEMA"