Skip to contentSkip to conversation

tests: use the error reporting infraestructure

PATCH New Arturo Borrero Gonzalez 1 participant 1 message Jan 18, 2014 netfilter

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tests: use the error reporting infraestructure

In commit dec6874 [data_reg: fix verdict format approach] I added an unrelated loose line to nft-parsing-test.c

That line made use of the libnftables parsing error reporting, and is actually really useful.

So lets use it officially in nft-parsing-test.

---
 tests/nft-parsing-test.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
tests/nft-parsing-test.c +2 -1
index df981ad..63f7950 100644
@@ -121,7 +121,7 @@ failparsing:
 	fclose(fp);
 	printf("parsing %s: ", filename);
 	printf("\033[31mFAILED\e[0m (%s)\n", strerror(errno));
-	nft_parse_perror("fail", err);
+	nft_parse_perror("Detailed error", err);
 	return -1;
 }
 
@@ -158,6 +158,7 @@ failparsing:
 	fclose(fp);
 	printf("parsing %s: ", filename);
 	printf("\033[31mFAILED\e[0m (%s)\n", strerror(errno));
+	nft_parse_perror("Detailed error", err);
 	return -1;
 }