summaryrefslogtreecommitdiff
path: root/src/resolve/test-dns-packet.c
diff options
context:
space:
mode:
authorFilipe Brandenburger <filbranden@google.com>2018-09-11 23:15:09 -0700
committerFilipe Brandenburger <filbranden@google.com>2018-09-12 09:49:03 -0700
commit55890a40c3ec0c061c04d1395a38c26313132d12 (patch)
tree93b3f267b25b6bc894d72e6e52cdafde89674dd0 /src/resolve/test-dns-packet.c
parent87ead8e2983209a3974473824ac657bacd9e1014 (diff)
downloadsystemd-55890a40c3ec0c061c04d1395a38c26313132d12.tar.gz
test: remove support for suffix in get_testdata_dir()
Instead, use path_join() in callers wherever needed.
Diffstat (limited to 'src/resolve/test-dns-packet.c')
-rw-r--r--src/resolve/test-dns-packet.c5
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;
}