Skip to content

Commit 96ecf69

Browse files
avargitster
authored andcommitted
leak tests: don't skip some tests under SANITIZE=leak
The '!SANITIZE_LEAK' prerequisite added in 956d2e4 (tests: add a test mode for SANITIZE=leak, run it in CI, 2021-09-23) has been used in various tests to skip individual tests in otherwise leak-free tests. Let's change the cases that have become leak-free since then to run under SANITIZE=leak. Signed-off-by: Ævar Arnfjörð Bjarmason <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent faececa commit 96ecf69

7 files changed

+10
-10
lines changed

t/t0002-gitfile.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ test_expect_success 'check commit-tree' '
6565
test_path_is_file "$REAL/objects/$(objpath $SHA)"
6666
'
6767

68-
test_expect_success !SANITIZE_LEAK 'check rev-list' '
68+
test_expect_success 'check rev-list' '
6969
git update-ref "HEAD" "$SHA" &&
7070
git rev-list HEAD >actual &&
7171
echo $SHA >expected &&

t/t0004-unwritable.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ test_expect_success WRITE_TREE_OUT 'write-tree output on unwritable repository'
3131
test_cmp expect out.write-tree
3232
'
3333

34-
test_expect_success POSIXPERM,SANITY,!SANITIZE_LEAK 'commit should notice unwritable repository' '
34+
test_expect_success POSIXPERM,SANITY 'commit should notice unwritable repository' '
3535
test_when_finished "chmod 775 .git/objects .git/objects/??" &&
3636
chmod a-w .git/objects .git/objects/?? &&
3737
test_must_fail git commit -m second 2>out.commit

t/t1503-rev-parse-verify.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ test_expect_success 'use --default' '
132132
test_must_fail git rev-parse --verify --default bar
133133
'
134134

135-
test_expect_success !SANITIZE_LEAK 'main@{n} for various n' '
135+
test_expect_success 'main@{n} for various n' '
136136
git reflog >out &&
137137
N=$(wc -l <out) &&
138138
Nm1=$(($N-1)) &&

t/t3001-ls-files-others-exclude.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ test_expect_success 'git ls-files --others with various exclude options.' '
103103
test_cmp expect output
104104
'
105105

106-
test_expect_success !SANITIZE_LEAK 'restore gitignore' '
106+
test_expect_success 'restore gitignore' '
107107
git checkout --ignore-skip-worktree-bits $allignores &&
108108
rm .git/index
109109
'
@@ -126,7 +126,7 @@ cat > expect << EOF
126126
# three/
127127
EOF
128128

129-
test_expect_success !SANITIZE_LEAK 'git status honors core.excludesfile' \
129+
test_expect_success 'git status honors core.excludesfile' \
130130
'test_cmp expect output'
131131

132132
test_expect_success 'trailing slash in exclude allows directory match(1)' '

t/t3305-notes-fanout.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ test_expect_success 'creating many notes with git-notes' '
5151
done
5252
'
5353

54-
test_expect_success !SANITIZE_LEAK 'many notes created correctly with git-notes' '
54+
test_expect_success 'many notes created correctly with git-notes' '
5555
git log >output.raw &&
5656
grep "^ " output.raw >output &&
5757
i=$num_notes &&

t/t4020-diff-external.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ test_expect_success 'GIT_EXTERNAL_DIFF environment' '
3333
3434
'
3535

36-
test_expect_success !SANITIZE_LEAK 'GIT_EXTERNAL_DIFF environment should apply only to diff' '
36+
test_expect_success 'GIT_EXTERNAL_DIFF environment should apply only to diff' '
3737
GIT_EXTERNAL_DIFF=echo git log -p -1 HEAD >out &&
3838
grep "^diff --git a/file b/file" out
3939
@@ -74,7 +74,7 @@ test_expect_success 'diff.external' '
7474
test_cmp expect actual
7575
'
7676

77-
test_expect_success !SANITIZE_LEAK 'diff.external should apply only to diff' '
77+
test_expect_success 'diff.external should apply only to diff' '
7878
test_config diff.external echo &&
7979
git log -p -1 HEAD >out &&
8080
grep "^diff --git a/file b/file" out

t/t6102-rev-list-unexpected-objects.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ test_expect_success 'setup unexpected non-blob entry' '
1717
broken_tree="$(git hash-object -w --literally -t tree broken-tree)"
1818
'
1919

20-
test_expect_success !SANITIZE_LEAK 'TODO (should fail!): traverse unexpected non-blob entry (lone)' '
20+
test_expect_success 'TODO (should fail!): traverse unexpected non-blob entry (lone)' '
2121
sed "s/Z$//" >expect <<-EOF &&
2222
$broken_tree Z
2323
$tree foo
@@ -121,7 +121,7 @@ test_expect_success 'setup unexpected non-blob tag' '
121121
tag=$(git hash-object -w --literally -t tag broken-tag)
122122
'
123123

124-
test_expect_success !SANITIZE_LEAK 'TODO (should fail!): traverse unexpected non-blob tag (lone)' '
124+
test_expect_success 'TODO (should fail!): traverse unexpected non-blob tag (lone)' '
125125
git rev-list --objects $tag
126126
'
127127

0 commit comments

Comments
 (0)