Skip to content

tests/config-file: share tmp_dir with sacrificial subprocess

test_config_file_fallback_per_file() uses g_test_trap_subprocess() to test a code path that is meant to abort the calling application. Because of the way this works, setup() is run both in the parent process and the child process, creating a different temporary directory in both. Since the child process aborts, its teardown() is never run, and that temporary directory is leaked.

Fix this by passing the parent process's temporary directory path to the child in its environment.

Fixes #2 (closed).

Merge request reports