From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20873 invoked by alias); 30 Jul 2013 06:03:39 -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 20848 invoked by uid 89); 30 Jul 2013 06:03:38 -0000 X-Spam-SWARE-Status: No, score=-2.8 required=5.0 tests=AWL,BAYES_50,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL,RDNS_NONE autolearn=no version=3.3.1 Received: from Unknown (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Tue, 30 Jul 2013 06:03:37 +0000 Received: from svr-orw-exc-10.mgc.mentorg.com ([147.34.98.58]) by relay1.mentorg.com with esmtp id 1V431t-0007F6-5A from Yao_Qi@mentor.com ; Mon, 29 Jul 2013 23:03:29 -0700 Received: from SVR-ORW-FEM-04.mgc.mentorg.com ([147.34.97.41]) by SVR-ORW-EXC-10.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.4675); Mon, 29 Jul 2013 23:03:29 -0700 Received: from qiyao.dyndns.org (147.34.91.1) by svr-orw-fem-04.mgc.mentorg.com (147.34.97.41) with Microsoft SMTP Server id 14.2.247.3; Mon, 29 Jul 2013 23:03:28 -0700 Message-ID: <51F75703.70908@codesourcery.com> Date: Tue, 30 Jul 2013 06:03:00 -0000 From: Yao Qi User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130110 Thunderbird/17.0.2 MIME-Version: 1.0 To: Pierre Muller CC: Subject: Re: [PATCH 0/3 V3] Test mingw32 GDB in cygwin References: <1375087546-22591-1-git-send-email-yao@codesourcery.com> <004801ce8c64$6dbd64f0$49382ed0$@muller@ics-cnrs.unistra.fr> In-Reply-To: <004801ce8c64$6dbd64f0$49382ed0$@muller@ics-cnrs.unistra.fr> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-SW-Source: 2013-07/txt/msg00752.txt.bz2 On 07/29/2013 10:03 PM, Pierre Muller wrote: > I didn't like it because I explained that the changes you propose are > useful > to run the testsuite on Windows OS, but not only if running > under a cygwin terminal. Pierre, the intention of this patch series is to improve the testing mingw native gdb running on a cygwin through ssh. > I am using a msys port of dejagnu expect, > and this needs the same changes (remove buffering and switch to binary > mode), > but with the new version of your patch, > nothing would happen for me and the testsuite would still fail. > Your environment is different from ours. We run dejagnu/expect on linux machine, and test mingw32 gdb in a cygwin on windows machine through remote host mechanism. > > >> >Thanks to Corinna's example, we can know whether GDB is in cygwin >> >by checking the file name of handler of stdin (or stdout). As a >> >result, a new option '--cygwin-tty' is avoided. Patch 1/3 is >> >almost rewritten in V3. > Yes, that's true, but the down side is that you transform > the terminal settings only when you are on a cygwin terminal... > I think this is not correct: > I suspect that is_in_cygwin will return true on every type of cygwin > terminal, > in particular also when you are in interactive mode... Yes, anything wrong here? > I thought that your patch should only change settings if the pipes > from expect redirection are detected, but there are no pipe checks > anymore... expect redirection is not involved in our testing. We are running testsuite in remote host mode, so dejagnu/expect is on a linux machine. > Note that I am not sure of the above, as 'maybe' the pty/tty name doesn't > match in the interactive shell case. > Secondly, your patch will never trigger the no buffer/binary mode changes > on non-cygwin terminals, while I argued before that it should also be usable > in those conditions. > It is expected. We test GDB for different targets on linux host and windows host (in cygwin) respectively. We don't have the environment you described, so I am unable to extend the patches to support your environment, sorry. > This is why I would rather like to have the settings modification > grouped into a function (let's call it setup_handles_for_testsuite) > which would be an empty function for all but __MINGW32__ code. > This function could then be called by > (gdb) set maint testsuite-mode on > command or automatically when a cygwin shell and pipes are detected. If you really need an option, feel free to add one, and adjust my patches. > > I am sorry to bother you again, but I would really like to > get a patch that can be used in more general framework and > that avoids to change the standard handles when not necessary. > > And, to finish, I would like to reiterate my support for this > patch, even though I am still criticizing it. > > Sorry to bother you more, Never mind. I don't see much conflicts here. I'd like to improve mingw gdb testing in cygwin via remote host, and you'd like to improve mingw gdb testing on windows machine. We have something in common, such as unbuffer stdout/stderr, etc, but we have different criteria on when to turn on these changes. In my side, they can be turned on when gdb is running in cygwin, while in your side, then can be turned on when a certain option is set. I don't think my patches make troubles or regressions to what you want to achieve. I am inclined to to get these patches committed (after the review), and you can do some changes for your purpose on top of it. -- Yao (齐尧)