t6000-t9999: detect and signal failure within loop

Failures within `for` and `while` loops can go unnoticed if not detected and signaled manually since the loop itself does not abort when a contained command fails, nor will a failure necessarily be detected when the loop finishes since the loop returns the exit code of the last command it ran on the final iteration, which may not be the command which failed. Therefore, detect and signal failures manually within loops using the idiom `|| return 1` (or `|| exit 1` within subshells). Signed-off-by: Eric Sunshine <sunshine@sunshineco.com> Reviewed-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Eric Sunshine committed Dec 9, 2021 at 00:11 UTC 0c51d6b4aec9f1959d148960cb55155b676cec78
32 files changed +65 -65
contrib/mw-to-git/t/t9365-continuing-queries.sh
+1 -1
@@ -12,7 +12,7 @@ test_expect_success 'creating page w/ >500 revisions' '
12 for i in $(test_seq 501)
13 do
14 echo "creating revision $i" &&
15 - wiki_editpage foo "revision $i<br/>" true
15 + wiki_editpage foo "revision $i<br/>" true || return 1
16 done
17 '
18
t/annotate-tests.sh
+1 -1
@@ -161,7 +161,7 @@ test_expect_success 'blame huge graft' '
161 GIT_AUTHOR_NAME=$i$j GIT_AUTHOR_EMAIL=$i$j@test.git \
162 git commit -a -m "$i$j" &&
163 commit=$(git rev-parse --verify HEAD) &&
164 - graft="$graft$commit "
164 + graft="$graft$commit " || return 1
165 done
166 done &&
167 printf "%s " $graft >.git/info/grafts &&
t/t6005-rev-list-count.sh
+1 -1
@@ -8,7 +8,7 @@ test_expect_success 'setup' '
8 for n in 1 2 3 4 5 ; do
9 echo $n > a &&
10 git add a &&
11 - git commit -m "$n"
11 + git commit -m "$n" || return 1
12 done
13 '
14
t/t6009-rev-list-parent.sh
+2 -2
@@ -124,7 +124,7 @@ test_expect_success 'dodecapus' '
124 git checkout -b root$i five &&
125 test_commit $i &&
126 roots="$roots root$i" ||
127 - return
127 + return 1
128 done &&
129 git checkout main &&
130 test_tick &&
@@ -143,7 +143,7 @@ test_expect_success 'ancestors with the same commit time' '
143 test_tick_keep=$test_tick &&
144 for i in 1 2 3 4 5 6 7 8; do
145 test_tick=$test_tick_keep &&
146 - test_commit t$i
146 + test_commit t$i || return 1
147 done &&
148 git rev-list t1^! --not t$i >result &&
149 test_must_be_empty result
t/t6101-rev-parse-parents.sh
+1 -1
@@ -32,7 +32,7 @@ test_expect_success 'setup' '
32 test_tick &&
33 git commit --allow-empty -m "$i" &&
34 commit=$(git rev-parse --verify HEAD) &&
35 - printf "$commit " >>.git/info/grafts
35 + printf "$commit " >>.git/info/grafts || return 1
36 done
37 '
38
t/t6112-rev-list-filters-objects.sh
+4 -4
@@ -18,7 +18,7 @@ test_expect_success 'setup r1' '
18 do
19 echo "This is file: $n" > r1/file.$n &&
20 git -C r1 add file.$n &&
21 - git -C r1 commit -m "$n"
21 + git -C r1 commit -m "$n" || return 1
22 done
23 '
24
@@ -75,7 +75,7 @@ test_expect_success 'setup r2' '
75 do
76 printf "%"$n"s" X > r2/large.$n &&
77 git -C r2 add large.$n &&
78 - git -C r2 commit -m "$n"
78 + git -C r2 commit -m "$n" || return 1
79 done
80 '
81
@@ -248,7 +248,7 @@ test_expect_success 'setup r3' '
248 echo "This is file: $n" > r3/$n &&
249 git -C r3 add $n &&
250 echo "This is file: dir1/$n" > r3/dir1/$n &&
251 - git -C r3 add dir1/$n
251 + git -C r3 add dir1/$n || return 1
252 done &&
253 git -C r3 commit -m "sparse" &&
254 echo dir1/ >pattern1 &&
@@ -672,7 +672,7 @@ test_expect_success 'rev-list W/ --missing=print' '
672
673 for id in `cat expected | sed "s|..|&/|"`
674 do
675 - rm r1/.git/objects/$id
675 + rm r1/.git/objects/$id || return 1
676 done &&
677
678 git -C r1 rev-list --quiet --missing=print --objects HEAD >revs &&
t/t6120-describe.sh
+3 -3
@@ -262,7 +262,7 @@ test_expect_success 'name-rev --all' '
262 >expect.unsorted &&
263 for rev in $(git rev-list --all)
264 do
265 - git name-rev $rev >>expect.unsorted
265 + git name-rev $rev >>expect.unsorted || return 1
266 done &&
267 sort <expect.unsorted >expect &&
268 git name-rev --all >actual.unsorted &&
@@ -275,7 +275,7 @@ test_expect_success 'name-rev --stdin' '
275 for rev in $(git rev-list --all)
276 do
277 name=$(git name-rev --name-only $rev) &&
278 - echo "$rev ($name)" >>expect.unsorted
278 + echo "$rev ($name)" >>expect.unsorted || return 1
279 done &&
280 sort <expect.unsorted >expect &&
281 git rev-list --all | git name-rev --stdin >actual.unsorted &&
@@ -395,7 +395,7 @@ EOF" &&
395 then
396 echo "from refs/heads/main^0"
397 fi &&
398 - i=$(($i + 1))
398 + i=$(($i + 1)) || return 1
399 done | git fast-import &&
400 git checkout main &&
401 git tag far-far-away HEAD^ &&
t/t6132-pathspec-exclude.sh
+1 -1
@@ -11,7 +11,7 @@ test_expect_success 'setup' '
11 fi &&
12 : >$p &&
13 git add $p &&
14 - git commit -m $p
14 + git commit -m $p || return 1
15 done &&
16 git log --oneline --format=%s >actual &&
17 cat <<EOF >expect &&
t/t6200-fmt-merge-msg.sh
+1 -1
@@ -519,7 +519,7 @@ test_expect_success 'merge-msg lots of commits' '
519 while test $i -gt 9
520 do
521 echo " $i" &&
522 - i=$(($i-1))
522 + i=$(($i-1)) || return 1
523 done &&
524 echo " ..."
525 } >expected &&
t/t6300-for-each-ref.sh
+1 -1
@@ -1338,7 +1338,7 @@ test_expect_success ':remotename and :remoteref' '
1338 echo "${pair#*=}" >expect &&
1339 git for-each-ref --format="${pair%=*}" \
1340 refs/heads/main >actual &&
1341 - test_cmp expect actual
1341 + test_cmp expect actual || exit 1
1342 done &&
1343 git branch push-simple &&
1344 git config branch.push-simple.pushRemote from &&
t/t6412-merge-large-rename.sh
+4 -4
@@ -37,18 +37,18 @@ test_rename() {
37 test_might_fail git branch -D test$n &&
38 git reset --hard initial &&
39 for i in $(count $n); do
40 - make_text $i initial initial >$i
40 + make_text $i initial initial >$i || return 1
41 done &&
42 git add . &&
43 git commit -m add=$n &&
44 for i in $(count $n); do
45 - make_text $i changed initial >$i
45 + make_text $i changed initial >$i || return 1
46 done &&
47 git commit -a -m change=$n &&
48 git checkout -b test$n HEAD^ &&
49 for i in $(count $n); do
50 git rm $i &&
51 - make_text $i initial changed >$i.moved
51 + make_text $i initial changed >$i.moved || return 1
52 done &&
53 git add . &&
54 git commit -m change+rename=$n &&
@@ -79,7 +79,7 @@ test_expect_success 'setup large simple rename' '
79
80 git reset --hard initial &&
81 for i in $(count 200); do
82 - make_text foo bar baz >$i
82 + make_text foo bar baz >$i || return 1
83 done &&
84 git add . &&
85 git commit -m create-files &&
t/t6430-merge-recursive.sh
+1 -1
@@ -706,7 +706,7 @@ test_expect_success 'merge-recursive remembers the names of all base trees' '
706 # more trees than static slots used by oid_to_hex()
707 for commit in $c0 $c2 $c4 $c5 $c6 $c7
708 do
709 - git rev-parse "$commit^{tree}"
709 + git rev-parse "$commit^{tree}" || return 1
710 done >trees &&
711
712 # ignore the return code; it only fails because the input is weird...
t/t6600-test-reach.sh
+2 -2
@@ -32,7 +32,7 @@ test_expect_success 'setup' '
32 do
33 test_commit "1-$i" &&
34 git branch -f commit-1-$i &&
35 - git tag -a -m "1-$i" tag-1-$i commit-1-$i
35 + git tag -a -m "1-$i" tag-1-$i commit-1-$i || return 1
36 done &&
37 for j in $(test_seq 1 9)
38 do
@@ -46,7 +46,7 @@ test_expect_success 'setup' '
46 do
47 git merge commit-$j-$i -m "$x-$i" &&
48 git branch -f commit-$x-$i &&
49 - git tag -a -m "$x-$i" tag-$x-$i commit-$x-$i
49 + git tag -a -m "$x-$i" tag-$x-$i commit-$x-$i || return 1
50 done
51 done &&
52 git commit-graph write --reachable &&
t/t7004-tag.sh
+1 -1
@@ -1981,7 +1981,7 @@ EOF" &&
1981 then
1982 echo "from refs/heads/main^0"
1983 fi &&
1984 - i=$(($i + 1))
1984 + i=$(($i + 1)) || return 1
1985 done | git fast-import &&
1986 git checkout main &&
1987 git tag far-far-away HEAD^ &&
t/t7505-prepare-commit-msg-hook.sh
+1 -1
@@ -16,7 +16,7 @@ test_expect_success 'set up commits for rebasing' '
16 test_commit rebase-b b bb &&
17 for i in $(test_seq 1 13)
18 do
19 - test_commit rebase-$i c $i
19 + test_commit rebase-$i c $i || return 1
20 done &&
21 git checkout main &&
22
t/t7600-merge.sh
+1 -1
@@ -967,7 +967,7 @@ test_expect_success 'set up mod-256 conflict scenario' '
967 # 256 near-identical stanzas...
968 for i in $(test_seq 1 256); do
969 for j in 1 2 3 4 5; do
970 - echo $i-$j
970 + echo $i-$j || return 1
971 done
972 done >file &&
973 git add file &&
t/t7602-merge-octopus-many.sh
+1 -1
@@ -30,7 +30,7 @@ test_expect_success 'merge c1 with c2, c3, c4, ... c29' '
30 while test $i -le 30
31 do
32 refs="$refs c$i" &&
33 - i=$(expr $i + 1)
33 + i=$(expr $i + 1) || return 1
34 done &&
35 git merge $refs &&
36 test "$(git rev-parse c1)" != "$(git rev-parse HEAD)" &&
t/t7603-merge-reduce-heads.sh
+2 -2
@@ -95,7 +95,7 @@ test_expect_success 'setup' '
95 echo $i > $i.c &&
96 git add $i.c &&
97 git commit -m $i &&
98 - git tag $i
98 + git tag $i || return 1
99 done &&
100 git reset --hard A &&
101 for i in F G H I
@@ -103,7 +103,7 @@ test_expect_success 'setup' '
103 echo $i > $i.c &&
104 git add $i.c &&
105 git commit -m $i &&
106 - git tag $i
106 + git tag $i || return 1
107 done
108 '
109
t/t7700-repack.sh
+1 -1
@@ -117,7 +117,7 @@ test_expect_success 'packed obs in alternate ODB kept pack are repacked' '
117 rm alt_objects/pack/$base_name.keep
118 else
119 touch alt_objects/pack/$base_name.keep
120 - fi
120 + fi || return 1
121 done &&
122 git repack -a -d &&
123 test_no_missing_in_packs
t/t8014-blame-ignore-fuzzy.sh
+2 -2
@@ -310,7 +310,7 @@ test_expect_success setup '
310 echo "$line" >>"$i" &&
311 git add "$i" &&
312 test_tick &&
313 - GIT_AUTHOR_NAME="$line_count" git commit -m "$line_count"
313 + GIT_AUTHOR_NAME="$line_count" git commit -m "$line_count" || return 1
314 done <"a$i"
315 done &&
316
@@ -318,7 +318,7 @@ test_expect_success setup '
318 do
319 # Overwrite the files with the final content.
320 cp b$i $i &&
321 - git add $i
321 + git add $i || return 1
322 done &&
323 test_tick &&
324
t/t9104-git-svn-follow-parent.sh
+2 -2
@@ -117,7 +117,7 @@ test_expect_success 'follow-parent avoids deleting relevant info' '
117 mkdir -p import/trunk/subversion/bindings/swig/perl/t &&
118 for i in a b c ; do \
119 echo $i > import/trunk/subversion/bindings/swig/perl/$i.pm &&
120 - echo _$i > import/trunk/subversion/bindings/swig/perl/t/$i.t; \
120 + echo _$i > import/trunk/subversion/bindings/swig/perl/t/$i.t || return 1
121 done &&
122 echo "bad delete test" > \
123 import/trunk/subversion/bindings/swig/perl/t/larger-parent &&
@@ -134,7 +134,7 @@ test_expect_success 'follow-parent avoids deleting relevant info' '
134 svn mv t native/t &&
135 for i in a b c
136 do
137 - svn mv $i.pm native/$i.pm
137 + svn mv $i.pm native/$i.pm || return 1
138 done &&
139 echo z >>native/t/c.t &&
140 poke native/t/c.t &&
t/t9130-git-svn-authors-file.sh
+2 -2
@@ -15,7 +15,7 @@ EOF
15 test_expect_success 'setup svnrepo' '
16 for i in aa bb cc dd
17 do
18 - svn_cmd mkdir -m $i --username $i "$svnrepo"/$i
18 + svn_cmd mkdir -m $i --username $i "$svnrepo"/$i || return 1
19 done
20 '
21
@@ -60,7 +60,7 @@ test_expect_success 'authors-file against globs' '
60 for i in bb ee cc
61 do
62 branch="aa/branches/$i" &&
63 - svn_cmd mkdir -m "$branch" --username $i "$svnrepo/$branch"
63 + svn_cmd mkdir -m "$branch" --username $i "$svnrepo/$branch" || return 1
64 done
65 '
66
t/t9134-git-svn-ignore-paths.sh
+8 -8
@@ -27,7 +27,7 @@ test_expect_success 'setup test repository' '
27 test_expect_success 'clone an SVN repository with ignored www directory' '
28 git svn clone --ignore-paths="^www" "$svnrepo" g &&
29 echo test_qqq > expect &&
30 - for i in g/*/*.txt; do cat $i >> expect2; done &&
30 + for i in g/*/*.txt; do cat $i >> expect2 || return 1; done &&
31 test_cmp expect expect2
32 '
33
@@ -36,7 +36,7 @@ test_expect_success 'init+fetch an SVN repository with ignored www directory' '
36 ( cd c && git svn fetch --ignore-paths="^www" ) &&
37 rm expect2 &&
38 echo test_qqq > expect &&
39 - for i in c/*/*.txt; do cat $i >> expect2; done &&
39 + for i in c/*/*.txt; do cat $i >> expect2 || return 1; done &&
40 test_cmp expect expect2
41 '
42
@@ -62,7 +62,7 @@ test_expect_success 'update git svn-cloned repo (config ignore)' '
62 cd g &&
63 git svn rebase &&
64 printf "test_qqq\nb\n" > expect &&
65 - for i in */*.txt; do cat $i >> expect2; done &&
65 + for i in */*.txt; do cat $i >> expect2 || exit 1; done &&
66 test_cmp expect2 expect &&
67 rm expect expect2
68 )
@@ -73,7 +73,7 @@ test_expect_success 'update git svn-cloned repo (option ignore)' '
73 cd c &&
74 git svn rebase --ignore-paths="^www" &&
75 printf "test_qqq\nb\n" > expect &&
76 - for i in */*.txt; do cat $i >> expect2; done &&
76 + for i in */*.txt; do cat $i >> expect2 || exit 1; done &&
77 test_cmp expect2 expect &&
78 rm expect expect2
79 )
@@ -94,7 +94,7 @@ test_expect_success 'update git svn-cloned repo (config ignore)' '
94 cd g &&
95 git svn rebase &&
96 printf "test_qqq\nb\n" > expect &&
97 - for i in */*.txt; do cat $i >> expect2; done &&
97 + for i in */*.txt; do cat $i >> expect2 || exit 1; done &&
98 test_cmp expect2 expect &&
99 rm expect expect2
100 )
@@ -105,7 +105,7 @@ test_expect_success 'update git svn-cloned repo (option ignore)' '
105 cd c &&
106 git svn rebase --ignore-paths="^www" &&
107 printf "test_qqq\nb\n" > expect &&
108 - for i in */*.txt; do cat $i >> expect2; done &&
108 + for i in */*.txt; do cat $i >> expect2 || exit 1; done &&
109 test_cmp expect2 expect &&
110 rm expect expect2
111 )
@@ -127,7 +127,7 @@ test_expect_success 'update git svn-cloned repo again (config ignore)' '
127 cd g &&
128 git svn rebase &&
129 printf "test_qqq\nb\nygg\n" > expect &&
130 - for i in */*.txt; do cat $i >> expect2; done &&
130 + for i in */*.txt; do cat $i >> expect2 || exit 1; done &&
131 test_cmp expect2 expect &&
132 rm expect expect2
133 )
@@ -138,7 +138,7 @@ test_expect_success 'update git svn-cloned repo again (option ignore)' '
138 cd c &&
139 git svn rebase --ignore-paths="^www" &&
140 printf "test_qqq\nb\nygg\n" > expect &&
141 - for i in */*.txt; do cat $i >> expect2; done &&
141 + for i in */*.txt; do cat $i >> expect2 || exit 1; done &&
142 test_cmp expect2 expect &&
143 rm expect expect2
144 )
t/t9138-git-svn-authors-prog.sh
+1 -1
@@ -27,7 +27,7 @@ test_expect_success 'svn-authors setup' '
27 test_expect_success 'setup svnrepo' '
28 for i in aa bb cc-sub dd-sub ee-foo ff
29 do
30 - svn mkdir -m $i --username $i "$svnrepo"/$i
30 + svn mkdir -m $i --username $i "$svnrepo"/$i || return 1
31 done
32 '
33
t/t9146-git-svn-empty-dirs.sh
+2 -2
@@ -8,7 +8,7 @@ test_description='git svn creates empty directories'
8 test_expect_success 'initialize repo' '
9 for i in a b c d d/e d/e/f "weird file name"
10 do
11 - svn_cmd mkdir -m "mkdir $i" "$svnrepo"/"$i"
11 + svn_cmd mkdir -m "mkdir $i" "$svnrepo"/"$i" || return 1
12 done
13 '
14
@@ -102,7 +102,7 @@ test_expect_success 'git svn mkdirs -r works' '
102 test_expect_success 'initialize trunk' '
103 for i in trunk trunk/a trunk/"weird file name"
104 do
105 - svn_cmd mkdir -m "mkdir $i" "$svnrepo"/"$i"
105 + svn_cmd mkdir -m "mkdir $i" "$svnrepo"/"$i" || return 1
106 done
107 '
108
t/t9147-git-svn-include-paths.sh
+8 -8
@@ -28,7 +28,7 @@ test_expect_success 'setup test repository' '
28 test_expect_success 'clone an SVN repository with filter to include qqq directory' '
29 git svn clone --include-paths="qqq" "$svnrepo" g &&
30 echo test_qqq > expect &&
31 - for i in g/*/*.txt; do cat $i >> expect2; done &&
31 + for i in g/*/*.txt; do cat $i >> expect2 || return 1; done &&
32 test_cmp expect expect2
33 '
34
@@ -38,7 +38,7 @@ test_expect_success 'init+fetch an SVN repository with included qqq directory' '
38 ( cd c && git svn fetch --include-paths="qqq" ) &&
39 rm expect2 &&
40 echo test_qqq > expect &&
41 - for i in c/*/*.txt; do cat $i >> expect2; done &&
41 + for i in c/*/*.txt; do cat $i >> expect2 || return 1; done &&
42 test_cmp expect expect2
43 '
44
@@ -64,7 +64,7 @@ test_expect_success 'update git svn-cloned repo (config include)' '
64 cd g &&
65 git svn rebase &&
66 printf "test_qqq\nb\n" > expect &&
67 - for i in */*.txt; do cat $i >> expect2; done &&
67 + for i in */*.txt; do cat $i >> expect2 || exit 1; done &&
68 test_cmp expect2 expect &&
69 rm expect expect2
70 )
@@ -75,7 +75,7 @@ test_expect_success 'update git svn-cloned repo (option include)' '
75 cd c &&
76 git svn rebase --include-paths="qqq" &&
77 printf "test_qqq\nb\n" > expect &&
78 - for i in */*.txt; do cat $i >> expect2; done &&
78 + for i in */*.txt; do cat $i >> expect2 || exit 1; done &&
79 test_cmp expect2 expect &&
80 rm expect expect2
81 )
@@ -96,7 +96,7 @@ test_expect_success 'update git svn-cloned repo (config include)' '
96 cd g &&
97 git svn rebase &&
98 printf "test_qqq\nb\n" > expect &&
99 - for i in */*.txt; do cat $i >> expect2; done &&
99 + for i in */*.txt; do cat $i >> expect2 || exit 1; done &&
100 test_cmp expect2 expect &&
101 rm expect expect2
102 )
@@ -107,7 +107,7 @@ test_expect_success 'update git svn-cloned repo (option include)' '
107 cd c &&
108 git svn rebase --include-paths="qqq" &&
109 printf "test_qqq\nb\n" > expect &&
110 - for i in */*.txt; do cat $i >> expect2; done &&
110 + for i in */*.txt; do cat $i >> expect2 || exit 1; done &&
111 test_cmp expect2 expect &&
112 rm expect expect2
113 )
@@ -129,7 +129,7 @@ test_expect_success 'update git svn-cloned repo again (config include)' '
129 cd g &&
130 git svn rebase &&
131 printf "test_qqq\nb\nygg\n" > expect &&
132 - for i in */*.txt; do cat $i >> expect2; done &&
132 + for i in */*.txt; do cat $i >> expect2 || exit 1; done &&
133 test_cmp expect2 expect &&
134 rm expect expect2
135 )
@@ -140,7 +140,7 @@ test_expect_success 'update git svn-cloned repo again (option include)' '
140 cd c &&
141 git svn rebase --include-paths="qqq" &&
142 printf "test_qqq\nb\nygg\n" > expect &&
143 - for i in */*.txt; do cat $i >> expect2; done &&
143 + for i in */*.txt; do cat $i >> expect2 || exit 1; done &&
144 test_cmp expect2 expect &&
145 rm expect expect2
146 )
t/t9152-svn-empty-dirs-after-gc.sh
+1 -1
@@ -8,7 +8,7 @@ test_description='git svn creates empty directories, calls git gc, makes sure th
8 test_expect_success 'initialize repo' '
9 for i in a b c d d/e d/e/f "weird file name"
10 do
11 - svn_cmd mkdir -m "mkdir $i" "$svnrepo"/"$i"
11 + svn_cmd mkdir -m "mkdir $i" "$svnrepo"/"$i" || return 1
12 done
13 '
14
t/t9304-fast-import-marks.sh
+1 -1
@@ -16,7 +16,7 @@ test_expect_success 'setup large marks file' '
16 blob=$(git rev-parse HEAD:one.t) &&
17 for i in $(test_seq 1024 16384)
18 do
19 - echo ":$i $blob"
19 + echo ":$i $blob" || return 1
20 done >>marks
21 '
22
t/t9400-git-cvsserver-server.sh
+2 -2
@@ -338,7 +338,7 @@ test_expect_success 'cvs update (subdirectories)' \
338 '(for dir in A A/B A/B/C A/D E; do
339 mkdir $dir &&
340 echo "test file in $dir" >"$dir/file_in_$(echo $dir|sed -e "s#/# #g")" &&
341 - git add $dir
341 + git add $dir || exit 1
342 done) &&
343 git commit -q -m "deep sub directory structure" &&
344 git push gitcvs.git >/dev/null &&
@@ -381,7 +381,7 @@ test_expect_success 'cvs update (merge)' \
381 for i in 1 2 3 4 5 6 7
382 do
383 echo Line $i >>merge &&
384 - echo Line $i >>expected
384 + echo Line $i >>expected || return 1
385 done &&
386 echo Line 8 >>expected &&
387 git add merge &&
t/t9800-git-p4-basic.sh
+1 -1
@@ -171,7 +171,7 @@ test_expect_success 'clone using non-numeric revision ranges' '
171 cd "$git" &&
172 git ls-files >lines &&
173 test_line_count = 8 lines
174 - )
174 + ) || return 1
175 done
176 '
177
t/t9818-git-p4-block.sh
+3 -3
@@ -92,11 +92,11 @@ test_expect_success 'Add some more files' '
92 for i in $(test_seq 0 10)
93 do
94 p4_add_file "included/x$i" &&
95 - p4_add_file "excluded/x$i"
95 + p4_add_file "excluded/x$i" || return 1
96 done &&
97 for i in $(test_seq 0 10)
98 do
99 - p4_add_file "excluded/y$i"
99 + p4_add_file "excluded/y$i" || return 1
100 done
101 '
102
@@ -123,7 +123,7 @@ test_expect_success 'Create a repo with multiple depot paths' '
123 do
124 for i in $(test_seq 1 10)
125 do
126 - p4_add_file "$p/file$p$i"
126 + p4_add_file "$p/file$p$i" || return 1
127 done
128 done
129 '
t/t9902-completion.sh
+2 -2
@@ -879,7 +879,7 @@ test_expect_success '__git_refs - unique remote branches for git checkout DWIMer
879 refs/remotes/remote/branch-in-remote
880 do
881 git update-ref $remote_ref main &&
882 - test_when_finished "git update-ref -d $remote_ref"
882 + test_when_finished "git update-ref -d $remote_ref" || return 1
883 done &&
884 (
885 cur= &&
@@ -1052,7 +1052,7 @@ test_expect_success '__git_refs - only matching refs - checkout DWIMery' '
1052 refs/remotes/remote/branch-in-remote
1053 do
1054 git update-ref $remote_ref main &&
1055 - test_when_finished "git update-ref -d $remote_ref"
1055 + test_when_finished "git update-ref -d $remote_ref" || return 1
1056 done &&
1057 (
1058 cur=mat &&