From: Ana Rey <anarey@gmail.com>
To: netfilter-devel@vger.kernel.org
Cc: Ana Rey <anarey@gmail.com>
Subject: [libnftnl PATCH] tests: Use the system errors in test_xml.
Date: Wed, 11 Jun 2014 17:50:47 +0200 [thread overview]
Message-ID: <1402501851-22208-3-git-send-email-anarey@gmail.com> (raw)
In-Reply-To: <1402501851-22208-1-git-send-email-anarey@gmail.com>
Add the use of system errors (nft_parse_perror) in test_xml to know which
node is not found.
Example:
parsing xmlfiles/75-ruleset.xml: FAILED (Invalid argument)
fail : Node "flags" not found
Signed-off-by: Ana Rey <anarey@gmail.com>
---
tests/nft-parsing-test.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/tests/nft-parsing-test.c b/tests/nft-parsing-test.c
index 2a15109..5eff0b9 100644
--- a/tests/nft-parsing-test.c
+++ b/tests/nft-parsing-test.c
@@ -177,6 +177,7 @@ failparsing:
fclose(fp);
printf("parsing %s: ", filename);
printf("\033[31mFAILED\e[0m (%s)\n", strerror(errno));
+ nft_parse_perror("fail", err);
return -1;
}
--
2.0.0
next prev parent reply other threads:[~2014-06-11 15:51 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-11 15:50 [libnftnl PATCH 0/5] Set: Do not print unset value Ana Rey
2014-06-11 15:50 ` [libnftnl PATCH 1/5] src: set: Use nft_rule_expr_set_* in the xml parsing code Ana Rey
2014-06-11 17:47 ` Pablo Neira Ayuso
2014-06-11 15:50 ` Ana Rey [this message]
2014-06-11 17:48 ` [libnftnl PATCH] tests: Use the system errors in test_xml Pablo Neira Ayuso
2014-06-11 15:50 ` [libnftnl PATCH 2/5] src: set: Do not print unset values in xml Ana Rey
2014-06-11 16:14 ` Arturo Borrero Gonzalez
2014-06-11 17:49 ` Pablo Neira Ayuso
2014-06-11 15:50 ` [libnftnl PATCH 3/5] src: set: Do not print unset values in json Ana Rey
2014-06-11 17:50 ` Pablo Neira Ayuso
2014-06-11 15:50 ` [libnftnl PATCH 4/5] src: set: Free memory in the same function that is reserved Ana Rey
2014-06-11 17:50 ` Pablo Neira Ayuso
2014-06-11 15:50 ` [libnftnl PATCH 5/5] tests: xmlfile: Test files without unset child elements in set elements Ana Rey
2014-06-11 17:51 ` Pablo Neira Ayuso
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1402501851-22208-3-git-send-email-anarey@gmail.com \
--to=anarey@gmail.com \
--cc=netfilter-devel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).