git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [PATCH] tests: create an interactive gdb session with the 'debug' helper
@ 2017-03-17 14:46 SZEDER Gábor
  2017-03-17 14:55 ` Jeff King
  0 siblings, 1 reply; 9+ messages in thread
From: SZEDER Gábor @ 2017-03-17 14:46 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Jeff King, Johannes Schindelin, git, SZEDER Gábor

The 'debug' test helper is supposed to facilitate debugging by running
a command of the test suite under gdb.  Unfortunately, its usefulness
is severely limited, because that gdb session is not interactive,
since the test's, and thus gdb's standard input is attached to
/dev/null (for a good reason, see 781f76b15 (test-lib: redirect stdin
of tests, 2011-12-15)).

Re-attach the original standard input in the debug helper, thus
creating an interactive gdb session, which is much much more useful.

Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com>
---
 t/test-lib-functions.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/t/test-lib-functions.sh b/t/test-lib-functions.sh
index bd357704c..9567dc986 100644
--- a/t/test-lib-functions.sh
+++ b/t/test-lib-functions.sh
@@ -154,7 +154,7 @@ test_pause () {
 #
 # Example: "debug git checkout master".
 debug () {
-	 GIT_TEST_GDB=1 "$@"
+	 GIT_TEST_GDB=1 "$@" <&6
 }
 
 # Call test_commit with the arguments
-- 
2.12.0.375.g7a2ebd56b


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

end of thread, other threads:[~2017-03-21 11:07 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-17 14:46 [PATCH] tests: create an interactive gdb session with the 'debug' helper SZEDER Gábor
2017-03-17 14:55 ` Jeff King
2017-03-18 16:10   ` SZEDER Gábor
2017-03-18 16:13     ` [PATCHv2 1/2] " SZEDER Gábor
2017-03-18 16:14       ` [PATCHv2 2/2] tests: make the 'test_pause' helper work in non-verbose mode SZEDER Gábor
2017-03-20  4:32         ` Jeff King
2017-03-20  4:31       ` [PATCHv2 1/2] tests: create an interactive gdb session with the 'debug' helper Jeff King
2017-03-21 11:07       ` Johannes Schindelin
2017-03-20  4:29     ` [PATCH] " Jeff King

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).