summaryrefslogtreecommitdiff
path: root/tests/mkdir
diff options
context:
space:
mode:
Diffstat (limited to 'tests/mkdir')
-rwxr-xr-xtests/mkdir/p-14
-rwxr-xr-xtests/mkdir/p-24
-rwxr-xr-xtests/mkdir/p-34
-rwxr-xr-xtests/mkdir/p-v5
-rwxr-xr-xtests/mkdir/special-14
-rwxr-xr-xtests/mkdir/writable-under-readonly5
6 files changed, 16 insertions, 10 deletions
diff --git a/tests/mkdir/p-1 b/tests/mkdir/p-1
index 7ef63be52..a5672743a 100755
--- a/tests/mkdir/p-1
+++ b/tests/mkdir/p-1
@@ -1,7 +1,7 @@
#!/bin/sh
# Test "mkdir -p".
-# Copyright (C) 1997, 2000, 2002, 2006, 2007 Free Software Foundation, Inc.
+# Copyright (C) 1997, 2000, 2002, 2006-2008 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
@@ -27,4 +27,4 @@ fail=0
mkdir --parents "`pwd`/t" || fail=1
test -d t || fail=1
-exit $fail
+(exit $fail); exit $fail
diff --git a/tests/mkdir/p-2 b/tests/mkdir/p-2
index f19a50cde..0659a8e35 100755
--- a/tests/mkdir/p-2
+++ b/tests/mkdir/p-2
@@ -1,7 +1,7 @@
#!/bin/sh
# Just like p-1, but with an absolute path.
-# Copyright (C) 1997, 2000, 2002, 2006, 2007 Free Software Foundation, Inc.
+# Copyright (C) 1997, 2000, 2002, 2006-2008 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
@@ -27,4 +27,4 @@ fail=0
mkdir --parents "`pwd`/t/u" || fail=1
test -d t/u || fail=1
-exit $fail
+(exit $fail); exit $fail
diff --git a/tests/mkdir/p-3 b/tests/mkdir/p-3
index 401091131..e868b520f 100755
--- a/tests/mkdir/p-3
+++ b/tests/mkdir/p-3
@@ -3,7 +3,7 @@
# causes immediate failure. Also, ensure that we don't create
# subsequent, relative command-line arguments in the wrong place.
-# Copyright (C) 2005-2007 Free Software Foundation, Inc.
+# Copyright (C) 2005-2008 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
@@ -52,4 +52,4 @@ b=`ls "$p/a" | tr -d '\n'`
# With coreutils-5.3.0, this would fail with $b=bu.
test "x$b" = xb || fail=1
-exit $fail
+(exit $fail); exit $fail
diff --git a/tests/mkdir/p-v b/tests/mkdir/p-v
index 569e9b072..316c1e939 100755
--- a/tests/mkdir/p-v
+++ b/tests/mkdir/p-v
@@ -24,7 +24,8 @@ fi
. $srcdir/../lang-default
. $srcdir/../test-lib.sh
-mkdir -pv foo/a/b/c/d >out || exit
+fail=0
+mkdir -pv foo/a/b/c/d >out || fail=1
diff - out <<\EOF
mkdir: created directory `foo'
@@ -33,3 +34,5 @@ mkdir: created directory `foo/a/b'
mkdir: created directory `foo/a/b/c'
mkdir: created directory `foo/a/b/c/d'
EOF
+
+(exit $fail); exit $fail
diff --git a/tests/mkdir/special-1 b/tests/mkdir/special-1
index f65d2ae01..800d51065 100755
--- a/tests/mkdir/special-1
+++ b/tests/mkdir/special-1
@@ -1,7 +1,7 @@
#!/bin/sh
# verify that mkdir honors special bits in MODE
-# Copyright (C) 2000, 2006, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2000, 2006-2008 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
@@ -52,4 +52,4 @@ case "$mode" in
*) fail=1 ;;
esac
-exit $fail
+(exit $fail); exit $fail
diff --git a/tests/mkdir/writable-under-readonly b/tests/mkdir/writable-under-readonly
index bf2c2ad37..92d87ab5a 100755
--- a/tests/mkdir/writable-under-readonly
+++ b/tests/mkdir/writable-under-readonly
@@ -1,7 +1,7 @@
#!/bin/sh
# FIXME: convert this to a root-only test.
-# Copyright (C) 2005, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2005, 2007-2008 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
@@ -37,6 +37,7 @@ skip_test_ temporarily disabled
# FIXME: define cleanup_ to do the umount
+fail=0
# FIXME: use mktemp
cd /tmp \
&& dd if=/dev/zero of=1 bs=8192 count=50 \
@@ -52,3 +53,5 @@ mkdir -p mnt-ro/rw/sub || fail=1
# To clean up
umount /tmp/2
umount /tmp/1
+
+(exit $fail); exit $fail