summaryrefslogtreecommitdiffstats
path: root/tests/nft-parsing-test.c
diff options
context:
space:
mode:
authorArturo Borrero <arturo.borrero.glez@gmail.com>2013-10-31 13:36:34 +0100
committerPablo Neira Ayuso <pablo@netfilter.org>2013-11-03 22:28:12 +0100
commita48ee0f0a31fb709a731bd55b9afc3e03de57f10 (patch)
tree9c411fe2479b2282a028e3ca89582038a2b9223f /tests/nft-parsing-test.c
parent638a01c10583727fe2f77e63213a09b38e1e2358 (diff)
test: report errors building XML tree
Report error when building XML tree. Signed-off-by: Arturo Borrero Gonzalez <arturo.borrero.glez@gmail.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'tests/nft-parsing-test.c')
-rw-r--r--tests/nft-parsing-test.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/tests/nft-parsing-test.c b/tests/nft-parsing-test.c
index 5eaaa1e..8f01233 100644
--- a/tests/nft-parsing-test.c
+++ b/tests/nft-parsing-test.c
@@ -273,12 +273,18 @@ static int test_xml(const char *filename)
tree = mxmlLoadFile(NULL, fp, MXML_NO_CALLBACK);
fclose(fp);
- if (tree == NULL)
+ if (tree == NULL) {
+ printf("unable to build XML tree from file %s %s\n", filename,
+ FAILED_STR);
return -1;
+ }
xml = mxmlSaveAllocString(tree, MXML_NO_CALLBACK);
- if (xml == NULL)
+ if (xml == NULL) {
+ printf("unable to alloc string from XML tree from %s %s\n",
+ filename, FAILED_STR);
return -1;
+ }
/* Check what parsing should be done */
if (strcmp(tree->value.opaque, "table") == 0) {