From 622bcf9d46a763b7aaba75fa8421533bcbe4b981 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Sun, 12 Nov 2017 13:11:58 -0500 Subject: exec: Recover from E2BIG --- tests.sh | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'tests.sh') diff --git a/tests.sh b/tests.sh index 387562b..0585ff4 100755 --- a/tests.sh +++ b/tests.sh @@ -401,6 +401,7 @@ bfs_tests=( test_expr_path_flag test_colors test_deep_strict + test_deep_stricter ) BSD=yes @@ -1369,6 +1370,14 @@ function test_deep_strict() { closefrom 4 # Not even enough fds to keep the root open + ulimit -n 7 + bfs_diff deep -mindepth 18 -exec /bin/bash -c 'echo "${1:0:6}/.../${1##*/} (${#1})"' /bin/bash '{}' \; +} + +function test_deep_stricter() { + closefrom 4 + + # So few fds that pipe() fails in the -exec implementation ulimit -n 6 bfs_diff deep -mindepth 18 -exec /bin/bash -c 'echo "${1:0:6}/.../${1##*/} (${#1})"' /bin/bash '{}' \; } -- cgit v1.2.3