From 6c2daa7dbb5834776c024783fbc9032298ef45a4 Mon Sep 17 00:00:00 2001 From: Florian Westphal Date: Thu, 11 Jul 2013 22:39:41 +0200 Subject: qa: test_connlabel: don't abort when system-wide config exists Only dump the contents of the system-wide connlabel.conf if present instead of expecting same content as the qa config. Signed-off-by: Florian Westphal --- qa/test_connlabel.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'qa') diff --git a/qa/test_connlabel.c b/qa/test_connlabel.c index 27cbca2..345ecf6 100644 --- a/qa/test_connlabel.c +++ b/qa/test_connlabel.c @@ -27,7 +27,7 @@ static void print_label(struct nfct_labelmap *map) assert(b == 42); } -static void print_bits(struct nfct_labelmap *map) +static void dump_map(struct nfct_labelmap *map) { unsigned int i = 0; @@ -36,7 +36,7 @@ static void print_bits(struct nfct_labelmap *map) if (!name) break; if (name[0]) - printf("%s, %d\n", name, i); + printf("\t\"%s\", bit %d\n", name, i); i++; } } @@ -50,8 +50,8 @@ int main(void) l = nfct_labelmap_new(NULL); if (l) { - print_bits(l); - print_label(l); + puts("default connlabel.conf:"); + dump_map(l); nfct_labelmap_destroy(l); } else { puts("no default config found"); @@ -61,10 +61,10 @@ int main(void) if (!l) l = nfct_labelmap_new("qa/qa-connlabel.conf"); assert(l); - print_bits(l); + puts("qa-connlabel.conf:"); + dump_map(l); print_label(l); nfct_labelmap_destroy(l); - return 0; } -- cgit v1.2.3