leak tests: don't skip some tests under SANITIZE=leak
The '!SANITIZE_LEAK' prerequisite added in 956d2e4639b (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 <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Ævar Arnfjörð Bjarmason committed
Jul 28, 2022 at 01:13 UTC
96ecf699aa0247da9024dc91f6121d8209412c8f
7 files changed
+10
-10
t/t0002-gitfile.sh
+1
-1
@@ -65,7 +65,7 @@ test_expect_success 'check commit-tree' '
65
test_path_is_file "$REAL/objects/$(objpath $SHA)"
66
'
67
68
-test_expect_success !SANITIZE_LEAK 'check rev-list' '
68
+test_expect_success 'check rev-list' '
69
git update-ref "HEAD" "$SHA" &&
70
git rev-list HEAD >actual &&
71
echo $SHA >expected &&
t/t0004-unwritable.sh
+1
-1
@@ -31,7 +31,7 @@ test_expect_success WRITE_TREE_OUT 'write-tree output on unwritable repository'
31
test_cmp expect out.write-tree
32
'
33
34
-test_expect_success POSIXPERM,SANITY,!SANITIZE_LEAK 'commit should notice unwritable repository' '
34
+test_expect_success POSIXPERM,SANITY 'commit should notice unwritable repository' '
35
test_when_finished "chmod 775 .git/objects .git/objects/??" &&
36
chmod a-w .git/objects .git/objects/?? &&
37
test_must_fail git commit -m second 2>out.commit
t/t1503-rev-parse-verify.sh
+1
-1
@@ -132,7 +132,7 @@ test_expect_success 'use --default' '
132
test_must_fail git rev-parse --verify --default bar
133
'
134
135
-test_expect_success !SANITIZE_LEAK 'main@{n} for various n' '
135
+test_expect_success 'main@{n} for various n' '
136
git reflog >out &&
137
N=$(wc -l <out) &&
138
Nm1=$(($N-1)) &&
t/t3001-ls-files-others-exclude.sh
+2
-2
@@ -103,7 +103,7 @@ test_expect_success 'git ls-files --others with various exclude options.' '
103
test_cmp expect output
104
'
105
106
-test_expect_success !SANITIZE_LEAK 'restore gitignore' '
106
+test_expect_success 'restore gitignore' '
107
git checkout --ignore-skip-worktree-bits $allignores &&
108
rm .git/index
109
'
@@ -126,7 +126,7 @@ cat > expect << EOF
126
# three/
127
EOF
128
129
-test_expect_success !SANITIZE_LEAK 'git status honors core.excludesfile' \
129
+test_expect_success 'git status honors core.excludesfile' \
130
'test_cmp expect output'
131
132
test_expect_success 'trailing slash in exclude allows directory match(1)' '
t/t3305-notes-fanout.sh
+1
-1
@@ -51,7 +51,7 @@ test_expect_success 'creating many notes with git-notes' '
51
done
52
'
53
54
-test_expect_success !SANITIZE_LEAK 'many notes created correctly with git-notes' '
54
+test_expect_success 'many notes created correctly with git-notes' '
55
git log >output.raw &&
56
grep "^ " output.raw >output &&
57
i=$num_notes &&
t/t4020-diff-external.sh
+2
-2
@@ -33,7 +33,7 @@ test_expect_success 'GIT_EXTERNAL_DIFF environment' '
33
34
'
35
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' '
37
GIT_EXTERNAL_DIFF=echo git log -p -1 HEAD >out &&
38
grep "^diff --git a/file b/file" out
39
@@ -74,7 +74,7 @@ test_expect_success 'diff.external' '
74
test_cmp expect actual
75
'
76
77
-test_expect_success !SANITIZE_LEAK 'diff.external should apply only to diff' '
77
+test_expect_success 'diff.external should apply only to diff' '
78
test_config diff.external echo &&
79
git log -p -1 HEAD >out &&
80
grep "^diff --git a/file b/file" out
t/t6102-rev-list-unexpected-objects.sh
+2
-2
@@ -17,7 +17,7 @@ test_expect_success 'setup unexpected non-blob entry' '
17
broken_tree="$(git hash-object -w --literally -t tree broken-tree)"
18
'
19
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)' '
21
sed "s/Z$//" >expect <<-EOF &&
22
$broken_tree Z
23
$tree foo
@@ -121,7 +121,7 @@ test_expect_success 'setup unexpected non-blob tag' '
121
tag=$(git hash-object -w --literally -t tag broken-tag)
122
'
123
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)' '
125
git rev-list --objects $tag
126
'
127