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:
@@ -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)) {
|
||||
|
||||
Reference in New Issue
Block a user