From 9c0a5630795690492dd1d372d69d06430e138fac Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Sat, 8 Jul 2017 20:00:47 -0400 Subject: bftw: Fix ENAMETOOLONG handling when the root is closed The root has depth == 0, but we still need to include it in the components array. --- tests.sh | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'tests.sh') diff --git a/tests.sh b/tests.sh index 872f485..c8aeb63 100755 --- a/tests.sh +++ b/tests.sh @@ -119,7 +119,8 @@ function make_deep() { mkdir "$1/$i" cd "$1/$i" - for j in {1..16}; do + # 17 * 256 > 16 * 256 == 4096 == PATH_MAX + for j in {1..17}; do mkdir "$name" cd "$name" done @@ -196,6 +197,7 @@ posix_tests=( test_a test_o test_deep + test_deep_strict ) bsd_tests=( @@ -1149,7 +1151,13 @@ function test_colors() { function test_deep() { ulimit -n 8 - bfs_diff deep -mindepth 17 + bfs_diff deep -mindepth 18 +} + +function test_deep_strict() { + # Not even enough fds to keep the root open + ulimit -n 6 + bfs_diff deep -mindepth 18 } passed=0 -- cgit v1.2.3