This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 0/3 V3] Test mingw32 GDB in cygwin


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 (éå)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]