netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Ana Rey <anarey@gmail.com>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: [libnftnl PATCH] tests: Use the system errors in test_xml.
Date: Wed, 11 Jun 2014 19:48:28 +0200	[thread overview]
Message-ID: <20140611174828.GB17547@localhost> (raw)
In-Reply-To: <1402501851-22208-3-git-send-email-anarey@gmail.com>

On Wed, Jun 11, 2014 at 05:50:47PM +0200, Ana Rey wrote:
> 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

Renamed 'fail' to 'Reason'. I know the other part of code it was using
'fail', but it already said 'FAILED' above, so I think it clarifies a
bit more.

> 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
> 
> --
> To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2014-06-11 17:48 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 ` [libnftnl PATCH] tests: Use the system errors in test_xml Ana Rey
2014-06-11 17:48   ` Pablo Neira Ayuso [this message]
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=20140611174828.GB17547@localhost \
    --to=pablo@netfilter.org \
    --cc=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).