Re: [libnftables PATCH 2/2] test: compare content parsing with original file content.

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

 



On Sat, Aug 10, 2013 at 09:40:51PM +0200, Alvaro Neira wrote:
> From: Álvaro Neira Ayuso <alvaroneay@xxxxxxxxx>
> 
> Before, we have tested only if we have parsed some file but we
> hadn't tested if the content is OK.  Now, we can test if we can
> parse some file and if the object's info is the same than the
> content in the test files.

Applied this minor glitches, see below.

> diff --git a/tests/nft-parsing-test.c b/tests/nft-parsing-test.c
> index e111fd0..f9cfcdf 100644
> --- a/tests/nft-parsing-test.c
> +++ b/tests/nft-parsing-test.c
[...]
> +	printf("matching %s: ", filename);

renamed this to "validating" instead of matching.

> +	printf("\033[31mFAILED\e[0m (%s)\n", strerror(errno));

removed strerr there. If validation fails, ie. strcmp(original,
output) are not equal, errno does not contain any relevant
information.

Thanks.
--
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