On Sat, Dec 17, 2022 at 10:44 PM Jacob Bachmeyer <jcb62...@gmail.com> wrote: > > NightStrike wrote: > > On Sat, Dec 17, 2022 at 5:52 AM Thomas Koenig <tkoe...@netcologne.de> wrote: > > > >> On 17.12.22 01:26, NightStrike wrote: > >> > >>> On Fri, Dec 16, 2022 at 1:44 AM Thomas Koenig <tkoe...@netcologne.de> > >>> wrote: > >>> > >>>> On 16.12.22 03:20, NightStrike via Fortran wrote: > >>>> > >>>> > >>>>> When I run the testsuite under wine, I'm getting a lot of ANSI escape > >>>>> sequences. We had fixed this long ago, but it seems to be back. Any > >>>>> idea what I should change in my configuration to have this not happen? > >>>>> > >>>> This should probably be fixed properly in some *.exp file, but you can > >>>> try setting the GCC_COLORS environment variable to an empty string > >>>> before running the test. > >>>> > >>> That didn't help. It looks like this is always escape 25h to start > >>> the output and 25l to end it, which I think is turning the cursor on > >>> and off (based on https://en.wikipedia.org/wiki/ANSI_escape_code). I > >>> apparently fixed this previously by building wine with > >>> --without-curses > >>> (https://www.mail-archive.com/gcc@gcc.gnu.org/msg86366.html), but that > >>> option to wine was removed. Is there a way to hack this on the Deja > >>> side to ignore the escapes? Or to tell it to run in a way that makes > >>> wine not emit them? > >>> > >> Truth is, I don't know. > >> > >> I have included the gcc mailing list in this reply, where more > >> knowledgeable people can be found :-) > >> > > > > Thanks. I'm including the dejagnu list, maybe someone there can help, too. > > > > For clarity, this is an example of what I see: > > > > Output was: > > ^[[mM^[[?25h^[[?25ly^[[?25h^[[?25l_^[[?25h^[[?25lR^[[?25h^[[?25l1^[[?25h^[[?25l^[[K^[[1C^[[?25h^[[?25l^[[K^[[1C^[[?25h^[[?25l^[[K^[[1C^[[?25h^[[?25l^[[K^[[1C^[[?25h^[[?25l:^[[?25h^[[?25l^[[K^[[1C^[[?25h^[[?25l7^[[ > > ?25h^[[?25l8^[[?25h^[[?25l^[[K^[[1C^[[?25h^[[?25l5^[[?25h^[[?25l6^[[?25h^[[?25l^[[K^[[1C^[[?25h^[[?25l3^[[?25h^[[?25l4^[[?25h^[[?25l^[[K^[[1C^[[?25h^[[?25l1^[[?25h^[[?25l2^[[?25h^M^M > > ^[[?25lM^[[?25h^[[?25ly^[[?25h^[[?25l_^[[?25h^[[?25lR^[[?25h^[[?25l2^[[?25h^[[?25l^[[K^[[1C^[[?25h^[[?25l^[[K^[[1C^[[?25h^[[?25l^[[K^[[1C^[[?25h^[[?25l^[[K^[[1C^[[?25h^[[?25l:^[[?25h^[[?25l^[[K^[[1C^[[?25h^[[?25l1 > > ^[[?25h^[[?25l2^[[?25h^[[?25l^[[K^[[1C^[[?25h^[[?25l3^[[?25h^[[?25l4^[[?25h^[[?25l^[[K^[[1C^[[?25h^[[?25l5^[[?25h^[[?25l6^[[?25h^[[?25l^[[K^[[1C^[[?25h^[[?25l7^[[?25h^[[?25l8^[[?25h^M^M > > ^[[?25lL^[[?25h^[[?25lo^[[?25h^[[?25lc^[[?25h^[[?25la^[[?25h^[[?25ll^[[?25h^[[?25l_^[[?25h^[[?25lR^[[?25h^[[?25l1^[[?25h^[[?25l^[[K^[[1C^[[?25h^[[?25l:^[[?25h^[[?25l^[[K^[[1C^[[?25h^[[?25l7^[[?25h^[[?25l8^[[?25h^[ > > [?25l^[[K^[[1C^[[?25h^[[?25l5^[[?25h^[[?25l6^[[?25h^[[?25l^[[K^[[1C^[[?25h^[[?25l3^[[?25h^[[?25l4^[[?25h^[[?25l^[[K^[[1C^[[?25h^[[?25l1^[[?25h^[[?25l2^[[?25h^M^M > > ^[[?25lL^[[?25h^[[?25lo^[[?25h^[[?25lc^[[?25h^[[?25la^[[?25h^[[?25ll^[[?25h^[[?25l_^[[?25h^[[?25lR^[[?25h^[[?25l2^[[?25h^[[?25l^[[K^[[1C^[[?25h^[[?25l:^[[?25h^[[?25l^[[K^[[1C^[[?25h^[[?25l1^[[?25h^[[?25l2^[[?25h^[ > > [?25l^[[K^[[1C^[[?25h^[[?25l3^[[?25h^[[?25l4^[[?25h^[[?25l^[[K^[[1C^[[?25h^[[?25l5^[[?25h^[[?25l6^[[?25h^[[?25l^[[K^[[1C^[[?25h^[[?25l7^[[?25h^[[?25l8^[[?25h^M^M > > ^[[?25lL^[[?25h^[[?25lo^[[?25h^[[?25lc^[[?25h^[[?25la^[[?25h^[[?25ll^[[?25h^[[?25l_^[[?25h^[[?25lR^[[?25h^[[?25l1^[[?25h^[[?25l^[[K^[[1C^[[?25h^[[?25l:^[[?25h^[[?25l^[[K^[[1C^[[?25h^[[?25l7^[[?25h^[[?25l8^[[?25h^[ > > [?25l^[[K^[[1C^[[?25h^[[?25l5^[[?25h^[[?25l6^[[?25h^[[?25l^[[K^[[1C^[[?25h^[[?25l3^[[?25h^[[?25l4^[[?25h^[[?25l^[[K^[[1C^[[?25h^[[?25l1^[[?25h^[[?25l2^[[?25h^M^M > > ^[[?25lL^[[?25h^[[?25lo^[[?25h^[[?25lc^[[?25h^[[?25la^[[?25h^[[?25ll^[[?25h^[[?25l_^[[?25h^[[?25lR^[[?25h^[[?25l2^[[?25h^[[?25l^[[K^[[1C^[[?25h^[[?25l:^[[?25h^[[?25l^[[K^[[1C^[[?25h^[[?25l1^[[?25h^[[?25l2^[[?25h^[ > > [?25l^[[K^[[1C^[[?25h^[[?25l3^[[?25h^[[?25l4^[[?25h^[[?25l^[[K^[[1C^[[?25h^[[?25l5^[[?25h^[[?25l6^[[?25h^[[?25l^[[K^[[1C^[[?25h^[[?25l7^[[?25h^[[?25l8^[[?25h^M^M > > ^[[?25lL^[[?25h^[[?25lo^[[?25h^[[?25lc^[[?25h^[[?25la^[[?25h^[[?25ll^[[?25h^[[?25l_^[[?25h^[[?25lR^[[?25h^[[?25l1^[[?25h^[[?25l^[[K^[[1C^[[?25h^[[?25l:^[[?25h^[[?25l^[[K^[[1C^[[?25h^[[?25l7^[[?25h^[[?25l8^[[?25h^[ > > [?25l^[[K^[[1C^[[?25h^[[?25l5^[[?25h^[[?25l6^[[?25h^[[?25l^[[K^[[1C^[[?25h^[[?25l3^[[?25h^[[?25l4^[[?25h^[[?25l^[[K^[[1C^[[?25h^[[?25l1^[[?25h^[[?25l2^[[?25h^M^M > > ^[[?25lL^[[?25h^[[?25lo^[[?25h^[[?25lc^[[?25h^[[?25la^[[?25h^[[?25ll^[[?25h^[[?25l_^[[?25h^[[?25lR^[[?25h^[[?25l2^[[?25h^[[?25l^[[K^[[1C^[[?25h^[[?25l:^[[?25h^[[?25l^[[K^[[1C^[[?25h^[[?25l1^[[?25h^[[?25l2^[[?25h^[ > > [?25l^[[K^[[1C^[[?25h^[[?25l3^[[?25h^[[?25l4^[[?25h^[[?25l^[[K^[[1C^[[?25h^[[?25l5^[[?25h^[[?25l6^[[?25h^[[?25l^[[K^[[1C^[[?25h^[[?25l7^[[?25h^[[?25l8^[[?25h^M^M > > ^M^M > > > > Should match: > > My_R1 : 78 56 34 12.* > > My_R2 : 12 34 56 78.* > > Local_R1 : 78 56 34 12.* > > Local_R2 : 12 34 56 78.* > > Local_R1 : 78 56 34 12.* > > Local_R2 : 12 34 56 78.* > > Local_R1 : 78 56 34 12.* > > Local_R2 : 12 34 56 78.* > > > > DejaGnu cannot routinely strip escape sequences because they could be > part of the intended output---or strictly forbidden in the intended > output. Further, I suspect that the comparison is being carried out in > the testsuite code rather than the framework, but the thread that > arrived on the DejaGnu list does not mention what test is failing or > what testsuite is being run. Based on the inclusion of > fort...@gcc.gnu.org, I am guessing this is an issue with the GNU Fortran > tests.
Every GCC language testsuite has these failures, I just singled out Fortran because I was interested in it. > This is either a testsuite problem or an environment problem. The GNU > Fortran I/O module certainly has interesting behavior here. Try setting > TERM=dumb in the environment while running the testsuite. If that fixes > the problem, it may be appropriate to add "set ::env(TERM) dumb" to the > tool init file for GNU Fortran. Setting TERM doesn't help. Wine tries to emulate the windows console, which requires outputting this stuff. It does so any time there's a pty, and I believe that Deja creates a pty when running the tests. Wine people suggested if I could somehow run the test as "wine ./a.exe | cat", that it would prevent this behavior, but I couldn't find a way to do that. For now, I modified Wine to kludge out the code that creates the console, and a long term solution needs to be on the Wine side. I was just hoping for a less dirty hack from the Deja side. Note that there are other problems, too. It seems that when Deja is matching against "\n", it doesn't handle the different line endings of Windows correctly in a cross environment. Is there a way that I can set how to interpret \n in a target-board file? This affects fortran and other language tests also.