diff options
author | Dag-Erling Smørgrav <des@FreeBSD.org> | 2018-09-10 16:32:55 +0000 |
---|---|---|
committer | Dag-Erling Smørgrav <des@FreeBSD.org> | 2018-09-10 16:32:55 +0000 |
commit | dcaa814d350c5ee7deb2164502a24f2f698b9799 (patch) | |
tree | 9cb62373e6c424da021043a171564ced3bb19501 /testcode/unitmsgparse.c | |
parent | 4aea2433fa04a7a86c8972869bd021b7a3622dc8 (diff) |
Notes
Diffstat (limited to 'testcode/unitmsgparse.c')
-rw-r--r-- | testcode/unitmsgparse.c | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/testcode/unitmsgparse.c b/testcode/unitmsgparse.c index 627d10b78ec3..c0b38bac76e4 100644 --- a/testcode/unitmsgparse.c +++ b/testcode/unitmsgparse.c @@ -495,6 +495,11 @@ testfromdrillfile(sldns_buffer* pkt, struct alloc_cache* alloc, fclose(in); } +#define xstr(s) str(s) +#define str(s) #s + +#define SRCDIRSTR xstr(SRCDIR) + void msgparse_test(void) { time_t origttl = MAX_NEG_TTL; @@ -509,27 +514,27 @@ void msgparse_test(void) unit_show_feature("message parse"); simpletest(pkt, &alloc, out); /* plain hex dumps, like pcat */ - testfromfile(pkt, &alloc, out, "testdata/test_packets.1"); - testfromfile(pkt, &alloc, out, "testdata/test_packets.2"); - testfromfile(pkt, &alloc, out, "testdata/test_packets.3"); + testfromfile(pkt, &alloc, out, SRCDIRSTR "/testdata/test_packets.1"); + testfromfile(pkt, &alloc, out, SRCDIRSTR "/testdata/test_packets.2"); + testfromfile(pkt, &alloc, out, SRCDIRSTR "/testdata/test_packets.3"); /* like from drill -w - */ - testfromdrillfile(pkt, &alloc, out, "testdata/test_packets.4"); - testfromdrillfile(pkt, &alloc, out, "testdata/test_packets.5"); + testfromdrillfile(pkt, &alloc, out, SRCDIRSTR "/testdata/test_packets.4"); + testfromdrillfile(pkt, &alloc, out, SRCDIRSTR "/testdata/test_packets.5"); matches_nolocation = 1; /* RR order not important for the next test */ - testfromdrillfile(pkt, &alloc, out, "testdata/test_packets.6"); + testfromdrillfile(pkt, &alloc, out, SRCDIRSTR "/testdata/test_packets.6"); check_rrsigs = 1; - testfromdrillfile(pkt, &alloc, out, "testdata/test_packets.7"); + testfromdrillfile(pkt, &alloc, out, SRCDIRSTR "/testdata/test_packets.7"); check_rrsigs = 0; matches_nolocation = 0; check_formerr_gone = 1; - testfromdrillfile(pkt, &alloc, out, "testdata/test_packets.8"); + testfromdrillfile(pkt, &alloc, out, SRCDIRSTR "/testdata/test_packets.8"); check_formerr_gone = 0; check_rrsigs = 1; check_nosameness = 1; - testfromdrillfile(pkt, &alloc, out, "testdata/test_packets.9"); + testfromdrillfile(pkt, &alloc, out, SRCDIRSTR "/testdata/test_packets.9"); check_nosameness = 0; check_rrsigs = 0; |