Re: [PATCH] Add Windows support for backtrace_functions (MSVC only)

Поиск
Список
Период
Сортировка
От Jakub Wartak
Тема Re: [PATCH] Add Windows support for backtrace_functions (MSVC only)
Дата
Msg-id CAKZiRmwfBySmwReFJwqi_-y-2uezRiX15VPT2kizsCAzdJLraw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [PATCH] Add Windows support for backtrace_functions (MSVC only)  (Bryan Green <dbryan.green@gmail.com>)
Ответы Re: [PATCH] Add Windows support for backtrace_functions (MSVC only)
Re: [PATCH] Add Windows support for backtrace_functions (MSVC only)
Список pgsql-hackers
On Thu, Oct 30, 2025 at 4:06 AM Bryan Green <dbryan.green@gmail.com> wrote:

[..]

Hi Bryan, cfbot is red. I'm was fan of having those tests for this
(bring complexity and we didn't have tests for Linux backtrace
anyway), but now MINGW win32 is failing on those tests where the
feature is not present:

[03:57:44.552] ------------------------------------- 8<
-------------------------------------
[03:57:44.552] stderr:
[03:57:44.552] #   Failed test 'backtrace has valid format'
[03:57:44.552] #   at
C:/cirrus/src/test/modules/test_backtrace/t/t_windows_backtrace.pl
line 106.
[03:57:44.552] #   Failed test 'Unable to determine scenario -
PostgreSQL should always have export symbols'
[03:57:44.552] #   at
C:/cirrus/src/test/modules/test_backtrace/t/t_windows_backtrace.pl
line 180.
[03:57:44.552] #   Failed test 'Scenario mismatch: expected 2, got 0'
[03:57:44.552] #   at
C:/cirrus/src/test/modules/test_backtrace/t/t_windows_backtrace.pl
line 224.
[03:57:44.552] #   Failed test 'PL/pgSQL error has deeper stack (found
0 frames)'
[03:57:44.552] #   at
C:/cirrus/src/test/modules/test_backtrace/t/t_windows_backtrace.pl
line 318.
[03:57:44.552] #   Failed test 'multiple rapid errors produced
backtraces (0 addresses found)'
[03:57:44.552] #   at
C:/cirrus/src/test/modules/test_backtrace/t/t_windows_backtrace.pl
line 366.
[03:57:44.552] # Looks like you failed 5 tests of 19.

Anyway, as expected this was thrown:
2025-10-30 03:57:37.973 GMT client backend[244] t_windows_backtrace.pl
BACKTRACE:  backtrace generation is not supported by this installation

Please see attached files for convenience as I already had them on
disk. They are from https://commitfest.postgresql.org/patch/6116/ ->
https://cirrus-ci.com/task/5155398535086080 -> artifacts.

Instead of
    +# Skip if not Windows
    +if ($^O ne 'MSWin32')
    +{
    +    plan skip_all => 'Windows-specific backtrace tests';
    +}

Maybe we could also bypass MINGW too like below ? (but I have no
access, so i havent tried)
    use Config;
    # Skip if not Windows or MINGW/MSYS is detected
    if ($^O ne 'MSWin32' || $Config{'ccname'} =~ /gcc|mingw/i ||
defined($ENV{'MSYSTEM'}))
    {
        plan skip_all => 'Windows-specific backtrace tests';
    }

-J.

Вложения

В списке pgsql-hackers по дате отправления: