mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04: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
1 changed files with 5 additions and 2 deletions
|
|
@ -914,8 +914,11 @@ static void run_test(struct pwtest_context *ctx, struct pwtest_suite *c, struct
|
||||||
}
|
}
|
||||||
|
|
||||||
set_test_env(ctx, t);
|
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) {
|
if (t->args.pw_daemon) {
|
||||||
pw_daemon = start_pwdaemon(t, write_fds[FD_DAEMON], write_fds[FD_LOG]);
|
pw_daemon = start_pwdaemon(t, write_fds[FD_DAEMON], write_fds[FD_LOG]);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue