summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2024-03-27 15:15:12 -0400
committerTavian Barnes <tavianator@tavianator.com>2024-03-27 15:15:12 -0400
commit5b58f0223c18aed1b2bd3e8224a3f2f3760e9ada (patch)
treecad2bc48b9d5a995bb2bda1148828ccac8b61886 /tests
parentbca78d2597c78b0166d76d023eee1354f5abd04e (diff)
downloadbfs-5b58f0223c18aed1b2bd3e8224a3f2f3760e9ada.tar.xz
tests/xspawn: Also test dup2()
Diffstat (limited to 'tests')
-rw-r--r--tests/xspawn.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/xspawn.c b/tests/xspawn.c
index e356842..d1d5473 100644
--- a/tests/xspawn.c
+++ b/tests/xspawn.c
@@ -72,8 +72,10 @@ static bool check_path_resolution(bool use_posix) {
}
ret &= bfs_pcheck(bfs_spawn_addopen(&spawn, 10, bin, O_RDONLY | O_DIRECTORY, 0) == 0);
- ret &= bfs_pcheck(bfs_spawn_addfchdir(&spawn, 10) == 0);
+ ret &= bfs_pcheck(bfs_spawn_adddup2(&spawn, 10, 11) == 0);
ret &= bfs_pcheck(bfs_spawn_addclose(&spawn, 10) == 0);
+ ret &= bfs_pcheck(bfs_spawn_addfchdir(&spawn, 11) == 0);
+ ret &= bfs_pcheck(bfs_spawn_addclose(&spawn, 11) == 0);
if (!ret) {
goto bin;
}