summaryrefslogtreecommitdiffstats
path: root/tests.sh
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2017-07-08 20:00:47 -0400
committerTavian Barnes <tavianator@tavianator.com>2017-07-08 20:00:47 -0400
commit9c0a5630795690492dd1d372d69d06430e138fac (patch)
tree37b5b08ccf05d665c2876591eeaadeea0d86afc8 /tests.sh
parente991bc786af40623ae118eab9d400d6cd391d8c6 (diff)
downloadbfs-9c0a5630795690492dd1d372d69d06430e138fac.tar.xz
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.
Diffstat (limited to 'tests.sh')
-rwxr-xr-xtests.sh12
1 files changed, 10 insertions, 2 deletions
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