Thread (7 messages) flat view 7 messages, 2 authors, 2016-06-15
STALE3733d

[PATCH 1/3] t3404: preserve test_tick state across short SHA-1 collision test

From: Eric Sunshine <hidden>
Date: 2016-06-15 22:58:28
Subsystem: the rest · Maintainer: Linus Torvalds

The short SHA-1 collision test requires carefully crafted commits in
order to ensure a collision at rebase time. This involves managing state
which impacts the resulting SHA-1, including commit time. To accomplish
this, test_tick is set to a known state for the short SHA-1 collision
test.

Unfortunately, doing so throws away the existing state of test_tick,
which may be problematic for subsequently added tests. Fix this by
preserving the existing state of test_tick across the short SHA-1
collision test.

Signed-off-by: Eric Sunshine <redacted>
---
 t/t3404-rebase-interactive.sh | 6 ++++++
 1 file changed, 6 insertions(+)
diff --git a/t/t3404-rebase-interactive.sh b/t/t3404-rebase-interactive.sh
index b65b774..6be97ba 100755
--- a/t/t3404-rebase-interactive.sh
+++ b/t/t3404-rebase-interactive.sh
@@ -994,17 +994,23 @@ test_expect_success 'short SHA-1 setup' '
 	test_when_finished "git checkout master" &&
 	git checkout --orphan collide &&
 	git rm -rf . &&
+	(
 	unset test_tick &&
 	test_commit collide1 collide &&
 	test_commit --notick collide2 collide &&
 	test_commit --notick "collide3 115158b5" collide collide3 collide3
+	)
 '
 
 test_expect_success 'short SHA-1 collide' '
 	test_when_finished "reset_rebase && git checkout master" &&
 	git checkout collide &&
+	(
+	unset test_tick &&
+	test_tick &&
 	FAKE_COMMIT_MESSAGE="collide2 815200e" \
 	FAKE_LINES="reword 1 2" git rebase -i HEAD~2
+	)
 '
 
 test_done
-- 
1.8.4.rc4.499.gfb33910
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help