git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] t6026-merge-attr: don't fail if sleep exits early
@ 2016-11-08 17:03 Andreas Schwab
  2016-11-08 20:05 ` Jeff King
  0 siblings, 1 reply; 12+ messages in thread
From: Andreas Schwab @ 2016-11-08 17:03 UTC (permalink / raw)
  To: git

Commit 5babb5bdb3 ("t6026-merge-attr: clean up background process at end
of test case") added a kill command to clean up after the test, but this
can fail if the sleep command exits before the cleanup is executed.
Ignore the error from the kill command.

Signed-off-by: Andreas Schwab <schwab@suse.de>
---
The failure can be simulated by adding a sleep after the last command to
delay the cleanup.
---
 t/t6026-merge-attr.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/t/t6026-merge-attr.sh b/t/t6026-merge-attr.sh
index 7a6e33e673..2672b15aa3 100755
--- a/t/t6026-merge-attr.sh
+++ b/t/t6026-merge-attr.sh
@@ -187,7 +187,7 @@ test_expect_success 'custom merge does not lock index' '
 		sleep 1 &
 		echo $! >sleep.pid
 	EOF
-	test_when_finished "kill \$(cat sleep.pid)" &&
+	test_when_finished "kill \$(cat sleep.pid) || :" &&
 
 	test_write_lines >.gitattributes \
 		"* merge=ours" "text merge=sleep-one-second" &&
-- 
2.10.2


-- 
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."

^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2016-11-10 23:04 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-08 17:03 [PATCH] t6026-merge-attr: don't fail if sleep exits early Andreas Schwab
2016-11-08 20:05 ` Jeff King
2016-11-09 13:47   ` Johannes Schindelin
2016-11-09 14:36     ` Andreas Schwab
2016-11-09 15:31       ` Jeff King
2016-11-10  8:31         ` [PATCH v2] " Andreas Schwab
2016-11-10 19:20           ` Junio C Hamano
2016-11-10 21:55             ` Johannes Schindelin
2016-11-10 22:30               ` Junio C Hamano
2016-11-10 22:35                 ` Jeff King
2016-11-10 22:55                   ` Junio C Hamano
2016-11-10 23:03                     ` Jeff King

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).