srcdir=$(srcdir) \
CU_TEST_NAME=`basename $(abs_srcdir)`,$$tst \
PATH="$(VG_PATH_PREFIX)`pwd`/../../src$(PATH_SEPARATOR)$$PATH"
+
+include $(top_srcdir)/tests/check.mk
+++ /dev/null
-#!/bin/sh
-# Test whether "mkdir -p" works concurrently.
-
-# Copyright (C) 1999, 2000, 2002, 2006 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
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-# TMPDIR should be an absolute dir for this test.
-# FIXME: enforce it
-: ${TMPDIR=/tmp}
-
-if test "$VERBOSE" = yes; then
- set -x
- mkdir --version
-fi
-
-pwd=`pwd`
-tmp=`echo "$0"|sed 's,.*/,,'`.tmp
-trap 'status=$?; cd "$pwd" && rm -rf $tmp && exit $status' 0
-trap '(exit $?); exit' 1 2 13 15
-
-mkdir --parents "$pwd/$tmp/a/b/c" || fail=1
-
-test -d $tmp || fail=1
-
-exit $fail
#!/bin/sh
# Test "mkdir -p".
-# Copyright (C) 1997, 2000, 2002, 2006 Free Software Foundation, Inc.
+# Copyright (C) 1997, 2000, 2002, 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
mkdir --version
fi
-pwd=`pwd`
-tmp=`echo "$0"|sed 's,.*/,,'`.tmp
-trap 'status=$?; cd "$pwd" && rm -rf $tmp && exit $status' 0
-trap '(exit $?); exit' 1 2 13 15
+. $srcdir/../test-lib.sh
-mkdir --parents "$pwd/$tmp" || fail=1
-
-test -d $tmp || fail=1
+fail=0
+mkdir --parents "`pwd`/t" || fail=1
+test -d t || fail=1
exit $fail
#!/bin/sh
# Just like p-1, but with an absolute path.
-# Copyright (C) 1997, 2000, 2002, 2006 Free Software Foundation, Inc.
+# Copyright (C) 1997, 2000, 2002, 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
mkdir --version
fi
-pwd=`pwd`
-tmp=`echo "$0"|sed 's,.*/,,'`.tmp
-trap 'status=$?; cd "$pwd" && rm -rf $tmp && exit $status' 0
-trap '(exit $?); exit' 1 2 13 15
+. $srcdir/../test-lib.sh
-mkdir --parents $tmp || fail=1
-
-test -d $tmp || fail=1
+fail=0
+mkdir --parents "`pwd`/t/u" || fail=1
+test -d t/u || fail=1
exit $fail
fi
PRIV_CHECK_ARG=require-non-root . $srcdir/../priv-check
+. $srcdir/../test-lib.sh
-pwd=`pwd`
-t0=`echo "$0"|sed 's,.*/,,'`.tmp; tmp=$t0/$$
-trap 'status=$?; cd "$pwd" && chmod -R u+rwx $t0 && rm -rf $t0 && exit $status' 0
-trap '(exit $?); exit $?' 1 2 13 15
+mkdir no-access || framework_failure
+mkdir no-acce2s || framework_failure
+mkdir -p no-acce3s/d || framework_failure
-framework_failure=0
-mkdir -p $tmp || framework_failure=1
-cd $tmp || framework_failure=1
-mkdir no-access || framework_failure=1
-mkdir no-acce2s || framework_failure=1
-mkdir -p no-acce3s/d || framework_failure=1
-
-if test $framework_failure = 1; then
- echo "$0: failure in testing framework" 1>&2
- (exit 1); exit 1
-fi
-
-p=$pwd/$tmp
+p=`pwd`
(cd no-access && chmod 0 . && mkdir -p "$p/a/b" u/v) 2> /dev/null && fail=1
test -d "$p/a/b" || fail=1
#!/bin/sh
# Ensure that mkdir -p works with arguments specified with a trailing "/.".
-# Copyright (C) 2005, 2006 Free Software Foundation, Inc.
+# Copyright (C) 2005-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
mkdir --version
fi
-pwd=`pwd`
-tmp=`echo "$0"|sed 's,.*/,,'`.tmp
-trap 'status=$?; cd "$pwd" && rm -rf $tmp && exit $status' 0
-trap '(exit $?); exit' 1 2 13 15
-
-framework_failure=0
-mkdir $tmp || framework_failure=1
-cd $tmp || framework_failure=1
-
-if test $framework_failure = 1; then
- echo 'failure in testing framework'
- (exit 1); exit 1
-fi
+. $srcdir/../test-lib.sh
fail=0
#!/bin/sh
# Ensure that mkdir -p foo/bar works when foo is a symbolic link to a directory
-# Copyright (C) 2005, 2006 Free Software Foundation, Inc.
+# Copyright (C) 2005-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
mkdir --version
fi
-pwd=`pwd`
-t0=`echo "$0"|sed 's,.*/,,'`.tmp; tmp=$t0/$$
-trap 'status=$?; cd "$pwd" && chmod -R u+rwx $t0 && rm -rf $t0 && exit $status' 0
-trap '(exit $?); exit $?' 1 2 13 15
+. $srcdir/../test-lib.sh
-framework_failure=0
-mkdir -p $tmp || framework_failure=1
-cd $tmp || framework_failure=1
-ln -s . slink || framework_failure=1
-
-if test $framework_failure = 1; then
- echo "$0: failure in testing framework" 1>&2
- (exit 1); exit 1
-fi
+ln -s . slink || framework_failure
fail=0
-
mkdir -p slink/x || fail=1
test -d x || fail=1
#!/bin/sh
# Test mkdir -pv.
-# Copyright (C) 2006 Free Software Foundation, Inc.
+# Copyright (C) 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
mkdir --version
fi
-# Make sure we get English translations.
-LANGUAGE=C
-export LANGUAGE
-LC_ALL=C
-export LC_ALL
-LANG=C
-export LANG
-
-pwd=`pwd`
-t0=`echo "$0"|sed 's,.*/,,'`.tmp; tmp=$t0/$$
-trap 'status=$?; cd "$pwd" && rm -rf $t0 && exit $status' 0
-trap '(exit $?); exit $?' 1 2 13 15
-
-framework_failure=0
-mkdir -p $tmp || framework_failure=1
-cd $tmp || framework_failure=1
-
-if test $framework_failure = 1; then
- echo "$0: failure in testing framework" 1>&2
- (exit 1); exit 1
-fi
+. $srcdir/../lang-default
+. $srcdir/../test-lib.sh
mkdir -pv foo/a/b/c/d 2>out || exit
#!/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
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
# 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.
# Verify that mkdir's `-m MODE' option works properly
# with various umask settings.
-# Copyright (C) 2000, 2002, 2003, 2004, 2005, 2006 Free Software
-# Foundation, Inc.
+# Copyright (C) 2000, 2002-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
mkdir --version
fi
-pwd=`pwd`
-t0=`echo "$0"|sed 's,.*/,,'`.tmp; tmp=$t0/$$
-trap 'status=$?; cd "$pwd" && chmod -R u+rwx $t0 && rm -rf $t0 && exit $status' 0
-trap '(exit $?); exit' 1 2 13 15
-
-framework_failure=0
-
-# Record absolute path of srcdir and cd back to current dir.
-cd $srcdir || framework_failure=1
-abs_srcdir=`pwd`
-cd "$pwd" || framework_failure=1
-
-mkdir -p $tmp || framework_failure=1
-cd $tmp || framework_failure=1
-
-if test $framework_failure = 1; then
- echo 'failure in testing framework'
- (exit 1); exit 1
-fi
-
-. "$abs_srcdir/../setgid-check"
-. "$abs_srcdir/../umask-check"
+. $srcdir/../test-lib.sh
+. "$abs_top_srcdir/tests/setgid-check"
+. "$abs_top_srcdir/tests/umask-check"
fail=0
#!/bin/sh
# verify that mkdir honors special bits in MODE
-# Copyright (C) 2000, 2006 Free Software Foundation, Inc.
+# Copyright (C) 2000, 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
mkdir --version
fi
-tmp=mkdir-sp-$$
-trap 'status=$?; rm -rf $tmp && exit $status' 0
-trap 'exit $?' 1 2 13 15
+. $srcdir/../test-lib.sh
set_mode_string=u=rwx,g=rx,o=w,-s,+t
output_mode_string=drwxr-x-wT
+tmp=t
mkdir -m$set_mode_string $tmp || fail=1
test -d $tmp || fail=1
# Ensure that mkdir works with arguments specified with and without
# a trailing slash.
-# 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
mkdir --version
fi
-pwd=`pwd`
-tmp=t-slash.$$
-trap 'status=$?; cd "$pwd" && rm -rf $tmp && exit $status' 0
-trap '(exit $?); exit' 1 2 13 15
-
-framework_failure=0
-mkdir $tmp || framework_failure=1
-cd $tmp || framework_failure=1
-
-if test $framework_failure = 1; then
- echo 'failure in testing framework'
- (exit 1); exit 1
-fi
+. $srcdir/../test-lib.sh
fail=0