diff options
author | Martin Pitt <martin@piware.de> | 2017-02-15 23:37:25 +0100 |
---|---|---|
committer | Martin Pitt <martin@piware.de> | 2017-02-16 21:45:57 +0100 |
commit | cc100a5a9b135d2a033522a2ec60bec013b6ccd1 (patch) | |
tree | 01940923d7b14f8ae7e7e90962db85d59a9b3fde /src/resolve | |
parent | c60b6ddafbd462378073f85e4690455fc3908ad2 (diff) |
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.
Diffstat (limited to 'src/resolve')
-rw-r--r-- | src/resolve/test-dns-packet.c | 5 |
1 files changed, 2 insertions, 3 deletions
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; } |