testsuite: Fix false FAILs with .bashrc GDBHISTFILE=...
authorJan Kratochvil <jan.kratochvil@redhat.com>
Thu, 7 Apr 2016 20:18:49 +0000 (22:18 +0200)
committerJan Kratochvil <jan.kratochvil@redhat.com>
Thu, 7 Apr 2016 20:18:49 +0000 (22:18 +0200)
commit2d35e871274a48331c4d6c7b3e4fbee42b901f33
treeb5feb2e0719e271fbcbca84c2b7ee29f012c59df
parent9553661a5f8fb5f82846a04a02b7db8476d986e0
testsuite: Fix false FAILs with .bashrc GDBHISTFILE=...

$ GDBHISTFILE=/tmp/gdbhistfile runtest gdb.base/gdbhistsize-history.exp gdb.base/gdbinit-history.exp
Running ./gdb.base/gdbinit-history.exp ...
FAIL: gdb.base/gdbinit-history.exp: home=gdbinit-history/unlimited gdbhistsize=1000: show commands
FAIL: gdb.base/gdbinit-history.exp: home=gdbinit-history/unlimited gdbhistsize=foo: show commands
Running ./gdb.base/gdbhistsize-history.exp ...
FAIL: gdb.base/gdbhistsize-history.exp: histsize=: show commands
FAIL: gdb.base/gdbhistsize-history.exp: histsize=20: show commands
FAIL: gdb.base/gdbhistsize-history.exp: histsize= 20 : show commands
FAIL: gdb.base/gdbhistsize-history.exp: histsize=-5: show commands
FAIL: gdb.base/gdbhistsize-history.exp: histsize=not_an_integer: show commands
FAIL: gdb.base/gdbhistsize-history.exp: histsize=10zab: show commands
FAIL: gdb.base/gdbhistsize-history.exp: histsize=-5ab: show commands
FAIL: gdb.base/gdbhistsize-history.exp: histsize=99999999999999999999999999999999999: show commands
FAIL: gdb.base/gdbhistsize-history.exp: histsize=50: show commands

This happens for my setup due to my:
$ grep GDB ~/.bashrc
export GDBHISTFILE="$HOME/.gdb_history"

gdb/testsuite/ChangeLog
2016-04-07  Jan Kratochvil  <jan.kratochvil@redhat.com>

* gdb.base/gdbhistsize-history.exp: Save and unset GDBHISTFILE and
GDBHISTSIZE prior to the tests.
* gdb.base/gdbinit-history.exp: Likewise.
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.base/gdbhistsize-history.exp
gdb/testsuite/gdb.base/gdbinit-history.exp