From cc100a5a9b135d2a033522a2ec60bec013b6ccd1 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Wed, 15 Feb 2017 23:37:25 +0100 Subject: test: drop TEST_DATA_DIR, fold into get_testdata_dir() Drop the TEST_DATA_DIR macro as this was using alloca() within a function call which is allegedly unsafe. So add a "suffix" argument to get_testdata_dir() instead and call that directly. --- src/resolve/test-dns-packet.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/resolve') diff --git a/src/resolve/test-dns-packet.c b/src/resolve/test-dns-packet.c index 3ca7e78495..8cbe492526 100644 --- a/src/resolve/test-dns-packet.c +++ b/src/resolve/test-dns-packet.c @@ -29,10 +29,9 @@ #include "resolved-dns-rr.h" #include "string-util.h" #include "strv.h" +#include "tests.h" #include "unaligned.h" -#include "test-helper.h" - #define HASH_KEY SD_ID128_MAKE(d3,1e,48,90,4b,fa,4c,fe,af,9d,d5,a1,d7,2e,8a,b1) static void verify_rr_copy(DnsResourceRecord *rr) { @@ -117,7 +116,7 @@ int main(int argc, char **argv) { N = argc - 1; fnames = argv + 1; } else { - assert_se(glob(TEST_DATA_DIR("/test-resolve/*.pkts"), GLOB_NOSORT, NULL, &g) == 0); + assert_se(glob(get_testdata_dir("/test-resolve/*.pkts"), GLOB_NOSORT, NULL, &g) == 0); N = g.gl_pathc; fnames = g.gl_pathv; } -- cgit v1.2.3-54-g00ecf