From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-x32a.google.com (mail-wm1-x32a.google.com [IPv6:2a00:1450:4864:20::32a]) by sourceware.org (Postfix) with ESMTPS id A48DD3893668 for ; Tue, 23 Jun 2020 08:39:47 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org A48DD3893668 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-x32a.google.com with SMTP id l17so2176933wmj.0 for ; Tue, 23 Jun 2020 01:39:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embecosm.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=WZ+AKSFaV1DJwWoitsjELulEHqiT3EN40Y7K7KH7qsk=; b=IrqE8gxM86s4SXDUln5ZgDjvGwvVGuACfJQMG603JAT3Ki0k59ADM1bI5O7q7uHmgB 8La+wopBrnZBywvmUp+/8oIqOKeFUtD1C9czXt9D74yByf+JDpHQ5DwykC2B7wZ2UaD0 UoU9QY0QqJ/PWX06WGtFISDbXWOprOwCpIR8SyIVKNf6jjA2fw2GP+BIARo05DiMrycS hnBHAvA3o+gqnh2XLWBdKSDkJpBsClew9W/Z4zGhiyKNP2Gsscc3oBBL6NTCrwEE3ZIM qa4fPF9ENwXTDwhKNZkZf7XK0dcfnrUf934cn4gYcbuegiClOKpWwqxD5b/uAWdX0MwP xOVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=WZ+AKSFaV1DJwWoitsjELulEHqiT3EN40Y7K7KH7qsk=; b=iYKQKWExLK5thet9YM1flecSG8uEIMmdM0/tLkZw5PA71bipXUTf+Oc7OUDFtEvpw1 NGc0iv4qOmFHYwBDX+NCF94ze8cJdfoCGyxDhVEh2rjKXmLs1+AGNaJiZm33DX+S2hJx fsxdywXuKUB1SdvtXpJGFNLA1tu7f+WWrVDq6MZ77Vj9ocizcabUDwuC2YXFX27RyrjF w1EAe5af4fiTccpGgzWNd0S0G4QE4tFLALxYYnLOUE/gg+xm51CgbiAvriY70Z/s454C czpYjBw0tBSc+9mkj6uXKyvczRV2EdSawlyd4cNWi6ibuKQX67Txu2KMciBOXoEQ01HH o31g== X-Gm-Message-State: AOAM530y54K5DzSF7eQBQ8r5GhspCmwOHpOntUMgZ0vL1SyFA7hBaspN fIiXUZx0febYMM6+HB/Lj+5NJdZlJzM= X-Google-Smtp-Source: ABdhPJw3bhVjt+q+4TT/KXsV9Q8EyGwlMuL/gDFCShJ4TMtBLxYEvAicGHKZpryyseVINh9xfFPUEA== X-Received: by 2002:a7b:c441:: with SMTP id l1mr21709980wmi.7.1592901586717; Tue, 23 Jun 2020 01:39:46 -0700 (PDT) Received: from localhost (host86-128-12-16.range86-128.btcentralplus.com. [86.128.12.16]) by smtp.gmail.com with ESMTPSA id e5sm21712686wrw.19.2020.06.23.01.39.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Jun 2020 01:39:46 -0700 (PDT) Date: Tue, 23 Jun 2020 09:39:45 +0100 From: Andrew Burgess To: Sandra Loosemore Cc: "gdb-patches@sourceware.org" Subject: Re: [patch] gdb/testsuite: Adjust command completion output when TUI is disabled Message-ID: <20200623083945.GN2737@embecosm.com> References: <73d8a79e-8dea-cbbb-a29f-925eda3230dd@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <73d8a79e-8dea-cbbb-a29f-925eda3230dd@codesourcery.com> X-Operating-System: Linux/5.6.15-200.fc31.x86_64 (x86_64) X-Uptime: 09:39:25 up 14 days, 22:46, X-Editor: GNU Emacs [ http://www.gnu.org/software/emacs ] X-Spam-Status: No, score=-9.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_BARRACUDACENTRAL, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, 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 08:39:50 -0000 * Sandra Loosemore [2020-06-23 00:27:45 -0600]: > 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 > 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. LGTM. Thanks, Andrew > > 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" ""