public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
From: Tom Tromey <tromey@sourceware.org>
To: gdb-cvs@sourceware.org
Subject: [binutils-gdb] Don't let .gdb_history file cause failures
Date: Wed,  8 Feb 2023 17:20:33 +0000 (GMT)	[thread overview]
Message-ID: <20230208172033.4774E3858C39@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=300fa060abbfd8d36c81d8cc777ea1f32f07b4f0

commit 300fa060abbfd8d36c81d8cc777ea1f32f07b4f0
Author: Tom Tromey <tromey@adacore.com>
Date:   Thu Jan 19 11:19:32 2023 -0700

    Don't let .gdb_history file cause failures
    
    I had a .gdb_history file in my testsuite directory in the build tree,
    and this provoked a failure in gdbhistsize-history.exp.  It seems
    simple to prevent this file from causing a failure.

Diff:
---
 gdb/testsuite/gdb.base/gdbhistsize-history.exp | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/gdb/testsuite/gdb.base/gdbhistsize-history.exp b/gdb/testsuite/gdb.base/gdbhistsize-history.exp
index 59fd2d0c143..00c3ea4dde2 100644
--- a/gdb/testsuite/gdb.base/gdbhistsize-history.exp
+++ b/gdb/testsuite/gdb.base/gdbhistsize-history.exp
@@ -35,6 +35,10 @@ proc test_histsize_history_setting { histsize size { env_var "GDBHISTSIZE" } } {
 	unset -nocomplain env(GDBHISTFILE)
 	unset -nocomplain env(GDBHISTSIZE)
 
+	# Ensure we don't accidentally pick up a .gdb_history from the
+	# testsuite directory.
+	set env(GDBHISTFILE) [standard_output_file .gdb_history]
+
 	set env($env_var) $histsize
 
 	with_test_prefix "histsize=$histsize" {

                 reply	other threads:[~2023-02-08 17:20 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230208172033.4774E3858C39@sourceware.org \
    --to=tromey@sourceware.org \
    --cc=gdb-cvs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).