From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30318 invoked by alias); 28 Apr 2011 11:56:08 -0000 Received: (qmail 30307 invoked by uid 22791); 28 Apr 2011 11:56:07 -0000 X-SWARE-Spam-Status: No, hits=-6.8 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,TW_DF,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 28 Apr 2011 11:55:49 +0000 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p3SBtnQe006732 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 28 Apr 2011 07:55:49 -0400 Received: from dhcp-25-89.brq.redhat.com (pdp-11.brq.redhat.com [10.34.24.63]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p3SBtmvX032540 for ; Thu, 28 Apr 2011 07:55:49 -0400 Message-ID: <4DB955C4.506@redhat.com> Date: Thu, 28 Apr 2011 11:56:00 -0000 From: Marek Polacek User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.9) Gecko/20100827 Red Hat Thunderbird/3.1.3 MIME-Version: 1.0 To: "gdb-patches@sourceware.org" Subject: Re: [RFC] Fixing gdb.base/completion.exp (PR testsuite/12649) References: <4DB82F26.30801@redhat.com> In-Reply-To: <4DB82F26.30801@redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2011-04/txt/msg00538.txt.bz2 Ok, here's a stab at the first part of this test. What I tried to do is to convert "send_gdb + sleep + gdb_expect" to gdb_test{,_multiple,no_output}. Also some quick notes indicated by `XXX'. Do you agree with it so far? I've tried to preserve all the already existing tests. Thanks. [ ... ] set oldtimeout1 $timeout set timeout 30 gdb_test_no_output "complete hfgfh" "complete 'hfgfh'" #exp_internal 0 gdb_test "complete show output" "show output-radix" "complete 'show output'" gdb_test "complete show output-" "show output-radix" "complete 'show output-'" gdb_test "complete p" "passcount\r\npath\r\nprint\r\nprint-object\r\nprintf\r\nptype\r\npwd\r\npython" \ "complete 'p'" # It is not possible to use `complete' here since this would list all # the symbols. gdb_test "p \t" "The history is empty." "complete 'p '" gdb_test_no_output "complete info t foo" "complete 'info t foo'" # XXX Should we list everything, i.e. "info target\r\ninfo tasks\r\ninfo terminal\r\n..."? gdb_test "complete info t" "\(info \[a-z\]+\r\n\)*" "complete 'info t'" gdb_test_no_output "complete info t " "complete 'info t '" gdb_test_no_output "complete info asdfgh" "complete 'info asdfgh'" gdb_test_no_output "complete info asdfgh\\x20" "complete 'info asdfgh '" gdb_test "complete info" "info" "complete 'info'" gdb_test "complete info " "\(info \[a-z\]+\r\n\)*" "complete 'info '" gdb_test "info" "\"info\".*unambiguous\\." "complete (2) 'info '" gdb_test "complete help info wat" "help info watchpoints" "complete 'help info wat'" # XXX # Does the `complete' behave correct? # (gdb) p "break1 -> (gdb) p "break1.c" # (gdb) complete p "break1 -> p "break1.c # No `"' here? ------------------------> ^ # We proceed as it is. gdb_test "complete p \"break1" "p \"break1.c" "complete 'p \"break1'" # XXX Here was: # setup_xfail "*-*-*" gdb_test "complete p \"break1." "p \"break1\\.c" "complete 'p \"break1.'" gdb_test "p 'arg\t" "Unmatched single quote\\." "complete 'p \'arg'" gdb_test "p 'arg\t\t" ".*argv.*" "complete (2) 'p \'arg'" # These tests used to try completing the shorter "p b-a". # Unfortunately, on some systems, there are .o files in system # libraries which declare static variables named `b'. Of course, [ ... ]