From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id yCV6Lt3mUWC5ewAAWB0awg (envelope-from ) for ; Wed, 17 Mar 2021 07:24:13 -0400 Received: by simark.ca (Postfix, from userid 112) id B7AE41EF78; Wed, 17 Mar 2021 07:24:13 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=0.4 required=5.0 tests=DKIM_SIGNED,MAILING_LIST_MULTI, RDNS_NONE,T_DKIM_INVALID,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.2 Received: from sourceware.org (unknown [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id B2AE11EF64 for ; Wed, 17 Mar 2021 07:24:12 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 64A7E384A02B; Wed, 17 Mar 2021 11:24:12 +0000 (GMT) Received: from mail-wm1-x32e.google.com (mail-wm1-x32e.google.com [IPv6:2a00:1450:4864:20::32e]) by sourceware.org (Postfix) with ESMTPS id B026C384B072 for ; Wed, 17 Mar 2021 11:24:09 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org B026C384B072 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=embecosm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=andrew.burgess@embecosm.com Received: by mail-wm1-x32e.google.com with SMTP id p19so1257403wmq.1 for ; Wed, 17 Mar 2021 04:24:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embecosm.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Oq6ETeonjivOD9nKKoXVLIWmIpJhg1W1CaT2NIH57Ug=; b=bWpNBjYGjhAmhFf/q+ouIsSGwRHAih6WwY9gHG3nF6vthEPbzrKYKjbDFoLQfcZBON YSoVCYSeFj2okblfYm2nsv69Wkhz/YzBx19iMvrYNrN7NkfmIKaKfB1rAz3QXWq1WRkd IPrJc9QuiWJY3OkzZvOznQRz/GCGOybwUKprxwjYitIA1fbcfkLAkr9KRyuMUTX724b8 eqmUJMn2Yxb/UQKBrgumQDq+CFQL5+Wwgr+eK7wKX0XbuVVsJAq/rPbexnhtewzmPRFe TulMpvSIoik+S6f8sfOKLLiStmve2RiH+Amns+XDky4Rv4DyWZrgwu+O9c7GFwHI0En7 uXHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Oq6ETeonjivOD9nKKoXVLIWmIpJhg1W1CaT2NIH57Ug=; b=QkYoUdvzMobmG31g9hMR8VWip42pVbJcbw098PeAysFyuQC3XKnroLO8csmtpGd4qp fl937LDPMgU+bJUYFeQpchVSIMDkxXIOoYcyyDppBkCo6dMc8xsZzhXhDMp21pbro7FZ NN1712q8RukNH3vDElDJaN7PvJ+hPg4wr5onQsKUFuP3M83a1DvmOtarKQfDumdTzbrW WOXAR7iCwpMd1MdQkMG5h3yk1XGFQAt1R9iog4D86fVPFjZ8iqvs8lSJu8sdYqWqs7OL B+dHAvvGKgy2IyzbQ4bd0yDvdOJ/JBol/4TTv05rVqGYmHETGp55v8JlME+/UTzFCL1B dFlg== X-Gm-Message-State: AOAM533GP0z2HKo1/+UiQIC3Fn0Pw/W7LtYOEqGCkMngTA5Ta9+660Re +xBkj77dFA7bniDIBkS4f2pA/FvVe/h6SA== X-Google-Smtp-Source: ABdhPJzJNYjRMglx4szEyCJxF3UbUXYpv3Ywq+TyVeL/6cJjndxpgEqyvohPeS7D3ahPwuWIzmsmXQ== X-Received: by 2002:a05:600c:22d9:: with SMTP id 25mr3180513wmg.108.1615980248513; Wed, 17 Mar 2021 04:24:08 -0700 (PDT) Received: from localhost (host86-134-238-232.range86-134.btcentralplus.com. [86.134.238.232]) by smtp.gmail.com with ESMTPSA id e8sm2166667wme.14.2021.03.17.04.24.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Mar 2021 04:24:08 -0700 (PDT) From: Andrew Burgess To: gdb-patches@sourceware.org Subject: [PATCH 5/5] gdb/testsuite: resolve remaining duplicate test names in gdb.cp/*.exp Date: Wed, 17 Mar 2021 11:24:01 +0000 Message-Id: <522d6292904c9e29daa57b0a1ac87482d358badc.1615980148.git.andrew.burgess@embecosm.com> X-Mailer: git-send-email 2.25.4 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces@sourceware.org Sender: "Gdb-patches" This commit resolves the remaining duplicate test names in gdb.cp/*.exp. These are all the easy duplicates, I'm either giving tests a new, unique name, extending an existing name to make it unique, or changing an existing name to better reflect what the test is actually doing, and thus, making this test name unique. There should be no change in what is tested after this commit. gdb/testsuite/ChangeLog: * gdb.cp/breakpoint.exp: Extend test names to make them unique. * gdb.cp/casts.exp: Give tests unique names. * gdb.cp/filename.exp: Likewise. * gdb.cp/gdb2495.exp: Likewise. * gdb.cp/mb-ctor.exp: Extend test names to make them unique. * gdb.cp/misc.exp: Rename test to make it unique. * gdb.cp/nsnested.exp: Give tests unique names. * gdb.cp/ovldbreak.exp: Likewise. * gdb.cp/pr17494.exp: Rename test to reflect what is actually being tested. This also removes the duplicate test name. * gdb.cp/ref-types.exp: Likewise. * gdb.cp/temargs.exp: Likewise. --- gdb/testsuite/ChangeLog | 15 +++++++++++++++ gdb/testsuite/gdb.cp/breakpoint.exp | 8 ++++---- gdb/testsuite/gdb.cp/casts.exp | 6 ++++-- gdb/testsuite/gdb.cp/filename.exp | 6 ++++-- gdb/testsuite/gdb.cp/gdb2495.exp | 6 ++++-- gdb/testsuite/gdb.cp/mb-ctor.exp | 4 ++-- gdb/testsuite/gdb.cp/misc.exp | 2 +- gdb/testsuite/gdb.cp/nsnested.exp | 9 ++++++--- gdb/testsuite/gdb.cp/ovldbreak.exp | 6 ++++-- gdb/testsuite/gdb.cp/pr17494.exp | 2 +- gdb/testsuite/gdb.cp/ref-types.exp | 2 +- gdb/testsuite/gdb.cp/temargs.exp | 2 +- 12 files changed, 47 insertions(+), 21 deletions(-) diff --git a/gdb/testsuite/gdb.cp/breakpoint.exp b/gdb/testsuite/gdb.cp/breakpoint.exp index 3f2e8229a2d..e98b79e5dc2 100644 --- a/gdb/testsuite/gdb.cp/breakpoint.exp +++ b/gdb/testsuite/gdb.cp/breakpoint.exp @@ -51,10 +51,10 @@ set bp_location1 [gdb_get_line_number "conditional breakpoint in method"] set bp_location2 [gdb_get_line_number "conditional breakpoint in method 2"] gdb_test "break $bp_location1 if i_==3" ".*Breakpoint.*" "conditional breakpoint in method" gdb_test "break $bp_location2 if i_==3" ".*Breakpoint.*" "conditional breakpoint in method 2" -gdb_test "continue" ".*Breakpoint.*C1::foo.*" "continue to breakpoint" -gdb_test "print i_" "\\\$1 = 3" "check the member variable" -gdb_test "continue" ".*Breakpoint.*C1::bar.*" "continue to breakpoint" -gdb_test "print i_" "\\\$2 = 3" "check the member variable" +gdb_test "continue" ".*Breakpoint.*C1::foo.*" "continue to breakpoint in C1::foo" +gdb_test "print i_" "\\\$1 = 3" "check the member variable from within C1::foo" +gdb_test "continue" ".*Breakpoint.*C1::bar.*" "continue to breakpoint in C1::bar" +gdb_test "print i_" "\\\$2 = 3" "check the member variable from within C1::bar" gdb_exit diff --git a/gdb/testsuite/gdb.cp/casts.exp b/gdb/testsuite/gdb.cp/casts.exp index beb3c94ce8c..7bd879c4112 100644 --- a/gdb/testsuite/gdb.cp/casts.exp +++ b/gdb/testsuite/gdb.cp/casts.exp @@ -43,7 +43,8 @@ if ![runto_main] then { } # Prevent symbol on address 0x0 being printed. -gdb_test_no_output "set print symbol off" +gdb_test_no_output "set print symbol off" \ + "turn of symbol printing for the first time" gdb_test "break [gdb_get_line_number "casts.exp: 1"]" \ "Breakpoint.*at.* file .*" \ @@ -184,7 +185,8 @@ if ![runto_main] then { } # Prevent symbol on address 0x0 being printed. -gdb_test_no_output "set print symbol off" +gdb_test_no_output "set print symbol off" \ + "turn of symbol printing for the second time" gdb_breakpoint [gdb_get_line_number "casts.exp: 1" $srcfile2] gdb_continue_to_breakpoint "end of casts03" diff --git a/gdb/testsuite/gdb.cp/filename.exp b/gdb/testsuite/gdb.cp/filename.exp index bf12ac6365b..3a2e9bd88bc 100644 --- a/gdb/testsuite/gdb.cp/filename.exp +++ b/gdb/testsuite/gdb.cp/filename.exp @@ -31,14 +31,16 @@ gdb_continue_to_breakpoint "stop inside C" gdb_test "print includefile\[0\]" " = 23" gdb_test "print this->includefile\[0\]" " = 23" -gdb_test "print 'includefile'::some_global" " = 27" +gdb_test "print 'includefile'::some_global" " = 27" \ + "print some_global from within C" gdb_breakpoint [gdb_get_line_number "stop inside D"] gdb_continue_to_breakpoint "stop inside D" gdb_test "print includefile()" " = 24" gdb_test "print this->includefile()" " = 24" -gdb_test "print 'includefile'::some_global" " = 27" +gdb_test "print 'includefile'::some_global" " = 27" \ + "print some_global from within D" gdb_breakpoint [gdb_get_line_number "stop outside"] gdb_continue_to_breakpoint "stop outside" diff --git a/gdb/testsuite/gdb.cp/gdb2495.exp b/gdb/testsuite/gdb.cp/gdb2495.exp index a52368f12e4..5eb13ac9a90 100644 --- a/gdb/testsuite/gdb.cp/gdb2495.exp +++ b/gdb/testsuite/gdb.cp/gdb2495.exp @@ -122,7 +122,8 @@ gdb_test "show unwindonsignal" \ # Check to see if new behaviour interferes with # normal signal handling in inferior function calls. gdb_test "p exceptions.raise_signal(1)" \ - "To change this behavior use \"set unwindonsignal off\".*" + "To change this behavior use \"set unwindonsignal off\".*" \ + "check for unwindonsignal off message" # And reverse - turn off again. gdb_test_no_output "set unwindonsignal off" @@ -135,4 +136,5 @@ gdb_test "show unwindonsignal" \ # Check to see if new behaviour interferes with # normal signal handling in inferior function calls. gdb_test "p exceptions.raise_signal(1)" \ - "To change this behavior use \"set unwindonsignal on\".*" + "To change this behavior use \"set unwindonsignal on\".*" \ + "check for unwindonsignal on message" diff --git a/gdb/testsuite/gdb.cp/mb-ctor.exp b/gdb/testsuite/gdb.cp/mb-ctor.exp index 9bbfb55ddc8..ae352adc0ce 100644 --- a/gdb/testsuite/gdb.cp/mb-ctor.exp +++ b/gdb/testsuite/gdb.cp/mb-ctor.exp @@ -51,13 +51,13 @@ gdb_test "continue" \ ".*Breakpoint.*Derived.*i=7.*" \ "run to breakpoint 1 v1" -gdb_continue_to_breakpoint "set breakpoint here" ".* breakpoint here" +gdb_continue_to_breakpoint "set breakpoint here, first time" ".* breakpoint here" gdb_test "continue" \ ".*Breakpoint.*Derived.*i=15.*" \ "run to breakpoint 1 v2" -gdb_continue_to_breakpoint "set breakpoint here" ".* breakpoint here" +gdb_continue_to_breakpoint "set breakpoint here, second time" ".* breakpoint here" gdb_test "continue" \ ".*Breakpoint.*~Derived.*" \ diff --git a/gdb/testsuite/gdb.cp/misc.exp b/gdb/testsuite/gdb.cp/misc.exp index aa830312ba1..8219b23d618 100644 --- a/gdb/testsuite/gdb.cp/misc.exp +++ b/gdb/testsuite/gdb.cp/misc.exp @@ -111,6 +111,6 @@ gdb_test "print 'misc.cc'::v_bool" " = true" \ gdb_test "print *(v_bool_array + number_ref)" "\\$\[0-9\]* = false" \ "pointer addition with integer reference" gdb_test "print *(number_ref + v_bool_array)" "\\$\[0-9\]* = false" \ - "pointer addition with integer reference" + "integer reference addition with pointer" gdb_test "print *(v_bool_array - number_ref)" "\\$\[0-9\]* = false" \ "pointer subtraction with integer reference" diff --git a/gdb/testsuite/gdb.cp/nsnested.exp b/gdb/testsuite/gdb.cp/nsnested.exp index 965deadd570..4e5bd5e5c62 100644 --- a/gdb/testsuite/gdb.cp/nsnested.exp +++ b/gdb/testsuite/gdb.cp/nsnested.exp @@ -25,17 +25,20 @@ if ![runto_main] then { continue } -gdb_test "print ab" "No symbol .* in current context." +gdb_test "print ab" "No symbol .* in current context." \ + "ensure symbol ab is not known in main" ############################################ gdb_breakpoint C::first gdb_continue_to_breakpoint "C::first" -gdb_test "print ab" "No symbol .* in current context." +gdb_test "print ab" "No symbol .* in current context." \ + "ensure symbol ab is not known in C::first" gdb_test "print C::D::ab" "= 11" ############################################ gdb_breakpoint C::D::second gdb_continue_to_breakpoint "C::D::second" -gdb_test "print ab" "= 11" +gdb_test "print ab" "= 11" \ + "ensure symbol ab is known in C::D::second" diff --git a/gdb/testsuite/gdb.cp/ovldbreak.exp b/gdb/testsuite/gdb.cp/ovldbreak.exp index 1a61c7d0f1f..ca04d499605 100644 --- a/gdb/testsuite/gdb.cp/ovldbreak.exp +++ b/gdb/testsuite/gdb.cp/ovldbreak.exp @@ -388,13 +388,15 @@ foreach type $all_types { # is set to "cancel" gdb_test_no_output "set multiple-symbols cancel" gdb_test "break foo::foofunc" \ - "canceled.*" + "canceled.*" \ + "break on ambiguous symbol when multiple-symbols is set to cancel" # Test breaking on an overloaded function when multiple-symbols # is set to "all" gdb_test_no_output "set multiple-symbols all" gdb_test "break foo::foofunc" \ - "Breakpoint \[0-9\]+ at ${hex}: foo::foofunc. .2 locations..*" + "Breakpoint \[0-9\]+ at ${hex}: foo::foofunc. .2 locations..*" \ + "break on ambiguous symbol when multiple-symbols is set to all" # That's all, folks. diff --git a/gdb/testsuite/gdb.cp/pr17494.exp b/gdb/testsuite/gdb.cp/pr17494.exp index 127978b0084..066c4631f30 100644 --- a/gdb/testsuite/gdb.cp/pr17494.exp +++ b/gdb/testsuite/gdb.cp/pr17494.exp @@ -31,7 +31,7 @@ gdb_breakpoint [gdb_get_line_number "Break here"] gdb_continue_to_breakpoint "Break here" gdb_test "p a.geta()" ".* = 12345" "a.geta()" -gdb_test "p a_ptr->geta()" ".* = 12345" "a.geta()" +gdb_test "p a_ptr->geta()" ".* = 12345" "a_ptr->geta()" gdb_test "p false ? a.geta() : 123" ".* = 123" "ternop 1" gdb_test "p false ? a_ptr->geta() : 123" ".* = 123" "ternop 2" diff --git a/gdb/testsuite/gdb.cp/ref-types.exp b/gdb/testsuite/gdb.cp/ref-types.exp index e38aad45731..9bd93f32602 100644 --- a/gdb/testsuite/gdb.cp/ref-types.exp +++ b/gdb/testsuite/gdb.cp/ref-types.exp @@ -242,7 +242,7 @@ gdb_test "print rI" ".\[0-9\]* = \\(int &\\) @$hex: 102" \ gdb_test "print rUI" \ ".\[0-9\]* = \\(unsigned int &\\) @$hex: 1002" \ - "print value of UI" + "print value of rUI" gdb_test_multiple "print rL" "print value of rL" { -re ".\[0-9\]* = \\(long &\\) @$hex: -234.*$gdb_prompt $" { diff --git a/gdb/testsuite/gdb.cp/temargs.exp b/gdb/testsuite/gdb.cp/temargs.exp index f372cc3f0fc..58c3c0a1cfe 100644 --- a/gdb/testsuite/gdb.cp/temargs.exp +++ b/gdb/testsuite/gdb.cp/temargs.exp @@ -136,7 +136,7 @@ gdb_test "print I" " = 91" "test value of I in func" # PR symtab/16842 - gdb used to crash here. if $have_older_template_gcc { setup_xfail "*-*-*" } -gdb_test "info addr I" "Symbol \"I\" is constant." "test address of I in templ_m" +gdb_test "info addr I" "Symbol \"I\" is constant." "test address of I in func" if $have_older_template_gcc { setup_xfail "*-*-*" } gdb_test "print P == &a_global" " = true" "test value of P in func" -- 2.25.4