From patchwork Fri May 4 15:02:52 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Burgess X-Patchwork-Id: 27109 Received: (qmail 107924 invoked by alias); 4 May 2018 15:03:00 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 107911 invoked by uid 89); 4 May 2018 15:03:00 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-25.0 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy=Commands, hex, *list, *List X-HELO: mail-wm0-f41.google.com Received: from mail-wm0-f41.google.com (HELO mail-wm0-f41.google.com) (74.125.82.41) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 04 May 2018 15:02:58 +0000 Received: by mail-wm0-f41.google.com with SMTP id t11so4567271wmt.0 for ; Fri, 04 May 2018 08:02:58 -0700 (PDT) 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; bh=/SHuKSv/Xl+VtkzOj5KTfAiO7eAAc5PKz/hd0//AHzI=; b=GFBXQHB/jeACeVq3x1se/nlZYhCaO1ZQlsQRKSoyolgonBYKJ1+5RfrExGclOx0X+e SA0LBA4e84Ij/n/4L2dIpTlhUiVkLZy/Kf/NHy8wrT283fG11oLRlz04hi9gZyrhfI3k MBc531RVVrrl//DyQGXn7XN/j6ZBy6XBJbv3Ls4/nZnVjx2LlURt2Ns2kvzWOtulIdIi 6g4VfLtGH0ecgPesMfaljnw4gNYDfh1x6Z8VQkF9G1XIc7E4d9uLHsu2VJxDrWmDkJsv eEYVlEvV9a3ANrQAwcB+U27ktwbz5PoyzJGV4BeYYjtavO4n4N9kS11U6+V7pvWO35OO 4xiQ== X-Gm-Message-State: ALQs6tAz6r2KNSH8bJTuE5qEJyIbnUEjklgso3RUzrEkT1RhMt1Z344Z KNGs3WNVw4hhr2U9FggQyTvAwOq1 X-Google-Smtp-Source: AB8JxZqva5xDm+GmcZ5GL7D1wFnx8BF0D1+o8WvcKQaRBVzqo8YkUO/TWGM53QVwIkQbBMP09sh9Ow== X-Received: by 10.28.158.144 with SMTP id h138mr18452326wme.33.1525446175857; Fri, 04 May 2018 08:02:55 -0700 (PDT) Received: from localhost (host81-147-175-127.range81-147.btcentralplus.com. [81.147.175.127]) by smtp.gmail.com with ESMTPSA id z72sm2103547wmc.28.2018.05.04.08.02.54 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 04 May 2018 08:02:55 -0700 (PDT) From: Andrew Burgess To: gdb-patches@sourceware.org Cc: Andrew Burgess Subject: [PATCH] gdb: Make test names unique in gdb.base/maint.exp Date: Fri, 4 May 2018 16:02:52 +0100 Message-Id: <20180504150252.21019-1-andrew.burgess@embecosm.com> X-IsSubscribed: yes Add prefixes or suffixes to some test names to make them unique. Replace a send_gdb/gdb_expect with a gdb_test, and make the test name unique. Remove test of 'help maint' as this is already covered by a later call to test_prefix_command_help. Removed test of 'help maint info' and add a new call to test_prefix_command_help instead. gdb/testsuite/ChangeLog: * gdb.base/maint.exp: Make test names unique, use test_prefix_command_help to test 'help maint info', and remove repeated test of 'help maint'. --- gdb/testsuite/ChangeLog | 6 ++++++ gdb/testsuite/gdb.base/maint.exp | 25 +++++++++---------------- 2 files changed, 15 insertions(+), 16 deletions(-) diff --git a/gdb/testsuite/gdb.base/maint.exp b/gdb/testsuite/gdb.base/maint.exp index f576cb38402..aefaeb01387 100644 --- a/gdb/testsuite/gdb.base/maint.exp +++ b/gdb/testsuite/gdb.base/maint.exp @@ -261,7 +261,7 @@ if { ! $have_gdb_index } { timeout { fail "$test_name (timeout)" } } gdb_test "shell rm -f $psymbols_output" ".*" \ - "shell rm -f psymbols_output" + "${test_name}: shell rm -f psymbols_output" } -re ".*$gdb_prompt $" { fail "$test_name" } timeout { fail "$test_name (timeout)" } @@ -282,14 +282,9 @@ gdb_expect { send_gdb "shell ls $msymbols_output\n" gdb_expect { -re "$msymbols_output_re\r\n$gdb_prompt $" { - send_gdb "shell grep factorial $msymbols_output\n" - gdb_expect { - -re "\\\[ *$decimal\\\] \[tT\]\[ \t\]+$hex \\.?factorial.*$gdb_prompt $" { - pass "maint print msymbols" - } - -re ".*$gdb_prompt $" { fail "maint print msymbols" } - timeout { fail "maint print msymbols (timeout)" } - } + gdb_test "shell grep factorial $msymbols_output" \ + "\\\[ *$decimal\\\] \[tT\]\[ \t\]+$hex \\.?factorial.*" \ + "maint print msymbols, absolute pathname" gdb_test "shell rm -f $msymbols_output" ".*" \ "shell rm -f msymbols_output" } @@ -313,7 +308,7 @@ gdb_test_multiple "maint print msymbols -objfile ${testfile} msymbols_output2" " -re "msymbols_output2\r\n$gdb_prompt $" { gdb_test "shell grep factorial msymbols_output2" \ "\\\[ *$decimal\\\] \[tT\]\[ \t\]+$hex \\.?factorial.*" \ - "maint print msymbols" + "maint print msymbols, relative pathname" gdb_test "shell rm -f msymbols_output2" ".*" } } @@ -352,7 +347,7 @@ foreach { test_name command } $test_list { timeout { fail "$test_name (timeout)" } } gdb_test "shell rm -f $symbols_output" ".*" \ - "shell rm -f symbols_output" + "$test_name: shell rm -f symbols_output" } -re ".*$gdb_prompt $" { fail "$test_name" } timeout { fail "$test_name (timeout)" } @@ -533,11 +528,9 @@ set timeout $oldtimeout #============test help on maint commands -gdb_test "help maint" \ - "Commands for use by GDB maintainers\\..*Includes commands to dump specific internal GDB structures in.*a human readable form, to cause GDB to deliberately dump core, etc\\..*List of maintenance subcommands:.*maintenance info.*maintenance internal-error.*maintenance print.*maintenance set.*maintenance show.*Type.*help maintenance.*followed by maintenance subcommand name for full documentation\\..*Command name abbreviations are allowed if unambiguous\\..*" - -gdb_test "help maint info" \ - "Commands for showing internal info about the program being debugged.*unambiguous\\..*" +test_prefix_command_help {"maint info" "maintenance info"} { + "Commands for showing internal info about the program being debugged\\.\[\r\n\]+" +} test_prefix_command_help {"maint print" "maintenance print"} { "Maintenance command for printing GDB internal state\\.\[\r\n\]+"