From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26042 invoked by alias); 20 Aug 2011 18:52:08 -0000 Received: (qmail 26034 invoked by uid 22791); 20 Aug 2011 18:52:07 -0000 X-SWARE-Spam-Status: No, hits=-7.0 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; Sat, 20 Aug 2011 18:51:49 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p7KIpfZx005525 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sat, 20 Aug 2011 14:51:41 -0400 Received: from host1.jankratochvil.net (ovpn-116-42.ams2.redhat.com [10.36.116.42]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id p7KIpcPZ018046 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 20 Aug 2011 14:51:40 -0400 Received: from host1.jankratochvil.net (localhost [127.0.0.1]) by host1.jankratochvil.net (8.14.4/8.14.4) with ESMTP id p7KIpb29007493; Sat, 20 Aug 2011 20:51:37 +0200 Received: (from jkratoch@localhost) by host1.jankratochvil.net (8.14.4/8.14.4/Submit) id p7KIpaHR007492; Sat, 20 Aug 2011 20:51:36 +0200 Date: Sat, 20 Aug 2011 18:52:00 -0000 From: Jan Kratochvil To: Abhijit Halder Cc: Eli Zaretskii , sergiodj@redhat.com, tromey@redhat.com, pedro@codesourcery.com, gdb-patches@sourceware.org Subject: Re: [PATCH] An implementation of pipe to make I/O communication between gdb and shell. [MinGW question] Message-ID: <20110820185136.GA6930@host1.jankratochvil.net> References: <83y5ywulun.fsf@gnu.org> <20110814170136.GA26819@host1.jankratochvil.net> <83sjp3vkze.fsf@gnu.org> <20110814195523.GA7588@host1.jankratochvil.net> <83bovptr1u.fsf@gnu.org> <20110816173009.GA12303@host1.jankratochvil.net> 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-08/txt/msg00404.txt.bz2 On Wed, 17 Aug 2011 10:26:36 +0200, Abhijit Halder wrote: > --- src/gdb/testsuite/gdb.base/pipe.exp 2011-08-16 22:37:45.969351119 +0530 > +++ dst/gdb/testsuite/gdb.base/pipe.exp 2011-08-17 13:49:26.195383001 +0530 > @@ -0,0 +1,37 @@ > +# Copyright 2011 Free Software Foundation, Inc. Excessive two spaces. [...] > +set testfile "pipe" > +set tempfile "temp.xxx" [...] > +gdb_test "pipe | p 'x' | cat >$tempfile ; if \[ -f $tempfile \] ; \ > + then echo \"SUCCESS\" ; rm -f $tempfile ; fi" "SUCCESS" This will create file in current directory, that should not happen. Please use ${objdir}/${subdir} and also ${testfile} prefix, something like: set tempfile ${objdir}/${subdir}/${testfile}.x $tempfile should be deleted first as otherwise it may create false PASSes. Optional - not required but I would find better: You could use TCL `file exists' and `file delete' instead of making some more dependencies on host shell compatibility. You could also check the content of such file, whether the redirection was successful, lib/gdb.exp build_id_debug_filename_get contains reading of a file by TCL. Thanks, Jan