diff options
author | Filipe Brandenburger <filbranden@google.com> | 2018-09-12 08:15:09 +0200 |
---|---|---|
committer | Filipe Brandenburger <filbranden@google.com> | 2018-09-12 18:49:03 +0200 |
commit | 55890a40c3ec0c061c04d1395a38c26313132d12 (patch) | |
tree | 93b3f267b25b6bc894d72e6e52cdafde89674dd0 /src/resolve | |
parent | Set theme jekyll-theme-slate (diff) | |
download | systemd-55890a40c3ec0c061c04d1395a38c26313132d12.tar.xz systemd-55890a40c3ec0c061c04d1395a38c26313132d12.zip |
test: remove support for suffix in get_testdata_dir()
Instead, use path_join() in callers wherever needed.
Diffstat (limited to 'src/resolve')
-rw-r--r-- | src/resolve/test-dns-packet.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/resolve/test-dns-packet.c b/src/resolve/test-dns-packet.c index 905f000dc2..0dac05e7be 100644 --- a/src/resolve/test-dns-packet.c +++ b/src/resolve/test-dns-packet.c @@ -12,6 +12,7 @@ #include "macro.h" #include "resolved-dns-packet.h" #include "resolved-dns-rr.h" +#include "path-util.h" #include "string-util.h" #include "strv.h" #include "tests.h" @@ -92,6 +93,7 @@ static void test_packet_from_file(const char* filename, bool canonical) { int main(int argc, char **argv) { int i, N; + _cleanup_free_ char *pkts_glob = NULL; _cleanup_globfree_ glob_t g = {}; char **fnames; @@ -101,7 +103,8 @@ int main(int argc, char **argv) { N = argc - 1; fnames = argv + 1; } else { - assert_se(glob(get_testdata_dir("/test-resolve/*.pkts"), GLOB_NOSORT, NULL, &g) == 0); + pkts_glob = path_join(NULL, get_testdata_dir(), "test-resolve/*.pkts"); + assert_se(glob(pkts_glob, GLOB_NOSORT, NULL, &g) == 0); N = g.gl_pathc; fnames = g.gl_pathv; } |