summaryrefslogtreecommitdiff
path: root/tests/rm/deep-2.sh
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2014-09-30 18:22:54 +0400
committerIgor Pashev <pashev.igor@gmail.com>2014-09-30 18:22:54 +0400
commit08bc9e01c274a01d107b348f921e1c74dd04bd3a (patch)
tree25348bff03c29d9dd6c6dd96bf82c7c9f9265ccf /tests/rm/deep-2.sh
parentb9c7373f203ab77c58cb6b131f8b58236ea337a2 (diff)
parentc18578632fd3c9e513e613a86ba2b7c4ebee6c45 (diff)
downloadcoreutils-08bc9e01c274a01d107b348f921e1c74dd04bd3a.tar.gz
Merge tag 'upstream/8.23'
Upstream version 8.23
Diffstat (limited to 'tests/rm/deep-2.sh')
-rwxr-xr-xtests/rm/deep-2.sh9
1 files changed, 7 insertions, 2 deletions
diff --git a/tests/rm/deep-2.sh b/tests/rm/deep-2.sh
index a03cd965..c3ea0856 100755
--- a/tests/rm/deep-2.sh
+++ b/tests/rm/deep-2.sh
@@ -1,7 +1,7 @@
#!/bin/sh
# Ensure rm -r DIR does not prompt for very long full relative names in DIR.
-# Copyright (C) 2008-2013 Free Software Foundation, Inc.
+# Copyright (C) 2008-2014 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -25,6 +25,11 @@ require_perl_
# the offending euidaccess_stat call.
skip_if_root_
+# ecryptfs for example uses some of the file name space
+# for encrypting filenames, so we must check dynamically.
+name_max=$(stat -f -c %l .)
+test "$name_max" -ge '200' || skip_ "NAME_MAX=$name_max is not sufficient"
+
mkdir x || framework_failure_
cd x || framework_failure_
@@ -41,7 +46,7 @@ echo n > no || framework_failure_
rm ---presume-input-tty -r x < no > out || fail=1
# expect empty output
-test -s out && fail=1
+compare /dev/null out || fail=1
# the directory must have been removed
test -d x && fail=1