Re: [PATCH] test_interactive: interactive debugging in test scripts

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jan 16, 2012 at 10:49:53AM -0500, Pete Wyckoff wrote:

> And it is necessary to export any test variables you want to use
> in the debug shell.  I often cut-n-paste lines containing
> TEST_DIRECTORY and TRASH_DIRECTORY; there could be others,
> in test scripts and helper libraries too.

Yeah, exporting a few common ones would be helpful. I really wish there
was a way to ask a shell to stop running the script and start doing
interactive things in the current shell context, but no such thing
exists AFAIK (you can hack it with a read-eval loop, but you are missing
many of the useful input-handling bits like tab completion. Hmm, I
wonder if bash's "read -e" would be enough, though).

I kind of wonder if that is over-engineering, though. I'd like a perfect
debugging environment, but the fact of the matter is that writing,
maintaining, and making it work in every case that comes up is probably
a lot more work than just fiddling with the scripts now and then. This
code isn't even meant to be run except in such fiddling circumstances.

> While it would be nice to use:
> 
>     test_interactive gdb --args git ...
> 
> the path is setup to invoke the script in bin-wrappers/git,
> requiring either --with-dashes or something like
> 
>     test_interactive gdb --args "$GIT_EXEC_PATH"/git ...

Yeah. I have before patched the bin-wrappers script to accept a
GIT_WRAPPER_PREFIX variable, so you can just set that and have it run
gdb on your invocation. But even that's not enough for externals. I've
been tempted to actually carry around a run-time option to exec
externals via gdb, but I didn't want to pollute the regular code base
(and you can usually get by with just running "gdb git-foo" directly).

-Peff
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]