[PATCH] testsuite: The expect framework might introduce CR in output

Torbjorn SVENSSON torbjorn.svensson@foss.st.com
Sat Jan 11 19:11:54 GMT 2025



On 2025-01-11 20:05, Jonathan Wakely wrote:
> 
> 
> On Sat, 11 Jan 2025, 18:31 Torbjörn SVENSSON, 
> <torbjorn.svensson@foss.st.com <mailto:torbjorn.svensson@foss.st.com>> 
> wrote:
> 
>     Ok for trunk and releases/gcc-14?
> 
> 
> OK, thanks

Oh, mid-air-collision.
Thanks for the fast review Jonathan!
I suppose my v2 should also be ok as it (in addition to 
27_io/print/1.cc) fixes the same kind of issue in 27_io/print/3.cc.

Kind regards,
Torbjörn

> 
> 
> 
>     --
> 
>     When running tests using the "sim" config, the command is launched in
>     non-readonly mode and the text retrieved from the expect command will
>     then replace all LF with CRLF. (The problem can be found in sim_load
>     where it calls remote_spawn without an input file).
> 
>     libstdc++-v3/ChangeLog:
> 
>              * 27_io/print/1.cc: Allow both LF and CRLF in test.
> 
>     Signed-off-by: Torbjörn SVENSSON <torbjorn.svensson@foss.st.com
>     <mailto:torbjorn.svensson@foss.st.com>>
>     ---
>       libstdc++-v3/testsuite/27_io/print/1.cc | 2 +-
>       1 file changed, 1 insertion(+), 1 deletion(-)
> 
>     diff --git a/libstdc++-v3/testsuite/27_io/print/1.cc b/libstdc++-v3/
>     testsuite/27_io/print/1.cc
>     index f6585d9880a..2a74e5002f4 100644
>     --- a/libstdc++-v3/testsuite/27_io/print/1.cc
>     +++ b/libstdc++-v3/testsuite/27_io/print/1.cc
>     @@ -18,7 +18,7 @@ void
>       test_println_default()
>       {
>         std::println("I walk the line");
>     -  // { dg-output "I walk the line\n" }
>     +  // { dg-output "I walk the line\r?\n" }
>       }
> 
>       void
>     -- 
>     2.25.1
> 



More information about the Libstdc++ mailing list