Re: Improve error reporting in 027_stream_regress test
От | Michael Paquier |
---|---|
Тема | Re: Improve error reporting in 027_stream_regress test |
Дата | |
Msg-id | aHs1xCvA47TOD4_8@paquier.xyz обсуждение исходный текст |
Ответ на | Re: Improve error reporting in 027_stream_regress test (Nazir Bilal Yavuz <byavuz81@gmail.com>) |
Ответы |
Re: Improve error reporting in 027_stream_regress test
Re: Improve error reporting in 027_stream_regress test Re: Improve error reporting in 027_stream_regress test |
Список | pgsql-hackers |
On Fri, Jul 18, 2025 at 11:57:07AM +0300, Nazir Bilal Yavuz wrote: > I added that as 0001. I used a shifting method for the 'tail' > direction to not use too much memory. I found that there is > 'File::ReadBackwards' in Perl but you need to install it, so I didn't > use it. Some old buildfarm may complain when it comes to that, like some of Tom's stuff (?). > 0001: 'Add trim_file() helper to Utils.pm' -> Which effectively does > nothing, just adds a function to be used for a subsequent patch. This > function accepts 'line_count' as an argument but > 'PG_TEST_FILE_TRIM_LINES' environment variable overrides it. Should I > document 'PG_TEST_FILE_TRIM_LINES' somewhere? Documentation is required in regress.sgml, yes. > 0002: 'Improve error reporting in 027_stream_regress test' -> Uses > trim_file() function to improve error reporting by including the head > and tail of regression.diffs directly in the failure message. The structure is strange, it seems to me that we should target things so as we have only one PG_TEST_FILE_TRIM_LINES defined in the tree, not two with one local to 027. > 0003: 'Check primary and standby are alive after regression tests in > 027_stream_regress' -> Add test for checking status of primary and > standby after the regression tests in 027_stream_regress. Also, it > makes error reporting happen only if regression tests are failed and > both primary and standby are alive. This one looks acceptable to me, so applied to begin with something, splitting things into two pieces for clarity with some tweaks. I have changed things to use system_log() at the end, with fat-commas to link the long options and their arguments. -- Michael
Вложения
В списке pgsql-hackers по дате отправления: