diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c
index 73489eed93..7d7a5f1e4b 100644
--- a/tests/qemuxml2xmltest.c
+++ b/tests/qemuxml2xmltest.c
@@ -81,23 +81,23 @@ static const char testStatusXMLPrefixHeader[] =
" \n"
" \n";
-static const char testStatusXMLPrefixFooter[] =
-" \n"
-" \n"
-" \n"
-" \n"
-" \n"
-" \n"
-" \n"
-" \n"
-" \n"
-" \n"
-" \n"
-" \n"
-" \n"
-" \n"
-" \n"
-" \n";
+static const char testStatusXMLPrefixBodyStatic[] =
+"\n"
+" \n"
+" \n"
+" \n"
+" \n"
+"\n"
+"\n"
+" \n"
+" \n"
+" \n"
+" \n"
+" \n"
+"\n"
+"\n"
+"\n"
+"\n";
static const char testStatusXMLSuffix[] =
"\n";
@@ -134,8 +134,9 @@ testGetStatusXMLPrefix(const struct testInfo *data)
testGetStatuXMLPrefixVcpus(&buf, data);
+ virBufferAddStr(&buf, testStatusXMLPrefixBodyStatic);
+
virBufferAdjustIndent(&buf, -2);
- virBufferAdd(&buf, testStatusXMLPrefixFooter, -1);
return virBufferContentAndReset(&buf);
}