From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 50461 invoked by alias); 27 Apr 2017 22:37:58 -0000 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 Received: (qmail 50444 invoked by uid 89); 27 Apr 2017 22:37:57 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_NONE autolearn=no version=3.3.2 spammy= X-HELO: mail-wm0-f48.google.com Received: from mail-wm0-f48.google.com (HELO mail-wm0-f48.google.com) (74.125.82.48) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 27 Apr 2017 22:37:56 +0000 Received: by mail-wm0-f48.google.com with SMTP id m123so31581396wma.0 for ; Thu, 27 Apr 2017 15:37:57 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=km5k9Sw3edyxhELEhkQOTAU7MDql4nxyzGareLS9kDQ=; b=Hl9ort9z7hEspS3EDXI2gzvRQocz53LlMC2t4LcGVXFc1J63Abq6nLZjVrWOH2sMbF 3neWPOVjhnXGk91KpE6coFYGsfOlLvpisDRQl0AE4AcV6j8+laSPLKAh6lHepBGd3dyV adHmyjwFR3AIwm1e0WsfWyckNQWNshr3KSFdNmQEEYfN93X1g5NxFjgFqygYwFL/klPd iJFAOmv11AmJQXF9iJyyhghqJP8YqbdyEVtsORFqKbk7SYdfmdDjp4fp4fS8S0WeSB0W Xoz42VzwN16a8tLjiHGQ1hJfYL8Pel2KKpaNUPg0qBPBKW85EiPbIyvEMsUpdtZQ5vdI IL8Q== X-Gm-Message-State: AN3rC/7VJm976iIsXvnI66KB9gOvfQIKq4kY3AMOodqw/UYdROgmpVPv hzA1wDne6Qk2aLc3SqSP0g== X-Received: by 10.28.1.88 with SMTP id 85mr3915435wmb.97.1493332676113; Thu, 27 Apr 2017 15:37:56 -0700 (PDT) Received: from [192.168.0.102] ([37.189.166.198]) by smtp.gmail.com with ESMTPSA id v7sm411265wme.5.2017.04.27.15.37.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 27 Apr 2017 15:37:55 -0700 (PDT) Subject: Re: [PATCH v3] Make environ.exp run on all platforms (and create info-program.exp) To: Sergio Durigan Junior References: <20170331172901.23402-1-sergiodj@redhat.com> <20170426222833.9679-1-sergiodj@redhat.com> <03a5e3b7-054a-4c2b-a41b-b496333f349a@redhat.com> <874lx9zn4w.fsf@redhat.com> Cc: GDB Patches , Luis Machado From: Pedro Alves Message-ID: <977918db-acba-00a8-18ef-8e2ae146348c@redhat.com> Date: Thu, 27 Apr 2017 22:37:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <874lx9zn4w.fsf@redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SW-Source: 2017-04/txt/msg00758.txt.bz2 On 04/27/2017 08:06 PM, Sergio Durigan Junior wrote: > # Verify that GDB can manipulate the distinguished PATH variable. > -# > -send_gdb "path /tmp/FOOBARBAZGRUNGESPAZBALL\n" > -gdb_expect { > - -re ".*Executable and object file path: /tmp/FOOBARBAZGRUNGESPAZBALL.*$gdb_prompt $"\ > - {pass "issue path"} > - -re "$gdb_prompt $"\ > - {fail "issue path"} > - timeout {fail "(timeout) issue path"} > -} > -send_gdb "show paths\n" > -gdb_expect { > - -re "Executable and object file path: /tmp/FOOBARBAZGRUNGESPAZBALL.*$gdb_prompt $"\ > - {pass "show paths"} > - -re "$gdb_prompt $"\ > - {fail "show paths"} > - timeout {fail "(timeout) show paths"} > -} > +gdb_test "path /tmp/FOOBARBAZGRUNGESPAZBALL" \ > + ".*Executable and object file path: /tmp/FOOBARBAZGRUNGESPAZBALL.*" \ > + "set path containing env var name" Can you drop the redundant leading ".*" in the regexes while at it? I saw a couple in info-program.exp, but there might be more throughout the patch. BTW, re. the test msg above, I don't think that the fact that that funny name was used as env var name in the previous tests is relevant. > +gdb_test "show paths" \ > + "Executable and object file path: /tmp/FOOBARBAZGRUNGESPAZBALL.*" \ > + "show paths correctly show path with env var name" Ditto. (and "correctly shows path") > +# We don't really care where this step lands, so long as it gets > +# the inferior pushed off the breakpoint it's currently on... > +gdb_test "next" "$decimal\t.*" "advancing pc" s/advancing/advance. But the old test message was better IMO: > - {pass "step before info program"} because the next test is explicitly checking that "It stopped after being stepped" is printed. OK with the nits above addressed. Thanks, Pedro Alves