diff options
Diffstat (limited to 'tests/du')
-rwxr-xr-x | tests/du/2g | 8 | ||||
-rwxr-xr-x | tests/du/8gb | 8 | ||||
-rwxr-xr-x | tests/du/basic | 8 | ||||
-rwxr-xr-x | tests/du/deref | 8 | ||||
-rwxr-xr-x | tests/du/deref-args | 8 | ||||
-rwxr-xr-x | tests/du/exclude | 8 | ||||
-rwxr-xr-x | tests/du/fd-leak | 8 | ||||
-rwxr-xr-x | tests/du/hard-link | 8 | ||||
-rwxr-xr-x | tests/du/inacc-dest | 8 | ||||
-rwxr-xr-x | tests/du/inacc-dir | 8 | ||||
-rwxr-xr-x | tests/du/inaccessible-cwd | 8 | ||||
-rwxr-xr-x | tests/du/long-from-unreadable | 8 | ||||
-rwxr-xr-x | tests/du/long-sloop | 8 | ||||
-rwxr-xr-x | tests/du/no-deref | 8 | ||||
-rwxr-xr-x | tests/du/no-x | 8 | ||||
-rwxr-xr-x | tests/du/one-file-system | 8 | ||||
-rwxr-xr-x | tests/du/restore-wd | 8 | ||||
-rwxr-xr-x | tests/du/slash | 8 | ||||
-rwxr-xr-x | tests/du/slink | 8 | ||||
-rwxr-xr-x | tests/du/trailing-slash | 8 | ||||
-rwxr-xr-x | tests/du/two-args | 8 |
21 files changed, 42 insertions, 126 deletions
diff --git a/tests/du/2g b/tests/du/2g index 61bbebce8..0021fdadc 100755 --- a/tests/du/2g +++ b/tests/du/2g @@ -18,12 +18,8 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -if test "$VERBOSE" = yes; then - set -x - du --version -fi - -. $srcdir/test-lib.sh +. "${srcdir=.}/init.sh"; path_prepend_ ../src +test "$VERBOSE" = yes && du --version # Creating a 2GB file counts as `very expensive'. very_expensive_ diff --git a/tests/du/8gb b/tests/du/8gb index 8043b8ae8..f416111ed 100755 --- a/tests/du/8gb +++ b/tests/du/8gb @@ -17,12 +17,8 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -if test "$VERBOSE" = yes; then - set -x - du --version -fi - -. $srcdir/test-lib.sh +. "${srcdir=.}/init.sh"; path_prepend_ ../src +test "$VERBOSE" = yes && du --version require_sparse_support_ dd bs=1 seek=8G of=big < /dev/null 2> /dev/null diff --git a/tests/du/basic b/tests/du/basic index 6d3eeb1e7..b96d861c8 100755 --- a/tests/du/basic +++ b/tests/du/basic @@ -16,12 +16,8 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -if test "$VERBOSE" = yes; then - set -x - du --version -fi - -. $srcdir/test-lib.sh +. "${srcdir=.}/init.sh"; path_prepend_ ../src +test "$VERBOSE" = yes && du --version mkdir -p a/b d d/sub || framework_failure diff --git a/tests/du/deref b/tests/du/deref index 8e4feac3b..0dbf4854e 100755 --- a/tests/du/deref +++ b/tests/du/deref @@ -19,12 +19,8 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -if test "$VERBOSE" = yes; then - set -x - du --version -fi - -. $srcdir/test-lib.sh +. "${srcdir=.}/init.sh"; path_prepend_ ../src +test "$VERBOSE" = yes && du --version mkdir -p a/sub || framework_failure ln -s a/sub slink || framework_failure diff --git a/tests/du/deref-args b/tests/du/deref-args index 57118f741..1743b0448 100755 --- a/tests/du/deref-args +++ b/tests/du/deref-args @@ -17,12 +17,8 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -if test "$VERBOSE" = yes; then - set -x - du --version -fi - -. $srcdir/test-lib.sh +. "${srcdir=.}/init.sh"; path_prepend_ ../src +test "$VERBOSE" = yes && du --version mkdir -p dir/a || framework_failure ln -s dir slink || framework_failure diff --git a/tests/du/exclude b/tests/du/exclude index 9649623b0..d3295cf68 100755 --- a/tests/du/exclude +++ b/tests/du/exclude @@ -16,12 +16,8 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -if test "$VERBOSE" = yes; then - set -x - du --version -fi - -. $srcdir/test-lib.sh +. "${srcdir=.}/init.sh"; path_prepend_ ../src +test "$VERBOSE" = yes && du --version mkdir -p a/b/c a/x/y a/u/v || framework_failure diff --git a/tests/du/fd-leak b/tests/du/fd-leak index ac9274e36..728ce0533 100755 --- a/tests/du/fd-leak +++ b/tests/du/fd-leak @@ -16,12 +16,8 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -if test "$VERBOSE" = yes; then - set -x - du --version -fi - -. $srcdir/test-lib.sh +. "${srcdir=.}/init.sh"; path_prepend_ ../src +test "$VERBOSE" = yes && du --version # Call this an expensive test. It's not that expensive, but command line # limitations might induce failure on some losing systems. diff --git a/tests/du/hard-link b/tests/du/hard-link index e22320b56..68a7e2245 100755 --- a/tests/du/hard-link +++ b/tests/du/hard-link @@ -18,12 +18,8 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -if test "$VERBOSE" = yes; then - set -x - du --version -fi - -. $srcdir/test-lib.sh +. "${srcdir=.}/init.sh"; path_prepend_ ../src +test "$VERBOSE" = yes && du --version mkdir -p dir/sub ( cd dir && diff --git a/tests/du/inacc-dest b/tests/du/inacc-dest index 4c7b9b875..24242815d 100755 --- a/tests/du/inacc-dest +++ b/tests/du/inacc-dest @@ -17,12 +17,8 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -if test "$VERBOSE" = yes; then - set -x - du --version -fi - -. $srcdir/test-lib.sh +. "${srcdir=.}/init.sh"; path_prepend_ ../src +test "$VERBOSE" = yes && du --version skip_if_root_ mkdir f && cd f && mkdir a b c d e && touch c/j && chmod a-x c \ diff --git a/tests/du/inacc-dir b/tests/du/inacc-dir index 8504d6438..0be254c78 100755 --- a/tests/du/inacc-dir +++ b/tests/du/inacc-dir @@ -15,12 +15,8 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -if test "$VERBOSE" = yes; then - set -x - du --version -fi - -. $srcdir/test-lib.sh +. "${srcdir=.}/init.sh"; path_prepend_ ../src +test "$VERBOSE" = yes && du --version skip_if_root_ mkdir -p a/sub || framework_failure diff --git a/tests/du/inaccessible-cwd b/tests/du/inaccessible-cwd index 1a4bf9fe6..a1656b217 100755 --- a/tests/du/inaccessible-cwd +++ b/tests/du/inaccessible-cwd @@ -20,12 +20,8 @@ # Before the switch to an fts-based implementation in coreutils 5.0.92, # this test would fail. -if test "$VERBOSE" = yes; then - set -x - du --version -fi - -. $srcdir/test-lib.sh +. "${srcdir=.}/init.sh"; path_prepend_ ../src +test "$VERBOSE" = yes && du --version skip_if_root_ cwd=`pwd` diff --git a/tests/du/long-from-unreadable b/tests/du/long-from-unreadable index 73d32a676..2b38e69e7 100755 --- a/tests/du/long-from-unreadable +++ b/tests/du/long-from-unreadable @@ -28,12 +28,8 @@ # on Linux+PROC_FS systems because its fts implementation would revert # unnecessarily to using FTS_NOCHDIR mode in this corner case. -if test "$VERBOSE" = yes; then - set -x - du --version -fi - -. $srcdir/test-lib.sh +. "${srcdir=.}/init.sh"; path_prepend_ ../src +test "$VERBOSE" = yes && du --version proc_file=/proc/self/fd if test ! -d $proc_file; then diff --git a/tests/du/long-sloop b/tests/du/long-sloop index 06843dcc3..391174a3d 100755 --- a/tests/du/long-sloop +++ b/tests/du/long-sloop @@ -18,12 +18,8 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -if test "$VERBOSE" = yes; then - set -x - du --version -fi - -. $srcdir/test-lib.sh +. "${srcdir=.}/init.sh"; path_prepend_ ../src +test "$VERBOSE" = yes && du --version # Create lots of directories, each containing a single symlink # pointing at the next directory in the list. diff --git a/tests/du/no-deref b/tests/du/no-deref index 4aa3a5672..d56bc753e 100755 --- a/tests/du/no-deref +++ b/tests/du/no-deref @@ -16,12 +16,8 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -if test "$VERBOSE" = yes; then - set -x - du --version -fi - -. $srcdir/test-lib.sh +. "${srcdir=.}/init.sh"; path_prepend_ ../src +test "$VERBOSE" = yes && du --version mkdir -p dir/a/b || framework_failure ln -s dir slink || framework_failure diff --git a/tests/du/no-x b/tests/du/no-x index bf00ec647..580b527a4 100755 --- a/tests/du/no-x +++ b/tests/du/no-x @@ -17,12 +17,8 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -if test "$VERBOSE" = yes; then - set -x - du --version -fi - -. $srcdir/test-lib.sh +. "${srcdir=.}/init.sh"; path_prepend_ ../src +test "$VERBOSE" = yes && du --version skip_if_root_ mkdir -p d/no-x/y || framework_failure diff --git a/tests/du/one-file-system b/tests/du/one-file-system index 53ca9ebfc..bb4d7cba1 100755 --- a/tests/du/one-file-system +++ b/tests/du/one-file-system @@ -17,12 +17,8 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -if test "$VERBOSE" = yes; then - set -x - du --version -fi - -. $srcdir/test-lib.sh +. "${srcdir=.}/init.sh"; path_prepend_ ../src +test "$VERBOSE" = yes && du --version mkdir -p b/c y/z || framework_failure diff --git a/tests/du/restore-wd b/tests/du/restore-wd index 8bddf014e..bb2b165c5 100755 --- a/tests/du/restore-wd +++ b/tests/du/restore-wd @@ -17,12 +17,8 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -if test "$VERBOSE" = yes; then - set -x - du --version -fi - -. $srcdir/test-lib.sh +. "${srcdir=.}/init.sh"; path_prepend_ ../src +test "$VERBOSE" = yes && du --version mkdir a b || framework_failure diff --git a/tests/du/slash b/tests/du/slash index 1a849bb10..3434e3ef3 100755 --- a/tests/du/slash +++ b/tests/du/slash @@ -16,12 +16,8 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -if test "$VERBOSE" = yes; then - set -x - du --version -fi - -. $srcdir/test-lib.sh +. "${srcdir=.}/init.sh"; path_prepend_ ../src +test "$VERBOSE" = yes && du --version require_readable_root_ diff --git a/tests/du/slink b/tests/du/slink index 5c2b125c7..092ea1292 100755 --- a/tests/du/slink +++ b/tests/du/slink @@ -16,12 +16,8 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -if test "$VERBOSE" = yes; then - set -x - du --version -fi - -. $srcdir/test-lib.sh +. "${srcdir=.}/init.sh"; path_prepend_ ../src +test "$VERBOSE" = yes && du --version # Determine if `.' is on a local (would non-NFS be sufficient?) file system. # At least on OSF/1 4.0d, when using an nfsv3 file system, diff --git a/tests/du/trailing-slash b/tests/du/trailing-slash index 87fe62a69..70549a80d 100755 --- a/tests/du/trailing-slash +++ b/tests/du/trailing-slash @@ -19,12 +19,8 @@ # Before coreutils-4.5.3, it would remove a single trailing slash. -if test "$VERBOSE" = yes; then - set -x - du --version -fi - -. $srcdir/test-lib.sh +. "${srcdir=.}/init.sh"; path_prepend_ ../src +test "$VERBOSE" = yes && du --version mkdir -p dir/1/2 || framework_failure ln -s dir slink || framework_failure diff --git a/tests/du/two-args b/tests/du/two-args index e679921fe..ed544b091 100755 --- a/tests/du/two-args +++ b/tests/du/two-args @@ -17,12 +17,8 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -if test "$VERBOSE" = yes; then - set -x - du --version -fi - -. $srcdir/test-lib.sh +. "${srcdir=.}/init.sh"; path_prepend_ ../src +test "$VERBOSE" = yes && du --version # Run this test from a sub-directory one level deeper than normal, # so that the "du .." below doesn't traverse sibling directories |