Re: Improve error reporting in 027_stream_regress test

From: Nazir Bilal Yavuz <byavuz81(at)gmail(dot)com>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: Andres Freund <andres(at)anarazel(dot)de>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Improve error reporting in 027_stream_regress test
Date: 2025-07-29 06:33:22
Message-ID: CAN55FZ3B=cWkj3NhLwY8NiDhXvs34RCUk5i-nZA8TqO5+KWnWA@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On Tue, 29 Jul 2025 at 04:46, Michael Paquier <michael(at)paquier(dot)xyz> wrote:
>
> > - 0002 is the actual patch that improves error reporting in the
> > 027_stream_regress test by using the read_file_ends() function. It
> > adds a regression_log_helper() function, which reads the
> > PG_TEST_FILE_READ_LINES environment variable and then calls
> > read_file_ends() with force_line_count set to true. This approach
> > avoids any potential race condition where the environment variable
> > might be modified after being read in the regression_log_helper() and
> > before used in the read_file_ends().
>
> Why do you think the environment variable could be changed mid-flight
> in the context of a single test run?

I mean it is a run-time variable, so it is up to the user. The timing
between these two operations are extremely tight, so it is very
unlikely but not impossible. Do you think this edge case is not worth
accounting for?

--
Regards,
Nazir Bilal Yavuz
Microsoft

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Dmitry 2025-07-29 06:36:00 Re: IPC/MultixactCreation on the Standby server
Previous Message jian he 2025-07-29 06:15:01 Re: split func.sgml to separated individual sgml files