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.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user