From 5b58f0223c18aed1b2bd3e8224a3f2f3760e9ada Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Wed, 27 Mar 2024 15:15:12 -0400 Subject: tests/xspawn: Also test dup2() --- tests/xspawn.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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; } -- cgit v1.2.3