From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3396 invoked by alias); 2 Sep 2011 20:45:18 -0000 Received: (qmail 3388 invoked by uid 22791); 2 Sep 2011 20:45:17 -0000 X-SWARE-Spam-Status: No, hits=-6.8 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,SPF_HELO_PASS 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; Fri, 02 Sep 2011 20:44:59 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p82KiwpH020454 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 2 Sep 2011 16:44:59 -0400 Received: from host1.jankratochvil.net (ovpn-116-38.ams2.redhat.com [10.36.116.38]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p82KiubK022547 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 2 Sep 2011 16:44:58 -0400 Received: from host1.jankratochvil.net (localhost [127.0.0.1]) by host1.jankratochvil.net (8.14.4/8.14.4) with ESMTP id p82Kitg3027092; Fri, 2 Sep 2011 22:44:55 +0200 Received: (from jkratoch@localhost) by host1.jankratochvil.net (8.14.4/8.14.4/Submit) id p82Kit09027088; Fri, 2 Sep 2011 22:44:55 +0200 Date: Fri, 02 Sep 2011 21:04:00 -0000 From: Jan Kratochvil To: Abhijit Halder Cc: gdb-patches@sourceware.org Subject: Re: [PATCH][TEST-CASE][DOC] Implementation of pipe to pass GDB's command output to a shell command. Message-ID: <20110902204454.GA23897@host1.jankratochvil.net> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) 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-09/txt/msg00043.txt.bz2 On Wed, 31 Aug 2011 17:09:30 +0200, Abhijit Halder wrote: > --- src/gdb/pipe.c 2011-07-29 15:15:26.078048517 +0530 > +++ dst/gdb/pipe.c 2011-08-29 18:50:14.000000000 +0530 [...] > +#if defined(__MINGW32__) -> +#if defined (__MINGW32__) Not GNU Coding Style compliant although it is so common in GDB I do not mind (already commented before). > +# define SHELL "cmd.exe" > +# define OPTION_TO_SHELL "/c" > +#else > +# define SHELL "/bin/sh" > +# define OPTION_TO_SHELL "-c" > +#endif [...] > --- src/gdb/testsuite/gdb.base/pipe.exp 2011-08-16 22:37:45.969351119 +0530 > +++ dst/gdb/testsuite/gdb.base/pipe.exp 2011-08-25 03:10:05.000000000 +0530 > @@ -0,0 +1,52 @@ [...] > + regsub -all {\$[0-9]+} $fdata {} pattern > + if ![string match $pattern " = 120 'x'\n"] then { Instead of regsub + string match just: if ![string match "* = 120 'x'\n" $fdata] then { You have opposite order of the pattern vs. string in the `string match' otherwise. > + fail $test > + } else { > + pass $test > + } > +}