This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Don't truncate the history file when history size is unlimited
- From: Pedro Alves <palves at redhat dot com>
- To: Patrick Palka <patrick at parcs dot ath dot cx>, "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Wed, 17 Jun 2015 14:14:38 +0100
- Subject: Re: [PATCH] Don't truncate the history file when history size is unlimited
- Authentication-results: sourceware.org; auth=none
- References: <1433878062-23560-1-git-send-email-patrick at parcs dot ath dot cx> <1434466413-28892-1-git-send-email-patrick at parcs dot ath dot cx> <CA+C-WL_rSfS0T+rGK2gO8Xqsw3t2PaVUet_+nPdEeTyrYC8yeA at mail dot gmail dot com>
On 06/16/2015 04:00 PM, Patrick Palka wrote:
> By the way, what do you think about unsetting
> HOME/HISTSIZE/GDBHISTFILE somewhere higher up in the testsuite
> infrastructure? It would be nice if individual tests did not have to
> worry about such environment variables being leaked from userspace.
On first blush, that sounds like a good idea. Though I wonder
whether that could have unintended consequences. We won't know
until we try, I guess.
Does dejagnu need HOME set? Does Python/Scheme?
Unsetting the GDB-specific GDBHISTSIZE/GDBHISTFILE vars sounds
like a no brainer.
For HISTSIZE, should we audit tests that might start an interactive
shell (e.g., "(gdb) shell") and result in truncating the history file?
Guess better would be to set HISTSIZE="" and HISTFILE=/dev/null
or something like that so shells we start don't have a chance of
mucking with the user's history files?
Urgh, yes, we already have that issue today:
$ make check RUNTESTFLAGS="gdb.base/batch-preserve-term-settings.exp"
$ tail -n 5 ~/.bash_history
stty || echo "not found"
/home/pedro/gdb/mygit/build/gdb/testsuite/../../gdb/gdb -nw -nx -data-directory /home/pedro/gdb/mygit/build/gdb/testsuite/../data-directory -batch -ex "set height unlimited" -ex "start" --args "/home/pedro/gdb/mygit/build/gdb/testsuite/gdb.base/batch-preserve-term-settings"
echo test_echo
stty || echo "not found"
exit
Whoops...
Thanks,
Pedro Alves