From 5bde56a4bb591ebe7a0030801d4119784036fd13 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Fri, 22 Oct 2021 17:00:39 +1100 Subject: [PATCH 1/2] Add '\n' to the end of each line when generating xsl.c This makes the bind9.xml more readable in a browser when debugging and also ensures that the file is properly terminated in the HTTP transaction. --- bin/named/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/named/Makefile.am b/bin/named/Makefile.am index 87e60ddcd5..7065a90b7a 100644 --- a/bin/named/Makefile.am +++ b/bin/named/Makefile.am @@ -47,7 +47,7 @@ xsl.c: bind9.xsl Makefile (echo 'const char xslmsg[] =' && \ $(SED) -e 's,\",\\\",g' \ -e 's,^,\",' \ - -e 's,$$,\",' && \ + -e 's,$$,\\n\",' && \ echo ";") \ < "${srcdir}/bind9.xsl" > $@ From 04e3ba0b512cbc9f926848b73b90db802e7e858b Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Mon, 25 Oct 2021 10:06:55 +1100 Subject: [PATCH 2/2] Check that bind9.xsl is properly transmitted --- bin/tests/system/statistics/tests.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/bin/tests/system/statistics/tests.sh b/bin/tests/system/statistics/tests.sh index 02283fd69a..4cb8008180 100644 --- a/bin/tests/system/statistics/tests.sh +++ b/bin/tests/system/statistics/tests.sh @@ -177,6 +177,7 @@ if $FEATURETEST --have-libxml2 && [ -x "${CURL}" ] && [ -x "${XSLTPROC}" ] ; th $DIGCMD +notcp +recurse @10.53.0.3 soa example > dig.out.test$n.2 2>&1 ${CURL} http://10.53.0.3:${EXTRAPORT1}/xml/v3 > curl.out.${n}.xml 2>/dev/null || ret=1 ${CURL} http://10.53.0.3:${EXTRAPORT1}/bind9.xsl > curl.out.${n}.xsl 2>/dev/null || ret=1 + ${DIFF} ${TOP_SRCDIR}/bin/named/bind9.xsl curl.out.${n}.xsl || ret=1 ${XSLTPROC} curl.out.${n}.xsl - < curl.out.${n}.xml > xsltproc.out.${n} 2>/dev/null || ret=1 cp curl.out.${n}.xml stats.xml.out || ret=1