RE: [PATCH v2] Rewrite the "show environment" test

Aktemur, Tankut Baris
2025-12-10T08:31:34Z

On Tuesday, December 9, 2025 7:03 PM, Tom Tromey wrote:
> In a review early in the year:
>
> https://inbox.sourceware.org/gdb-patches/874iz3f4ek.fsf@redhat.com/
>
> Andrew pointed out that a new test I proposed failed with read1.
> This test was essentially a copy of gdb.base/environ.exp.
>
> I couldn't reproduce the read1 problem, but this patch rewrites the
> one test there that seems like it could possibly fail in this mode.
> Now it uses line-by-line mode and checks for a certain environment
> variable appearing in the output.
...
> + -re "\r\n$gdb_prompt $" {

I know I'm late and the patch is already merged, but nevertheless:

For a slight simplification, we could have written this case as

-re -wrap "" {

Regards,
-Baris

Intel Deutschland GmbH
Registered Address: Dornacher Straße 1, 85622 Feldkirchen, Germany
Tel: +49 89 991 430, www.intel.de
Managing Directors: Harry Demas, Jeffrey Schneiderman, Yin Chong Sorrell
Chairperson of the Supervisory Board: Nicole Lau
Registered Seat: Munich
Commercial Register: Amtsgericht München HRB 186928