Skip tests that require a filesystem that obeys POSIX permissions
Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Johannes Sixt committed
Mar 13, 2009 at 22:55 UTC
ee9fb68c392cc76cf2a56762eb1c0712ae722f08
6 files changed
+23
-19
t/t0004-unwritable.sh
+4
-4
@@ -15,7 +15,7 @@ test_expect_success setup '
15
16
'
17
18
-test_expect_success 'write-tree should notice unwritable repository' '
18
+test_expect_success POSIXPERM 'write-tree should notice unwritable repository' '
19
20
(
21
chmod a-w .git/objects .git/objects/?? &&
@@ -27,7 +27,7 @@ test_expect_success 'write-tree should notice unwritable repository' '
27
28
'
29
30
-test_expect_success 'commit should notice unwritable repository' '
30
+test_expect_success POSIXPERM 'commit should notice unwritable repository' '
31
32
(
33
chmod a-w .git/objects .git/objects/?? &&
@@ -39,7 +39,7 @@ test_expect_success 'commit should notice unwritable repository' '
39
40
'
41
42
-test_expect_success 'update-index should notice unwritable repository' '
42
+test_expect_success POSIXPERM 'update-index should notice unwritable repository' '
43
44
(
45
echo 6O >file &&
@@ -52,7 +52,7 @@ test_expect_success 'update-index should notice unwritable repository' '
52
53
'
54
55
-test_expect_success 'add should notice unwritable repository' '
55
+test_expect_success POSIXPERM 'add should notice unwritable repository' '
56
57
(
58
echo b >file &&
t/t1301-shared-repo.sh
+5
-5
@@ -26,7 +26,7 @@ modebits () {
26
27
for u in 002 022
28
do
29
- test_expect_success "shared=1 does not clear bits preset by umask $u" '
29
+ test_expect_success POSIXPERM "shared=1 does not clear bits preset by umask $u" '
30
mkdir sub && (
31
cd sub &&
32
umask $u &&
@@ -54,7 +54,7 @@ test_expect_success 'shared=all' '
54
test 2 = $(git config core.sharedrepository)
55
'
56
57
-test_expect_success 'update-server-info honors core.sharedRepository' '
57
+test_expect_success POSIXPERM 'update-server-info honors core.sharedRepository' '
58
: > a1 &&
59
git add a1 &&
60
test_tick &&
@@ -85,7 +85,7 @@ do
85
git config core.sharedrepository "$u" &&
86
umask 0277 &&
87
88
- test_expect_success "shared = $u ($y) ro" '
88
+ test_expect_success POSIXPERM "shared = $u ($y) ro" '
89
90
rm -f .git/info/refs &&
91
git update-server-info &&
@@ -97,7 +97,7 @@ do
97
'
98
99
umask 077 &&
100
- test_expect_success "shared = $u ($x) rw" '
100
+ test_expect_success POSIXPERM "shared = $u ($x) rw" '
101
102
rm -f .git/info/refs &&
103
git update-server-info &&
@@ -111,7 +111,7 @@ do
111
112
done
113
114
-test_expect_success 'git reflog expire honors core.sharedRepository' '
114
+test_expect_success POSIXPERM 'git reflog expire honors core.sharedRepository' '
115
git config core.sharedRepository group &&
116
git reflog expire --all &&
117
actual="$(ls -l .git/logs/refs/heads/master)" &&
t/t3700-add.sh
+4
-4
@@ -179,7 +179,7 @@ test_expect_success 'git add --refresh' '
179
test -z "`git diff-index HEAD -- foo`"
180
'
181
182
-test_expect_success 'git add should fail atomically upon an unreadable file' '
182
+test_expect_success POSIXPERM 'git add should fail atomically upon an unreadable file' '
183
git reset --hard &&
184
date >foo1 &&
185
date >foo2 &&
@@ -190,7 +190,7 @@ test_expect_success 'git add should fail atomically upon an unreadable file' '
190
191
rm -f foo2
192
193
-test_expect_success 'git add --ignore-errors' '
193
+test_expect_success POSIXPERM 'git add --ignore-errors' '
194
git reset --hard &&
195
date >foo1 &&
196
date >foo2 &&
@@ -201,7 +201,7 @@ test_expect_success 'git add --ignore-errors' '
201
202
rm -f foo2
203
204
-test_expect_success 'git add (add.ignore-errors)' '
204
+test_expect_success POSIXPERM 'git add (add.ignore-errors)' '
205
git config add.ignore-errors 1 &&
206
git reset --hard &&
207
date >foo1 &&
@@ -212,7 +212,7 @@ test_expect_success 'git add (add.ignore-errors)' '
212
'
213
rm -f foo2
214
215
-test_expect_success 'git add (add.ignore-errors = false)' '
215
+test_expect_success POSIXPERM 'git add (add.ignore-errors = false)' '
216
git config add.ignore-errors 0 &&
217
git reset --hard &&
218
date >foo1 &&
t/t7503-pre-commit-hook.sh
+2
-2
@@ -69,7 +69,7 @@ test_expect_success '--no-verify with failing hook' '
69
'
70
71
chmod -x "$HOOK"
72
-test_expect_success 'with non-executable hook' '
72
+test_expect_success POSIXPERM 'with non-executable hook' '
73
74
echo "content" >> file &&
75
git add file &&
@@ -77,7 +77,7 @@ test_expect_success 'with non-executable hook' '
77
78
'
79
80
-test_expect_success '--no-verify with non-executable hook' '
80
+test_expect_success POSIXPERM '--no-verify with non-executable hook' '
81
82
echo "more content" >> file &&
83
git add file &&
t/t7504-commit-msg-hook.sh
+4
-4
@@ -136,7 +136,7 @@ test_expect_success '--no-verify with failing hook (editor)' '
136
'
137
138
chmod -x "$HOOK"
139
-test_expect_success 'with non-executable hook' '
139
+test_expect_success POSIXPERM 'with non-executable hook' '
140
141
echo "content" >> file &&
142
git add file &&
@@ -144,7 +144,7 @@ test_expect_success 'with non-executable hook' '
144
145
'
146
147
-test_expect_success 'with non-executable hook (editor)' '
147
+test_expect_success POSIXPERM 'with non-executable hook (editor)' '
148
149
echo "content again" >> file &&
150
git add file &&
@@ -153,7 +153,7 @@ test_expect_success 'with non-executable hook (editor)' '
153
154
'
155
156
-test_expect_success '--no-verify with non-executable hook' '
156
+test_expect_success POSIXPERM '--no-verify with non-executable hook' '
157
158
echo "more content" >> file &&
159
git add file &&
@@ -161,7 +161,7 @@ test_expect_success '--no-verify with non-executable hook' '
161
162
'
163
164
-test_expect_success '--no-verify with non-executable hook (editor)' '
164
+test_expect_success POSIXPERM '--no-verify with non-executable hook (editor)' '
165
166
echo "even more content" >> file &&
167
git add file &&
t/test-lib.sh
+4
@@ -687,6 +687,10 @@ case $(uname -s) in
687
pwd () {
688
builtin pwd -W
689
}
690
+ # no POSIX permissions
691
+ ;;
692
+*)
693
+ test_set_prereq POSIXPERM
694
;;
695
esac
696