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:
Martin Pitt
2017-02-16 21:45:57 +01:00
parent c60b6ddafb
commit cc100a5a9b
10 changed files with 36 additions and 36 deletions
+1 -1
View File
@@ -38,7 +38,7 @@ int main(int argc, char *argv[]) {
int r;
/* prepare the test */
assert_se(set_unit_path(TEST_DATA_DIR("")) >= 0);
assert_se(set_unit_path(get_testdata_dir("")) >= 0);
assert_se(runtime_dir = setup_fake_runtime_dir());
r = manager_new(UNIT_FILE_USER, true, &m);
if (MANAGER_SKIP_TEST(r)) {