Skip to content

Commit 9709ffa

Browse files
committed
Merge branch 'rj/test-ulimit-on-windows'
On Cygwin, "ulimit -s" does not report failure but it does not work at all, which causes an unexpected success of some tests that expect failures under a limited stack situation. This has been fixed. * rj/test-ulimit-on-windows: t9010-*.sh: skip all tests if the PIPE prereq is missing test-lib: use more compact expression in PIPE prerequisite test-lib: don't use ulimit in test prerequisites on cygwin
2 parents f759c87 + 7236a34 commit 9709ffa

File tree

5 files changed

+42
-40
lines changed

5 files changed

+42
-40
lines changed

t/t1400-update-ref.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1253,7 +1253,10 @@ run_with_limited_open_files () {
12531253
(ulimit -n 32 && "$@")
12541254
}
12551255

1256-
test_lazy_prereq ULIMIT_FILE_DESCRIPTORS 'run_with_limited_open_files true'
1256+
test_lazy_prereq ULIMIT_FILE_DESCRIPTORS '
1257+
test_have_prereq !MINGW,!CYGWIN &&
1258+
run_with_limited_open_files true
1259+
'
12571260

12581261
test_expect_success ULIMIT_FILE_DESCRIPTORS 'large transaction creating branches does not burst open file limit' '
12591262
(

t/t6120-describe.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,6 @@ test_expect_success 'describe ignoring a borken submodule' '
279279
grep broken out
280280
'
281281

282-
# we require ulimit, this excludes Windows
283282
test_expect_failure ULIMIT_STACK_SIZE 'name-rev works in a deep repo' '
284283
i=1 &&
285284
while test $i -lt 8000

t/t7004-tag.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1863,7 +1863,6 @@ test_expect_success 'version sort with very long prerelease suffix' '
18631863
git tag -l --sort=version:refname
18641864
'
18651865

1866-
# we require ulimit, this excludes Windows
18671866
test_expect_success ULIMIT_STACK_SIZE '--contains and --no-contains work in a deep repo' '
18681867
>expect &&
18691868
i=1 &&

t/t9010-svn-fe.sh

Lines changed: 28 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,13 @@ test_description='check svn dumpfile importer'
44

55
. ./test-lib.sh
66

7+
if test_have_prereq !PIPE
8+
then
9+
skip_all="svn dumpfile importer testing requires the PIPE prerequisite"
10+
test_done
11+
fi
12+
713
reinit_git () {
8-
if ! test_declared_prereq PIPE
9-
then
10-
echo >&4 "reinit_git: need to declare PIPE prerequisite"
11-
return 127
12-
fi
1314
rm -fr .git &&
1415
rm -f stream backflow &&
1516
git init &&
@@ -54,19 +55,19 @@ text_no_props () {
5455

5556
>empty
5657

57-
test_expect_success PIPE 'empty dump' '
58+
test_expect_success 'empty dump' '
5859
reinit_git &&
5960
echo "SVN-fs-dump-format-version: 2" >input &&
6061
try_dump input
6162
'
6263

63-
test_expect_success PIPE 'v4 dumps not supported' '
64+
test_expect_success 'v4 dumps not supported' '
6465
reinit_git &&
6566
echo "SVN-fs-dump-format-version: 4" >v4.dump &&
6667
try_dump v4.dump must_fail
6768
'
6869

69-
test_expect_failure PIPE 'empty revision' '
70+
test_expect_failure 'empty revision' '
7071
reinit_git &&
7172
printf "rev <nobody, nobody@local>: %s\n" "" "" >expect &&
7273
cat >emptyrev.dump <<-\EOF &&
@@ -86,7 +87,7 @@ test_expect_failure PIPE 'empty revision' '
8687
test_cmp expect actual
8788
'
8889

89-
test_expect_success PIPE 'empty properties' '
90+
test_expect_success 'empty properties' '
9091
reinit_git &&
9192
printf "rev <nobody, nobody@local>: %s\n" "" "" >expect &&
9293
cat >emptyprop.dump <<-\EOF &&
@@ -109,7 +110,7 @@ test_expect_success PIPE 'empty properties' '
109110
test_cmp expect actual
110111
'
111112

112-
test_expect_success PIPE 'author name and commit message' '
113+
test_expect_success 'author name and commit message' '
113114
reinit_git &&
114115
echo "<[email protected], [email protected]@local>" >expect.author &&
115116
cat >message <<-\EOF &&
@@ -143,7 +144,7 @@ test_expect_success PIPE 'author name and commit message' '
143144
test_cmp expect.author actual.author
144145
'
145146

146-
test_expect_success PIPE 'unsupported properties are ignored' '
147+
test_expect_success 'unsupported properties are ignored' '
147148
reinit_git &&
148149
echo author >expect &&
149150
cat >extraprop.dump <<-\EOF &&
@@ -168,7 +169,7 @@ test_expect_success PIPE 'unsupported properties are ignored' '
168169
test_cmp expect actual
169170
'
170171

171-
test_expect_failure PIPE 'timestamp and empty file' '
172+
test_expect_failure 'timestamp and empty file' '
172173
echo [email protected] >expect.author &&
173174
echo 1999-01-01 >expect.date &&
174175
echo file >expect.files &&
@@ -210,7 +211,7 @@ test_expect_failure PIPE 'timestamp and empty file' '
210211
test_cmp empty file
211212
'
212213

213-
test_expect_success PIPE 'directory with files' '
214+
test_expect_success 'directory with files' '
214215
reinit_git &&
215216
printf "%s\n" directory/file1 directory/file2 >expect.files &&
216217
echo hi >hi &&
@@ -263,7 +264,7 @@ test_expect_success PIPE 'directory with files' '
263264
test_cmp hi directory/file2
264265
'
265266

266-
test_expect_success PIPE 'branch name with backslash' '
267+
test_expect_success 'branch name with backslash' '
267268
reinit_git &&
268269
sort <<-\EOF >expect.branch-files &&
269270
trunk/file1
@@ -362,7 +363,7 @@ test_expect_success PIPE 'branch name with backslash' '
362363
test_cmp expect.branch-files actual.branch-files
363364
'
364365

365-
test_expect_success PIPE 'node without action' '
366+
test_expect_success 'node without action' '
366367
reinit_git &&
367368
cat >inaction.dump <<-\EOF &&
368369
SVN-fs-dump-format-version: 3
@@ -383,7 +384,7 @@ test_expect_success PIPE 'node without action' '
383384
try_dump inaction.dump must_fail
384385
'
385386

386-
test_expect_success PIPE 'action: add node without text' '
387+
test_expect_success 'action: add node without text' '
387388
reinit_git &&
388389
cat >textless.dump <<-\EOF &&
389390
SVN-fs-dump-format-version: 3
@@ -405,7 +406,7 @@ test_expect_success PIPE 'action: add node without text' '
405406
try_dump textless.dump must_fail
406407
'
407408

408-
test_expect_failure PIPE 'change file mode but keep old content' '
409+
test_expect_failure 'change file mode but keep old content' '
409410
reinit_git &&
410411
cat >expect <<-\EOF &&
411412
OBJID
@@ -481,7 +482,7 @@ test_expect_failure PIPE 'change file mode but keep old content' '
481482
test_cmp hello actual.target
482483
'
483484

484-
test_expect_success PIPE 'NUL in property value' '
485+
test_expect_success 'NUL in property value' '
485486
reinit_git &&
486487
echo "commit message" >expect.message &&
487488
{
@@ -507,7 +508,7 @@ test_expect_success PIPE 'NUL in property value' '
507508
test_cmp expect.message actual.message
508509
'
509510

510-
test_expect_success PIPE 'NUL in log message, file content, and property name' '
511+
test_expect_success 'NUL in log message, file content, and property name' '
511512
# Caveat: svnadmin 1.6.16 (r1073529) truncates at \0 in the
512513
# svn:specialQnotreally example.
513514
reinit_git &&
@@ -587,7 +588,7 @@ test_expect_success PIPE 'NUL in log message, file content, and property name' '
587588
test_cmp expect.hello2 actual.hello2
588589
'
589590

590-
test_expect_success PIPE 'change file mode and reiterate content' '
591+
test_expect_success 'change file mode and reiterate content' '
591592
reinit_git &&
592593
cat >expect <<-\EOF &&
593594
OBJID
@@ -667,7 +668,7 @@ test_expect_success PIPE 'change file mode and reiterate content' '
667668
test_cmp hello actual.target
668669
'
669670

670-
test_expect_success PIPE 'deltas supported' '
671+
test_expect_success 'deltas supported' '
671672
reinit_git &&
672673
{
673674
# (old) h + (inline) ello + (old) \n
@@ -731,7 +732,7 @@ test_expect_success PIPE 'deltas supported' '
731732
try_dump delta.dump
732733
'
733734

734-
test_expect_success PIPE 'property deltas supported' '
735+
test_expect_success 'property deltas supported' '
735736
reinit_git &&
736737
cat >expect <<-\EOF &&
737738
OBJID
@@ -796,7 +797,7 @@ test_expect_success PIPE 'property deltas supported' '
796797
test_cmp expect actual
797798
'
798799

799-
test_expect_success PIPE 'properties on /' '
800+
test_expect_success 'properties on /' '
800801
reinit_git &&
801802
cat <<-\EOF >expect &&
802803
OBJID
@@ -850,7 +851,7 @@ test_expect_success PIPE 'properties on /' '
850851
test_cmp expect actual
851852
'
852853

853-
test_expect_success PIPE 'deltas for typechange' '
854+
test_expect_success 'deltas for typechange' '
854855
reinit_git &&
855856
cat >expect <<-\EOF &&
856857
OBJID
@@ -935,7 +936,7 @@ test_expect_success PIPE 'deltas for typechange' '
935936
test_cmp expect actual
936937
'
937938

938-
test_expect_success PIPE 'deltas need not consume the whole preimage' '
939+
test_expect_success 'deltas need not consume the whole preimage' '
939940
reinit_git &&
940941
cat >expect <<-\EOF &&
941942
OBJID
@@ -1040,7 +1041,7 @@ test_expect_success PIPE 'deltas need not consume the whole preimage' '
10401041
test_cmp expect.3 actual.3
10411042
'
10421043

1043-
test_expect_success PIPE 'no hang for delta trying to read past end of preimage' '
1044+
test_expect_success 'no hang for delta trying to read past end of preimage' '
10441045
reinit_git &&
10451046
{
10461047
# COPY 1
@@ -1087,7 +1088,7 @@ test_expect_success 'set up svn repo' '
10871088
fi
10881089
'
10891090

1090-
test_expect_success SVNREPO,PIPE 't9135/svn.dump' '
1091+
test_expect_success SVNREPO 't9135/svn.dump' '
10911092
mkdir -p simple-git &&
10921093
(
10931094
cd simple-git &&

t/test-lib.sh

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1067,14 +1067,8 @@ test_i18ngrep () {
10671067

10681068
test_lazy_prereq PIPE '
10691069
# test whether the filesystem supports FIFOs
1070-
case $(uname -s) in
1071-
CYGWIN*|MINGW*)
1072-
false
1073-
;;
1074-
*)
1075-
rm -f testfifo && mkfifo testfifo
1076-
;;
1077-
esac
1070+
test_have_prereq !MINGW,!CYGWIN &&
1071+
rm -f testfifo && mkfifo testfifo
10781072
'
10791073

10801074
test_lazy_prereq SYMLINKS '
@@ -1170,13 +1164,19 @@ run_with_limited_cmdline () {
11701164
(ulimit -s 128 && "$@")
11711165
}
11721166

1173-
test_lazy_prereq CMDLINE_LIMIT 'run_with_limited_cmdline true'
1167+
test_lazy_prereq CMDLINE_LIMIT '
1168+
test_have_prereq !MINGW,!CYGWIN &&
1169+
run_with_limited_cmdline true
1170+
'
11741171

11751172
run_with_limited_stack () {
11761173
(ulimit -s 128 && "$@")
11771174
}
11781175

1179-
test_lazy_prereq ULIMIT_STACK_SIZE 'run_with_limited_stack true'
1176+
test_lazy_prereq ULIMIT_STACK_SIZE '
1177+
test_have_prereq !MINGW,!CYGWIN &&
1178+
run_with_limited_stack true
1179+
'
11801180

11811181
build_option () {
11821182
git version --build-options |

0 commit comments

Comments
 (0)