From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oa1-x36.google.com (mail-oa1-x36.google.com [IPv6:2001:4860:4864:20::36]) by sourceware.org (Postfix) with ESMTPS id 9A23D385C677; Sun, 18 Dec 2022 21:13:41 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 9A23D385C677 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-oa1-x36.google.com with SMTP id 586e51a60fabf-143ffc8c2b2so9536948fac.2; Sun, 18 Dec 2022 13:13:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=IJg11VyBayHWYx2n9xRwS7gnTMEZR6Z5KP9mNdlgh3U=; b=aAhKShcZt6qQHIb7e57GW7g+yYHJ7nBGuDAm2elSomX9TtUzZ12MB4E5ttY0zr/XEp EBWJwl34PUVDR0MfzWFEefj7nVxqjcIBRpF97Zj9LfQGvA0Lmk1h/NhDi1luaxHwiRtr 2f0YXmq6bRM3VaoQC//TkKBhUa115yNRoFnEdQlQArJxV0+7naJl/7TH0CVImgtYk/QL JhLL6xNxLOh9sq3GMGuJbD36j2NKaTkzMjWFiFzB2ULmyw54SLEm7tTxWAWa52JJ34eo 7sfMEkq5336Lib61YiCf37FDsi9ZFThiZLhDH/2RSbRvhXs9a/mE3Ga0Ej2/Nei8LRXV Fp6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=IJg11VyBayHWYx2n9xRwS7gnTMEZR6Z5KP9mNdlgh3U=; b=DFQXnxeYfiedYGcNCwv9heTyLKgEAYxTEcUqg8Qz9S4GQqlwB7h7sSYk6liKV4Vzr3 uYmZCp2lU/GCz58izLQJteLxHmtAL1U4RLRi3LCMgovuaF+XgAm+XTJ+W9g++9ff6Bt+ 5N1SRqX30cWqu3hwVLEEZ1fjSZFqb+UhDNDgSPLUbj00Wv/kXTfzt6NiPRtkSYrmdb8c hwJqHvhwhIERjgPxt9N98Ci/q9ZXLtMwDOup5kzQmtEfn8AFhA5oVqqK6k5a6tIn6NJH T1DKXYiS4tigQL7lAqy78Ja9Wl+zombCT9IMs+LByTdmEVwDkqYkwwwvQFUD9vwJG/KL 2jEw== X-Gm-Message-State: AFqh2kqgbqSvuI7vIEPiV/4GjyD5N5E+J+z2Fm56QtkeRI85YWtskEUr G7L/WtaXv1IdG0nQuNesWJKF4scpuxp6GMYxV54= X-Google-Smtp-Source: AMrXdXvqDTgmH56aW56PlPITqGY3Mg8EJNVnA6qBandkzuBHG2fyp/DapDVjnaQX0l0zIPfy9Hwe3aGKpm7yceVWTas= X-Received: by 2002:a05:6870:1d1b:b0:143:aaa4:2559 with SMTP id pa27-20020a0568701d1b00b00143aaa42559mr1108313oab.152.1671398020222; Sun, 18 Dec 2022 13:13:40 -0800 (PST) MIME-Version: 1.0 References: <3f62bac2-ac1b-5c55-2488-ede2389d35d2@netcologne.de> <19a6b738-ad34-d145-1202-d2c7c474b272@netcologne.de> <639E8CB3.4030109@gmail.com> In-Reply-To: <639E8CB3.4030109@gmail.com> From: NightStrike Date: Sun, 18 Dec 2022 16:13:36 -0500 Message-ID: Subject: Re: testsuite under wine To: jcb62281@gmail.com Cc: Thomas Koenig , "fortran@gcc.gnu.org" , gcc mailing list , dejagnu@gnu.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-0.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Sat, Dec 17, 2022 at 10:44 PM Jacob Bachmeyer wrote: > > NightStrike wrote: > > On Sat, Dec 17, 2022 at 5:52 AM Thomas Koenig wrote: > > > >> On 17.12.22 01:26, NightStrike wrote: > >> > >>> On Fri, Dec 16, 2022 at 1:44 AM Thomas Koenig 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 > fortran@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.