summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2013-07-11 22:39:41 +0200
committerFlorian Westphal <fw@strlen.de>2013-07-11 22:47:18 +0200
commit6c2daa7dbb5834776c024783fbc9032298ef45a4 (patch)
treeb417fb17e8af25476c507cc07b0148f344466dcd
parent033ec6be245261cd5e53e5a01435afea71ef6230 (diff)
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 <fw@strlen.de>
-rw-r--r--qa/test_connlabel.c12
1 files changed, 6 insertions, 6 deletions
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;
}