mirror of
https://gitlab.freedesktop.org/pipewire/pipewire
synced 2024-10-14 20:02:38 +00:00
test: fail if we can't chdir to $TMPDIR
Otherwise our tests may have unpredictable behavior depending on leftover files in $PWD.
This commit is contained in:
parent
3c798ea413
commit
f9985636de
|
@ -914,8 +914,11 @@ static void run_test(struct pwtest_context *ctx, struct pwtest_suite *c, struct
|
|||
}
|
||||
|
||||
set_test_env(ctx, t);
|
||||
chdir(getenv("TMPDIR"));
|
||||
|
||||
r = chdir(getenv("TMPDIR"));
|
||||
if (r < 0) {
|
||||
t->sig_or_errno = -errno;
|
||||
return;
|
||||
}
|
||||
|
||||
if (t->args.pw_daemon) {
|
||||
pw_daemon = start_pwdaemon(t, write_fds[FD_DAEMON], write_fds[FD_LOG]);
|
||||
|
|
Loading…
Reference in a new issue