diff options
Diffstat (limited to 'tests/mkdir/parents')
-rwxr-xr-x | tests/mkdir/parents | 30 |
1 files changed, 6 insertions, 24 deletions
diff --git a/tests/mkdir/parents b/tests/mkdir/parents index 27e0d0af3..81302745f 100755 --- a/tests/mkdir/parents +++ b/tests/mkdir/parents @@ -1,7 +1,7 @@ #!/bin/sh # make sure mkdir's -p options works properly -# Copyright (C) 2000, 2004, 2006 Free Software Foundation, Inc. +# Copyright (C) 2000, 2004, 2006, 2007 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 @@ -21,28 +21,10 @@ if test "$VERBOSE" = yes; then mkdir --version fi -pwd=`pwd` -tmp=parents-$$ -trap 'status=$?; cd "$pwd" && rm -rf $tmp && exit $status' 0 -trap '(exit $?); exit' 1 2 13 15 +. $srcdir/../test-lib.sh +. "$abs_top_srcdir/tests/setgid-check" -framework_failure=0 - -# Record absolute path of srcdir. -cd $srcdir || framework_failure=1 -abs_srcdir=`pwd` - -cd "$pwd" || framework_failure=1 -mkdir $tmp || framework_failure=1 -cd $tmp || framework_failure=1 -mkdir -m 700 e-dir || framework_failure=1 - -if test $framework_failure = 1; then - echo 'failure in testing framework' - (exit 1); exit 1 -fi - -. "$abs_srcdir/../setgid-check" +mkdir -m 700 e-dir || framework_failure fail=0 @@ -54,12 +36,12 @@ mkdir e-dir > /dev/null 2>&1 && fail=1 # Create an existing directory. umask 077 mode_str=drwxr-x-wx -mode_arg=`"$abs_srcdir/../rwx-to-mode" $mode_str` +mode_arg=`"$abs_top_srcdir/tests/rwx-to-mode" $mode_str` mkdir -m $mode_arg a || fail=1 # this `mkdir -p ...' shouldn't change perms of existing dir `a'. d_mode_str=drwx-w--wx -d_mode_arg=`"$abs_srcdir/../rwx-to-mode" $d_mode_str` +d_mode_arg=`"$abs_top_srcdir/tests/rwx-to-mode" $d_mode_str` mkdir -p -m $d_mode_arg a/b/c/d # Make sure the permissions of `a' haven't been changed. |