From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from esa1.mentor.iphmx.com (esa1.mentor.iphmx.com [68.232.129.153]) by sourceware.org (Postfix) with ESMTPS id 58F2F39540CD for ; Tue, 23 Jun 2020 06:27:53 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 58F2F39540CD Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=Sandra_Loosemore@mentor.com IronPort-SDR: 0m8/hdEFdDkyvkunyPH4Nt9Nlim38S5gOCYZiBta8ksjkG+gp9iqTwS6+wZ9vUklVC3vNXXNui vEb2AfsreGoOKqzuzpBaECSrHC5STAjLmaY6s0fLNhGmd46T6+uMWqeXNokYMmdC5iObz0PrIE UFA6kcZY3YKv/I3G7ZFQmz4ntmlJPmeFS4L3ZD0Jc7FVgSA3moDDQzFvLyt1RVmyFsCnyja/c/ vcZry54Pk54c4Hgk/vB5FEjq2K/BTWOLVEqVcPA8AxRfIWGUNfLOIP8IzRuNkUTnRDLvbYLPzr DqY= X-IronPort-AV: E=Sophos;i="5.75,270,1589270400"; d="scan'208";a="52226901" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa1.mentor.iphmx.com with ESMTP; 22 Jun 2020 22:27:52 -0800 IronPort-SDR: hE8M6Y7KjIQ1R9RTq0qmixeryG+g8IT8SUp7vU1q9eJUppHCThb4Pw4WGatgAFXzhPNYQ6FDS2 3GYr629er6i9CPgGj+7ehOXVPe3SkzWD2TUShGy4XPuYbOt576dmPl4GBgUoWzDCNgS9WEf0r1 2OgXZ484F+1m4cfL+mut7v6+2U0IWTsgnBhbn7upGqs+BV1sId/r0wzSi8djXECOjU2y0MYddZ 9jf9kZuiuW+BirrrTbZvoOT3Shz4xSD9FlE5PzwvW5tgaYQe/lHCJG6ZtOxSLPJ9nOTQcz18/a B0E= To: "gdb-patches@sourceware.org" From: Sandra Loosemore Subject: [patch] gdb/testsuite: Adjust command completion output when TUI is disabled Message-ID: <73d8a79e-8dea-cbbb-a29f-925eda3230dd@codesourcery.com> Date: Tue, 23 Jun 2020 00:27:45 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------D33644C2CB784569DE111A56" Content-Language: en-US X-ClientProxiedBy: svr-orw-mbx-03.mgc.mentorg.com (147.34.90.203) To svr-orw-mbx-03.mgc.mentorg.com (147.34.90.203) X-Spam-Status: No, score=-10.4 required=5.0 tests=BAYES_00, GIT_PATCH_0, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org 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: , X-List-Received-Date: Tue, 23 Jun 2020 06:27:55 -0000 --------------D33644C2CB784569DE111A56 Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit This is another almost-obvious testsuite fix, for one of the command-completion tests that was failing due to an incorrect assumption that TUI commands are always present. OK to commit, or is this just a poorly-designed testcase that we should rewrite some other way instead? -Sandra --------------D33644C2CB784569DE111A56 Content-Type: text/x-patch; charset="UTF-8"; name="tui-commands.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="tui-commands.patch" commit 8e0cc2870a30390e745110d4c8181f010d09c17f Author: Sandra Loosemore Date: Mon Jun 22 23:01:19 2020 -0700 Adjust command completion output when TUI is disabled The history-scrolling commands "+", "-", "<" and ">" are only known to GDB when TUI is enabled. This means the "complete pipe " command produces different output depending on whether TUI is present, which in turn caused FAIL: gdb.base/shell.exp: cmd complete "pipe " This patch provides different patterns for that test depending on whether or not TUI is available. 2020-06-23 Sandra Loosemore gdb/testsuite/ * lib/completion-support.exp (test_gdb_completion_offers_commands): Adjust for omitted commands when TUI is disabled. diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index d6c43e6..38f2188 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2020-06-23 Sandra Loosemore + + * lib/completion-support.exp (test_gdb_completion_offers_commands): + Adjust for omitted commands when TUI is disabled. + 2020-06-22 Philippe Waroquiers * gdb.base/default-args.exp: New test. diff --git a/gdb/testsuite/lib/completion-support.exp b/gdb/testsuite/lib/completion-support.exp index 18eac82..51436cc 100644 --- a/gdb/testsuite/lib/completion-support.exp +++ b/gdb/testsuite/lib/completion-support.exp @@ -555,10 +555,19 @@ proc test_gdb_completion_offers_commands {input_line} { # Force showing two commands. gdb_test_no_output "set max-completions 2" "" - test_gdb_complete_multiple $input_line "" "" { - "!" - "+" - } "" "" 1 + # TUI adds additional commands to the possible completions, so we + # need different patterns depending on whether or not it is enabled. + if { [skip_tui_tests] } { + test_gdb_complete_multiple $input_line "" "" { + "!" + "actions" + } "" "" 1 + } else { + test_gdb_complete_multiple $input_line "" "" { + "!" + "+" + } "" "" 1 + } # Restore. gdb_test_no_output "set max-completions $max_completions" "" --------------D33644C2CB784569DE111A56--