summaryrefslogtreecommitdiffstats
path: root/src/resolve
diff options
context:
space:
mode:
authorFilipe Brandenburger <filbranden@google.com>2018-09-12 08:15:09 +0200
committerFilipe Brandenburger <filbranden@google.com>2018-09-12 18:49:03 +0200
commit55890a40c3ec0c061c04d1395a38c26313132d12 (patch)
tree93b3f267b25b6bc894d72e6e52cdafde89674dd0 /src/resolve
parentSet theme jekyll-theme-slate (diff)
downloadsystemd-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.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;
}