diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2017-11-12 13:11:58 -0500 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2017-11-12 15:17:46 -0500 |
commit | 622bcf9d46a763b7aaba75fa8421533bcbe4b981 (patch) | |
tree | b1e7bfe8f1a108f13a1bd6d8bf03c2d852a1ce09 /tests.sh | |
parent | af7878c7474de2f6c5542ad52a0a67237387c638 (diff) | |
download | bfs-622bcf9d46a763b7aaba75fa8421533bcbe4b981.tar.xz |
exec: Recover from E2BIG
Diffstat (limited to 'tests.sh')
-rwxr-xr-x | tests.sh | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -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 '{}' \; } |