Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rUmci-00D00F-G8 for pgsql-hackers@arkaria.postgresql.org; Tue, 30 Jan 2024 11:49:53 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1rUmch-005031-At for pgsql-hackers@arkaria.postgresql.org; Tue, 30 Jan 2024 11:49:51 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rUmcg-00502t-UF for pgsql-hackers@lists.postgresql.org; Tue, 30 Jan 2024 11:49:51 +0000 Received: from mail-yw1-x112d.google.com ([2607:f8b0:4864:20::112d]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1rUmcc-004W5A-04 for pgsql-hackers@lists.postgresql.org; Tue, 30 Jan 2024 11:49:49 +0000 Received: by mail-yw1-x112d.google.com with SMTP id 00721157ae682-5ffee6e8770so45215197b3.0 for ; Tue, 30 Jan 2024 03:49:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dunslane-net.20230601.gappssmtp.com; s=20230601; t=1706615384; x=1707220184; darn=lists.postgresql.org; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=pXZyl1CAmIHm+8VpIAUtJLZK4J0/BuBPdwCWs65j168=; b=V+uBd3vreJCYlxxIDc5kCtbT88hWkhDzjAjzoLKwaCujVX3mTZ0b0/IEF1uAJZYLn5 gSVxs66snWUHvpyaRTdFeBBoNJrTXgUVU1D28fzSpVbN0oAxes4ALQwBoAuGapmbWNBz hKHtDV+rNJvAm0hzeFC8yYJMfKI9ly2MvwO/EHZm042R7qzH1wT55NJf10OUB9KaOy/5 X9IkIYynC4Le5RSOp7Rk9qBq3kCda8oKHRaXcMxRdZmGM6nzyKfCfuz7wBdlCbALCYZw ZLX2/Mf6k2Rj01WqBCzPpxKykTd5M0PN4+G5Zm2V/cyH9eF3sMiw3QmTeLrzgIyRvo7P FIHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706615384; x=1707220184; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=pXZyl1CAmIHm+8VpIAUtJLZK4J0/BuBPdwCWs65j168=; b=B7zGAMt2JkVrCRuyp96LuZZmta1tO64gAD2b0B6aS5w39lUdL+L+/yB/xIKzA6nxKV 5NLVlfMTs9UHkBe9d3utfQpyuhli0MlOL1vjYQYy8250xB0ui7hW2f+IvW6vhKeowmVU 9rJl83pooY2nzpKDN2zkHwc/EmQMQ5iemmwg8dHgRHBqUDAgNGrYaOTtRoQ98bq9xEg1 fNkMOcrf9rrmQvjO+fDxbB5MPDb7Aw8+7cW68++E/hKYzPLRxijGKlTloMlcPk2b5/0a c7erwx1Iy1WMy34JDGcalzwYz/g0+4yiX7//cLFuzFI64H7LBidupUCbtgVLWhTN0wZe VEfA== X-Gm-Message-State: AOJu0YzncyR9pEHbnufQ6r4SECyXbsQW08auVZLIxRX00FIbrimKDkSZ jXaojWNbJsjYWZzplZ60WId3dpuKDap65mP6FLKKANCXBi2Ib+zm01xs6UR02qw= X-Google-Smtp-Source: AGHT+IE29JxkXE1Ukddj/yFh2BrwUsHlT6PLJVb0nuYcTMnOQxtpcUE/tibp3NnQGghoO46PHxDwsA== X-Received: by 2002:a81:980a:0:b0:5e4:8583:b52d with SMTP id p10-20020a81980a000000b005e48583b52dmr6800154ywg.58.1706615384037; Tue, 30 Jan 2024 03:49:44 -0800 (PST) Received: from ?IPV6:2605:a601:91f3:1900::2bb? ([2605:a601:91f3:1900::2bb]) by smtp.googlemail.com with ESMTPSA id f20-20020a05620a12f400b00783dd0f9383sm3477615qkl.7.2024.01.30.03.49.43 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 30 Jan 2024 03:49:43 -0800 (PST) Message-ID: <03e39298-d675-adef-d331-88affdcdf5e7@dunslane.net> Date: Tue, 30 Jan 2024 06:49:42 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 Subject: Re: 003_extrafiles.pl test fails on Windows with the newer Perl versions Content-Language: en-US To: Nazir Bilal Yavuz , PostgreSQL Hackers References: From: Andrew Dunstan In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2024-01-30 Tu 06:21, Nazir Bilal Yavuz wrote: > Hi, > > I was trying to install newer Perl versions to Windows CI images and > found that 003_extrafiles.pl test fails on Windows with: > > (0.183s) not ok 2 - file lists match > (0.000s) # Failed test 'file lists match' > # at C:/cirrus/src/bin/pg_rewind/t/003_extrafiles.pl line 81. > (0.000s) # Structures begin differing at: > # $got->[0] = > 'C:/cirrus/build/testrun/pg_rewind/003_extrafiles/data/t_003_extrafiles_primary_local_data/pgdata/tst_both_dir' > # $expected->[0] = > 'C:\cirrus\build/testrun/pg_rewind/003_extrafiles\data/t_003_extrafiles_primary_local_data/pgdata/tst_both_dir' > > (0.263s) not ok 5 - file lists match > (0.000s) # Failed test 'file lists match' > # at C:/cirrus/src/bin/pg_rewind/t/003_extrafiles.pl line 81. > (0.000s) # Structures begin differing at: > # $got->[0] = > 'C:/cirrus/build/testrun/pg_rewind/003_extrafiles/data/t_003_extrafiles_primary_remote_data/pgdata/tst_both_dir' > # $expected->[0] = > 'C:\cirrus\build/testrun/pg_rewind/003_extrafiles\data/t_003_extrafiles_primary_remote_data/pgdata/tst_both_dir' > > It looks like File::Find converts backslashes to slashes in the newer > Perl versions. I tried to find the related commit and found this: > https://github.com/Perl/perl5/commit/414f14df98cb1c9a20f92c5c54948b67c09f072d > > To solve this, I did the same conversion for Windows before comparing > the paths. And to support all Perl versions, I decided to always > convert them on Windows regardless of the Perl's version. The fix is > attached. > > I looked at other File::Find appearances in the code but they do not > compare the paths. So, I do not think there is any need to fix them. > > Any kind of feedback would be appreciated. > Looks reasonable on the face of it. I'll see about pushing this today. cheers andrew -- Andrew Dunstan EDB: https://www.enterprisedb.com