diff --git a/tests/common.sh.in b/tests/common.sh.in
index cd0ebf2cf7173fef1763cf0c4ea46a8b215447a1..71554af109a5d7f432d3dc4c086c697fca74e1d0 100644
--- a/tests/common.sh.in
+++ b/tests/common.sh.in
@@ -22,7 +22,8 @@ export PERL=perl
 export TOP=$(pwd)/..
 export aterm_bin=@aterm_bin@
 export dot=@dot@
-export xmllint="@xmllint@ @xmlflags@"
+export xmllint="@xmllint@"
+export xmlflags="@xmlflags@"
 export xsltproc="@xsltproc@"
 
 export version=@version@
diff --git a/tests/logging.sh b/tests/logging.sh
index 80d186a754bc8ca5f7e877cf55018f914827695f..aea9f78b169cbf8d23cd55ac7fe7e7bfa0f225b4 100644
--- a/tests/logging.sh
+++ b/tests/logging.sh
@@ -10,7 +10,7 @@ $TOP/src/nix-log2xml/nix-log2xml < $TEST_ROOT/log.esc > $TEST_ROOT/log.xml
 
 # Is this well-formed XML?
 if test -n "$xmllint"; then
-    $xmllint --noout $TEST_ROOT/log.xml
+    $xmllint $xmlflags --noout $TEST_ROOT/log.xml
 fi
 
 # Convert to HTML.