Received: (at 75440) by debbugs.gnu.org; 9 Jan 2025 01:55:48 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jan 08 20:55:48 2025 Received: from localhost ([127.0.0.1]:49668 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1tVhly-0007xC-Pw for submit <at> debbugs.gnu.org; Wed, 08 Jan 2025 20:55:47 -0500 Received: from mail-oo1-xc35.google.com ([2607:f8b0:4864:20::c35]:44248) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from <jcb62281@HIDDEN>) id 1tVhlo-0007wl-Nd for 75440 <at> debbugs.gnu.org; Wed, 08 Jan 2025 20:55:43 -0500 Received: by mail-oo1-xc35.google.com with SMTP id 006d021491bc7-5f6ab7e0bd6so250650eaf.0 for <75440 <at> debbugs.gnu.org>; Wed, 08 Jan 2025 17:55:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1736387730; x=1736992530; darn=debbugs.gnu.org; h=in-reply-to:from:content-language:references:to:subject:reply-to :user-agent:mime-version:date:message-id:from:to:cc:subject:date :message-id:reply-to; bh=XyGr5DuzlhOYnV1rQyfQPEOswEawLgWJloc0fYabSQU=; b=jTEC/NNeRZp/gQstJYA8IC6md79VtwAQfMWE7htjGhSqky1aM71NPWiqgys9ZxFxII jKEIfxCmKOk3Plkq5i23fSolOTJ9S8Gvkx8iWl2eN6bps3gmAononLtioczfxopgCOfY F0g0BOLGwcemxiSuIhK7ElLtreJrlxC5UoDHbRe7yWUUzHEdlYfLL9hzOCKlY91Zqz1P Rymz+iImv6uoNCddobVCziqIHyDR+pA7Gugi+rNZltCpfummElDLsh5azDQWxh/ntcqT JApnpkY0X9fM/J7v2jeBtYtvf3OvK67KyhYbEr4bstYA4i7k8Yfr1rVJt0hQR8EkRw5v mxVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736387730; x=1736992530; h=in-reply-to:from:content-language:references:to:subject:reply-to :user-agent:mime-version:date:message-id:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=XyGr5DuzlhOYnV1rQyfQPEOswEawLgWJloc0fYabSQU=; b=a4pBIeDrI2A51c3eUHJWknCAvaShn6yyEOpYypWipiI9hm5cW+sxukr09m+jIgMUdT VBblwYvsLDSVfT3q/Q5+To13DmJnEMP+8a5xJLfnLA687tR3Ol+UcG7epxuUJUdCYte2 PCyNVQ7W2uyDC5dJQ5EnMX1MOYinN1bYnvZ2MqMtJ/2pwaMRHiSWOrBqPYEJ5gY2aXq6 m2jbmgng3vwBOUbpN//+QPJobOBgxIeyLz1Z1y0LaAhUS+ACheqthtq+RhNoHTBV8t/M 15Ata2aUKcwc8XtqW52znPERr+mTAoI7iDj1BFojqZFV4rM6pgwBlA5sbXoUrAHl97lz JKVw== X-Forwarded-Encrypted: i=1; AJvYcCXYIwpajq7+o80QZ7UQa4+TH1TnZgSRD2tD4NyAXuUSouJ0EPykTplo1LNoXvJ535FVrVqudA==@debbugs.gnu.org X-Gm-Message-State: AOJu0YzdIamoOmLMOEM/CggX8cgBnAHMD1BDWRRINyr3hdCxQ8MUa38b Jhc9jObmyYPgfaXkx7VhlBA9wHLI3rtx9FRShIgulKLd0GTkwuns X-Gm-Gg: ASbGncunlhSgyf8XDPueQNNBxNc7lpOgde7r1sSM9ZyeV1p7zUdIRx5tBbIKG0318iL +9m4/HqsjDXu3KNUyRfgNCEGZe4VcvvgbWyEf9XXzRsgvs8FOnO1YmCux3tFMNiosyGUr1cmzEi M+PdyilAg4H5/4CPkHhUyvRthhIz11ikDZrHgGLm0VPQkRc5kVYfl/RWXV7O0MYZvDQaNoj0TFc i0CdVYhYtDlsahuiC/TlV4yn7N1IDFbkpXBmsjlxEAwPtO0lSL7HQ== X-Google-Smtp-Source: AGHT+IHORKRTUdSkiq93Q7gyThHmfeNscOaXrdi30rj3cx6Wv42YCD9lxow4YCh+ChBia0EztwIeYA== X-Received: by 2002:a05:6820:1520:b0:5f6:d896:4afe with SMTP id 006d021491bc7-5f7309645d5mr2460741eaf.3.1736387730361; Wed, 08 Jan 2025 17:55:30 -0800 (PST) Received: from [127.0.0.1] ([70.133.144.14]) by smtp.gmail.com with ESMTPSA id 46e09a7af769-72318547f95sm123164a34.19.2025.01.08.17.55.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Jan 2025 17:55:29 -0800 (PST) Content-Type: multipart/alternative; boundary="------------OEXIPA2If4is5aXu9WAOVcSY" Message-ID: <2a7c2a07-e5c0-4045-93ed-606dc48afe1e@HIDDEN> Date: Wed, 8 Jan 2025 19:55:22 -0600 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: bug#75440: dejagnu does not like java.io.Console of OpenJDK >= 22 To: Chris Nospam <chris21k@HIDDEN>, 75440 <at> debbugs.gnu.org References: <trinity-883ac4d3-67e0-4d8c-b926-1fcc387c6cf0-1736354694938@trinity-msg-rest-gmx-gmx-live-bbc95d94c-jjgc7> Content-Language: en-US From: Jacob Bachmeyer <jcb62281@HIDDEN> In-Reply-To: <trinity-883ac4d3-67e0-4d8c-b926-1fcc387c6cf0-1736354694938@trinity-msg-rest-gmx-gmx-live-bbc95d94c-jjgc7> X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 75440 X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Reply-To: jcb62281@HIDDEN Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -0.5 (/) This is a multi-part message in MIME format. --------------OEXIPA2If4is5aXu9WAOVcSY Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 1/8/25 10:44, Chris Nospam via Bug-dejagnu via wrote: > Dear maintainers, > > starting with OpenJDK Java 22 java programs using java.io.Console cannot be testet with dejagnu any more. With JDK 21 it works like a charm. This is a JVM bug or misfeature. We have recently had similar problems with MinGWGCC tested under Wine. In that case, it was a consequence of Wine's new support for Windows quasi-ptys. > I belive it has to do with excape sequences that are not filtered out correctly or similar. I am using dejagnu 1.6.3-1, debain package under Ubuntu 24.04. DejaGnu does not and cannot filter escape sequences. Expect matches the patterns it is given. You can write patterns in your testsuite that accommodate or even verify escape sequences from the program under test. > For an easy reproduction of the bug I have attached a simple example simple.zip. Just unpack it and execute exectest.sh. Be sure to update JAVA_HOME in this script to a jdk 22 or 23 installation. > > In testsuite/simple.log some escape sequences are shown were no one are expected: > ^[[?1h^[=^[[?2004hhello > ^[[?1l^[>^[[?1000l^[[?2004lhello The JVM IO facilities are inserting escape sequenceswithout your program calling for them. This is a JVM bug or misfeature that Expect (on which DejaGnu is built) exposes. > The attached simple echo example works after simply commenting the lines 13-14 (using Console) and uncommenting lines 16-17 (using BufferedReader) in testsuite/simple.sh. > Alternatively it also works by passing -Djdk.console=java.base to the jvm (1st line in exectest.sh), to trigger the old implementation in JDK. > > #!/usr/bin/env -S java --source 23 > // #!/usr/local/java/jdk-23.0.1/bin/java --source 23 -Djdk.console=java.base > > import java.io.BufferedReader; > import java.io.IOException; > import java.io.InputStreamReader; > > public class ConsoleTest { > > public static void main(String[] args) throws IOException { > System.out.print("prompt> "); > > java.io.Console c = System.console(); > String input = c.readLine(); > > // BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); > // String input = in.readLine(); > > System.out.println(input); > System.out.println("prompt> "); > } > > } First, think about what your program actually does compared to what your testsuite code expects it to do. Examine the message produced at the end of the test run in simple.log. In fact, that message is produced *after* echo.exp has completed. Where does that message come from? (You will benefit far more from the lesson if you find it for yourself than if I tell you. There is only one place in your testsuite that can emit that message.) Second, the inability to send text to the program under test is not a failure: it is an error and probably an UNRESOLVED test. A block that is executed as a result of catching a Tcl error probably should be invoking "error" or possibly "unresolved", not "fail" or even "pass" (unless you are testing an error condition). Third, Tcl interpolates backslash escapes in double-quoted strings. You will need to double (some of) the backslashes and/or review re_syntax(n) for Tcl regexp syntax. Fourth, think about simple_test could actually fail. That depends on what you are trying to do, but any "pass" should have a corresponding "fail" somewhere. (Most of the above refers to Expect code in your testsuite/config/default.exp file.) > It has something to do with the change of the Java default Console provider to JLine in Java 22. > https://bugs.openjdk.org/browse/JDK-8309141is is not special with DejaGnu; we have recently had similar issues with > Wine, encountered while testing mingw32 builds on *nix hosts > However, as Java Console works everywhere else (windows/linux console/bash/EclipseIDE internal "console"/IntelliJ internal "console") as far I can see, it seems to be something special with dejagnu. No, the problem is with the JVM and/or your programs and scripts. It appears to work everywhere else because those escape sequences either perform terminal control functions or are ignored. You can write regexps that will optionally match and discard the escape sequences. Expect exposes this issue because it is strict about matching exactly what you tell it to match. -- Jacob --------------OEXIPA2If4is5aXu9WAOVcSY Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> </head> <body> <div class="moz-cite-prefix">On 1/8/25 10:44, Chris Nospam via Bug-dejagnu via wrote:<br> </div> <blockquote type="cite" cite="mid:trinity-883ac4d3-67e0-4d8c-b926-1fcc387c6cf0-1736354694938@trinity-msg-rest-gmx-gmx-live-bbc95d94c-jjgc7"> <pre wrap="" class="moz-quote-pre">Dear maintainers, starting with OpenJDK Java 22 java programs using java.io.Console cannot be testet with dejagnu any more. With JDK 21 it works like a charm.</pre> </blockquote> <p>This is a JVM bug or misfeature. We have recently had similar problems with MinGW<span style="white-space: pre-wrap"> GCC tested under Wine. In that case, it was a consequence of Wine's new support for Windows quasi-ptys. </span></p> <blockquote type="cite" cite="mid:trinity-883ac4d3-67e0-4d8c-b926-1fcc387c6cf0-1736354694938@trinity-msg-rest-gmx-gmx-live-bbc95d94c-jjgc7"> <pre wrap="" class="moz-quote-pre">I belive it has to do with excape sequences that are not filtered out correctly or similar. I am using dejagnu 1.6.3-1, debain package under Ubuntu 24.04.</pre> </blockquote> <p>DejaGnu does not and cannot filter escape sequences. Expect matches the patterns it is given. You can write patterns in your testsuite that accommodate or even verify escape sequences <span style="white-space: pre-wrap">from the program under test. </span></p> <blockquote type="cite" cite="mid:trinity-883ac4d3-67e0-4d8c-b926-1fcc387c6cf0-1736354694938@trinity-msg-rest-gmx-gmx-live-bbc95d94c-jjgc7"> <pre wrap="" class="moz-quote-pre">For an easy reproduction of the bug I have attached a simple example simple.zip. Just unpack it and execute exectest.sh. Be sure to update JAVA_HOME in this script to a jdk 22 or 23 installation. In testsuite/simple.log some escape sequences are shown were no one are expected: ^[[?1h^[=^[[?2004hhello ^[[?1l^[>^[[?1000l^[[?2004lhello</pre> </blockquote> <p>The JVM IO facilities are inserting escape sequences<span style="white-space: pre-wrap"> without your program calling for them. This is a JVM bug or misfeature that Expect (on which DejaGnu is built) exposes. </span></p> <blockquote type="cite" cite="mid:trinity-883ac4d3-67e0-4d8c-b926-1fcc387c6cf0-1736354694938@trinity-msg-rest-gmx-gmx-live-bbc95d94c-jjgc7"> <pre wrap="" class="moz-quote-pre">The attached simple echo example works after simply commenting the lines 13-14 (using Console) and uncommenting lines 16-17 (using BufferedReader) in testsuite/simple.sh. Alternatively it also works by passing -Djdk.console=java.base to the jvm (1st line in exectest.sh), to trigger the old implementation in JDK. #!/usr/bin/env -S java --source 23 // #!/usr/local/java/jdk-23.0.1/bin/java --source 23 -Djdk.console=java.base import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class ConsoleTest { public static void main(String[] args) throws IOException { System.out.print("prompt> "); java.io.Console c = System.console(); String input = c.readLine(); // BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); // String input = in.readLine(); System.out.println(input); System.out.println("prompt> "); } } </pre> </blockquote> <p>First, think about what your program actually does compared to what your testsuite code expects it to do. Examine the message produced at the end of the test run in simple.log. In fact, that message is produced *after* echo.exp has completed. Where does that message come from?</p> <p>(You will benefit far more from the lesson if you find it for yourself than if I tell you. There is only one place in your testsuite that can emit that message.)<br> </p> <p>Second, the inability to send text to the program under test is not a failure: it is an error and probably an UNRESOLVED test. A block that is executed as a result of catching a Tcl error probably should be invoking "error" or possibly "unresolved", not "fail" or even "pass" (unless you are testing an error condition).</p> <p>Third, Tcl interpolates backslash escapes in double-quoted strings. You will need to double (some of) the backslashes and/or review re_syntax(n) for Tcl regexp syntax.</p> <p>Fourth, think about simple_test could actually fail. That depends on what you are trying to do, but any "pass" should have a corresponding "fail" somewhere.</p> <p>(Most of the above refers to Expect code in your testsuite/config/default.exp file.)<br> </p> <blockquote type="cite" cite="mid:trinity-883ac4d3-67e0-4d8c-b926-1fcc387c6cf0-1736354694938@trinity-msg-rest-gmx-gmx-live-bbc95d94c-jjgc7"> <pre wrap="" class="moz-quote-pre">It has something to do with the change of the Java default Console provider to JLine in Java 22. <a class="moz-txt-link-freetext" href="https://bugs.openjdk.org/browse/JDK-8309141is">https://bugs.openjdk.org/browse/JDK-8309141is</a> is not special with DejaGnu; we have recently had similar issues with Wine, encountered while testing mingw32 builds on *nix hosts However, as Java Console works everywhere else (windows/linux console/bash/EclipseIDE internal "console"/IntelliJ internal "console") as far I can see, it seems to be something special with dejagnu.</pre> </blockquote> <p>No, the problem is with the JVM and/or your programs and scripts. It appears to work everywhere else because those escape sequences either perform terminal control functions or are ignored. You can write regexps that will optionally match and discard the escape sequences. Expect exposes this issue because it is strict about matching exactly what you tell it to match.<br> </p> <p><br> </p> <p>-- Jacob<br> </p> <p><br> </p> </body> </html> --------------OEXIPA2If4is5aXu9WAOVcSY--
bug-dejagnu@HIDDEN
:bug#75440
; Package dejagnu
.
Full text available.Received: (at submit) by debbugs.gnu.org; 8 Jan 2025 17:24:56 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jan 08 12:24:56 2025 Received: from localhost ([127.0.0.1]:48735 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1tVZna-0006cG-Vc for submit <at> debbugs.gnu.org; Wed, 08 Jan 2025 12:24:56 -0500 Received: from lists.gnu.org ([2001:470:142::17]:54720) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <chris21k@HIDDEN>) id 1tVZB5-00047z-1T for submit <at> debbugs.gnu.org; Wed, 08 Jan 2025 11:45:08 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <chris21k@HIDDEN>) id 1tVZAy-00065A-Kk for bug-dejagnu@HIDDEN; Wed, 08 Jan 2025 11:45:00 -0500 Received: from mout.gmx.net ([212.227.15.19]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <chris21k@HIDDEN>) id 1tVZAw-0003eG-3E for bug-dejagnu@HIDDEN; Wed, 08 Jan 2025 11:45:00 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.de; s=s31663417; t=1736354695; x=1736959495; i=chris21k@HIDDEN; bh=I3SG1l/scGtJne8B4wseI0VpeWnzC9rsFJRMhHuS3tY=; h=X-UI-Sender-Class:MIME-Version:Message-ID:From:To:Subject: Content-Type:Date:cc:content-transfer-encoding:content-type:date: from:message-id:mime-version:reply-to:subject:to; b=MZVSLUfiqaYYWx3aY6TBjLtR4fJXFB4reys37DuaGpIdnw6OzL50wcP/Ny7gtygF NaaZ9dHBZ7rOapTTlbbt2KzJHLfIpYdka26PZuQ5G4g2FPH61djLRGSoARDQunZlM xFrZQTQe5f1pcEwQBAnpiiDq/FxyUevNM4EBAC2iFaWSgp7DUbbTZIpJK+D2sil2O kskibEueD13pJMdUQiPuajFPPToitqvUu8ZnhvLpC9m5LZNc4lhzbWovTwZldywdp F6xUHEXtkv6Q3/fSfzi4GqJzdrGsZMLJ6MhbdixLR06MVcw2bPvWl8Z4BcHRr5zIH 7mG/OagFoRwOLDgIWQ== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from [88.133.197.100] ([88.133.197.100]) by trinity-msg-rest-gmx-gmx-live-bbc95d94c-jjgc7 (via HTTP); Wed, 8 Jan 2025 16:44:55 +0000 MIME-Version: 1.0 Message-ID: <trinity-883ac4d3-67e0-4d8c-b926-1fcc387c6cf0-1736354694938@trinity-msg-rest-gmx-gmx-live-bbc95d94c-jjgc7> From: Chris Nospam <chris21k@HIDDEN> To: bug-dejagnu@HIDDEN Subject: dejagnu does not like java.io.Console of OpenJDK >= 22 Content-Type: multipart/mixed; boundary=refeik-260945c3-c1e3-4e45-9036-350984ec99a0 Date: Wed, 8 Jan 2025 16:44:55 +0000 X-UI-CLIENT-META-MAIL-DROP: W10= X-Provags-ID: V03:K1:j7YweI1S1S2tYMrkoSgfveJTIMmpF5uNb3KfxXX1pMc8j7HEa363CbJ428gthVH2PG8Np GhyjBKC9pRoVx28kjVqgXZBQuErYi3lnQBV6urUcTfIetXhIniX25I3LC/cZu6Wl5SATIAP9SOG+ VG/I1/34g0ThkLU/kL6a6RPWEckWo6P94QJUcMVefdsviWHEyM767DyxU/FON6YECaWEj65+kT4Z 5G9Nq8ygR77pZvwaUMRzr6/nnBxUo4xip07I/9HG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ou7V8PNtWbWxE= Received-SPF: pass client-ip=212.227.15.19; envelope-from=chris21k@HIDDEN; helo=mout.gmx.net X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Wed, 08 Jan 2025 12:24:53 -0500 X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) --refeik-260945c3-c1e3-4e45-9036-350984ec99a0 Content-Type: text/plain; charset=UTF-8 Dear maintainers, starting with OpenJDK Java 22 java programs using java.io.Console cannot be testet with dejagnu any more. With JDK 21 it works like a charm. I belive it has to do with excape sequences that are not filtered out correctly or similar. I am using dejagnu 1.6.3-1, debain package under Ubuntu 24.04. For an easy reproduction of the bug I have attached a simple example simple.zip. Just unpack it and execute exectest.sh. Be sure to update JAVA_HOME in this script to a jdk 22 or 23 installation. In testsuite/simple.log some escape sequences are shown were no one are expected: ^[[?1h^[=^[[?2004hhello ^[[?1l^[>^[[?1000l^[[?2004lhello The attached simple echo example works after simply commenting the lines 13-14 (using Console) and uncommenting lines 16-17 (using BufferedReader) in testsuite/simple.sh. Alternatively it also works by passing -Djdk.console=java.base to the jvm (1st line in exectest.sh), to trigger the old implementation in JDK. #!/usr/bin/env -S java --source 23 // #!/usr/local/java/jdk-23.0.1/bin/java --source 23 -Djdk.console=java.base import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class ConsoleTest { public static void main(String[] args) throws IOException { System.out.print("prompt> "); java.io.Console c = System.console(); String input = c.readLine(); // BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); // String input = in.readLine(); System.out.println(input); System.out.println("prompt> "); } } It has something to do with the change of the Java default Console provider to JLine in Java 22. https://bugs.openjdk.org/browse/JDK-8309141 However, as Java Console works everywhere else (windows/linux console/bash/EclipseIDE internal "console"/IntelliJ internal "console") as far I can see, it seems to be something special with dejagnu. Thanks for dejagnu, maintaining it, and your help, Chris --refeik-260945c3-c1e3-4e45-9036-350984ec99a0 Content-Type: application/x-zip-compressed Content-Disposition: attachment; filename=simple.zip Content-Transfer-Encoding: base64 X-UI-Content-Hash: ccbb6cb9d10aa3bdb5e3276e485bb1a36a5ab87f6a147060e96a0b965b0a9b7c UEsDBBQAAAAIAGyCJ1qQ0RLGiAAAAJ8AAAALABwAZXhlY3Rlc3Quc2hVVAkAA/tFfWc9on5ndXgL AAEE8VYAAATxVgAAU1bULy0u0k/KzNMvzuDiSq0oyC8qUfByDHOM9/D3dbUFy+bkJyfm6GclliXq Z6Vk6xoZ6xnoGcLUBjiGeNiqVMO11IIMs1KpBonXcnElpyiUpBaXFJdmlqRyFeUq6KYpaOnl5KcD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ABgAAAAAAAAAAAC0gVcJAAB0ZXN0c3VpdGUv bGliL3NpdGUuZXhwVVQFAANmO31ndXgLAAEE8VYAAATxVgAAUEsFBgAAAAALAAsA2QMAAKcJAAAA AA== --refeik-260945c3-c1e3-4e45-9036-350984ec99a0--
Chris Nospam <chris21k@HIDDEN>
:bug-dejagnu@HIDDEN
.
Full text available.bug-dejagnu@HIDDEN
:bug#75440
; Package dejagnu
.
Full text available.
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.