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/test/test-journal-importer.c | |
parent | c60b6ddafbd462378073f85e4690455fc3908ad2 (diff) | |
download | systemd-cc100a5a9b135d2a033522a2ec60bec013b6ccd1.tar.gz |
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/test/test-journal-importer.c')
-rw-r--r-- | src/test/test-journal-importer.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/test/test-journal-importer.c b/src/test/test-journal-importer.c index 1f0684863e..a61212ce7b 100644 --- a/src/test/test-journal-importer.c +++ b/src/test/test-journal-importer.c @@ -24,7 +24,7 @@ #include "log.h" #include "journal-importer.h" #include "string-util.h" -#include "test-helper.h" +#include "tests.h" static void assert_iovec_entry(const struct iovec *iovec, const char* content) { assert_se(strlen(content) == iovec->iov_len); @@ -39,7 +39,7 @@ static void test_basic_parsing(void) { _cleanup_(journal_importer_cleanup) JournalImporter imp = {}; int r; - imp.fd = open(TEST_DATA_DIR("/journal-data/journal-1.txt"), O_RDONLY|O_CLOEXEC); + imp.fd = open(get_testdata_dir("/journal-data/journal-1.txt"), O_RDONLY|O_CLOEXEC); assert_se(imp.fd >= 0); do @@ -68,7 +68,7 @@ static void test_bad_input(void) { _cleanup_(journal_importer_cleanup) JournalImporter imp = {}; int r; - imp.fd = open(TEST_DATA_DIR("/journal-data/journal-2.txt"), O_RDONLY|O_CLOEXEC); + imp.fd = open(get_testdata_dir("/journal-data/journal-2.txt"), O_RDONLY|O_CLOEXEC); assert_se(imp.fd >= 0); do |