Re: [libnftnl PATCH] tests: Use the system errors in test_xml.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux