[libvirt] [PATCH] tests: run schema checks in sorted order

Eric Blake eblake at redhat.com
Wed Dec 21 00:33:26 UTC 2011

Having a test that depends on file system timestamps and/or inode
allocation order is non-deterministic in its output.

* tests/schematestutils.sh: Run test in deterministic order.

Pushing under the trivial rule.  Evidence of the non-determinism
can be found at the location of the three failures reported here:

 tests/schematestutils.sh |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/tests/schematestutils.sh b/tests/schematestutils.sh
index f2b3b50..ec6452a 100644
--- a/tests/schematestutils.sh
+++ b/tests/schematestutils.sh
@@ -13,7 +13,7 @@ for dir in $DIRS
   XML=`find $abs_srcdir/$dir -name '*.xml'` || exit 1

-  for xml in $XML
+  for xml in `echo $XML | sort`
     n=`expr $n + 1`
     cmd="xmllint --relaxng $SCHEMA --noout $xml"

More information about the libvir-list mailing list