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 1r6yp1-003S1F-RI for pgsql-hackers@arkaria.postgresql.org; Sat, 25 Nov 2023 20:00:11 +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 1r6yoz-004Zz3-B2 for pgsql-hackers@arkaria.postgresql.org; Sat, 25 Nov 2023 20:00:09 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1r6yoz-004Zyu-1I for pgsql-hackers@lists.postgresql.org; Sat, 25 Nov 2023 20:00:09 +0000 Received: from mail-lf1-x12b.google.com ([2a00:1450:4864:20::12b]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1r6yow-007LBZ-Er for pgsql-hackers@postgresql.org; Sat, 25 Nov 2023 20:00:07 +0000 Received: by mail-lf1-x12b.google.com with SMTP id 2adb3069b0e04-507cd62472dso4125780e87.0 for ; Sat, 25 Nov 2023 12:00:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700942403; x=1701547203; darn=postgresql.org; h=content-language:to:subject:from:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to; bh=zBAnmHWcyvujgxTAxCA3WtCulNIMGwlKsVPZaBf/sEc=; b=fW7/wgVAhYI8QhOBGsbTac9B6wpLU2aZjeCQeVwjgsTAUnaVyLZFDwxW5yObhZeVzc nduN+0YAU7DxE47fxXqb+OIYYTMWBS3IWTIhgJPObqLBEA8hum/LQBZejDCwEzQRZ5YZ wI3wXWY4qpTLQGpVcI2qnvo4+Gkgd7pYejGnLfXR2X9vQEppMJwyeHSN6Cfwa1pxt03T Hyl2gq39wv5/OLw1NMy8LGOCff11nr5VW6i/W4AQAACVey38yXljMt46gbrwi2pY6YOB LO+qjb0F2LXy6uGwaJ6tVUdDw6ZRs8izROi3jjqQe1jdLE+MrD2IsdZlndNV9YiEJBk5 nbRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700942403; x=1701547203; h=content-language:to:subject:from:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=zBAnmHWcyvujgxTAxCA3WtCulNIMGwlKsVPZaBf/sEc=; b=Q3T2N6UKbjsGJhOSXqC3NDR5JqODUemv/1pX7MdNrM61yM9ZzOYN2e80UrZtc+c8oc 9huAlLq6Xx/xu/+NX+rH6HhjIyyWETqLKJ9jxPCq1pcGxTtsjCpzGYe60zIIR5s36jmc fkXZbufJiHwC3QJg4kLyyhVoMrfWiiMisFWuUqwMjwfXANaKEwi509KrQpMIBSbHdq0q V4j3KAOhSqK/2B5cvfzG6ygOcVcJR74EuWBoEX3dsancqzNwTTmHoX7b5xg3Lc4nf5uw C2W6BL0hgMGCSxSUb7fpvYPGu5AyQsdi9OqP4lccXS1p7Unl6rIoDGApVedcg3VDKgku rxlA== X-Gm-Message-State: AOJu0YwqLI2iiX5OZyont7XXpjCNdMIU5B9tIXVO36bdhd8bE4pYzr3a GFevI3A0v6wYM92MLXbYEVzNBwyf6Sw= X-Google-Smtp-Source: AGHT+IEHKty8n+CEh6qj3s7rB2h7dNP6qUUzx9H0p5qbKrXb0erABH6jL6S+85Wzxt5U3zz1x5oqUQ== X-Received: by 2002:a05:6512:e97:b0:50a:a868:b300 with SMTP id bi23-20020a0565120e9700b0050aa868b300mr2739825lfb.15.1700942403257; Sat, 25 Nov 2023 12:00:03 -0800 (PST) Received: from [1.0.0.7] ([91.185.76.245]) by smtp.gmail.com with ESMTPSA id x7-20020ac259c7000000b0050aa9df16fbsm939395lfn.179.2023.11.25.12.00.01 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 25 Nov 2023 12:00:02 -0800 (PST) Content-Type: multipart/mixed; boundary="------------F4lcAGcwSZq0CA2jm9m4Ca6g" Message-ID: <60d434b9-53d9-9ea1-819b-efebdcf44e41@gmail.com> Date: Sat, 25 Nov 2023 23:00:01 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 From: Alexander Lakhin Subject: Test 002_pg_upgrade fails with olddump on Windows To: pgsql-hackers Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk This is a multi-part message in MIME format. --------------F4lcAGcwSZq0CA2jm9m4Ca6g Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Hello, When trying to use a custom dump with the test pg_upgrade/002_pg_upgrade, I observe the following test failure on Windows: >meson test --suite setup >echo create database regression>...\dump.sql >set olddump=...\dump.sql& set oldinstall=.../tmp_install/usr/local/pgsql& meson test pg_upgrade/002_pg_upgrade 1/1 postgresql:pg_upgrade / pg_upgrade/002_pg_upgrade ERROR            11.38s   exit status 1 regress_log_002_pg_upgrade.txt contains: ... [09:07:06.704](3.793s) ok 11 - run of pg_upgrade for new instance ... [09:07:07.301](0.001s) not ok 15 - old and new dumps match after pg_upgrade [09:07:07.301](0.000s) #   Failed test 'old and new dumps match after pg_upgrade' #   at .../src/bin/pg_upgrade/t/002_pg_upgrade.pl line 452. [09:07:07.301](0.000s) #          got: '1' #     expected: '0' === diff of ...\build\testrun\pg_upgrade\002_pg_upgrade\data\tmp_test_ifk8/dump1.sql and ...\build\testrun\pg_upgrade\002_pg_upgrade\data\tmp_test_ifk8/dump2.sql === stdout === === stderr === === EOF === >dir "testrun\pg_upgrade\002_pg_upgrade\data\tmp_test_ifk8/" 11/25/2023  09:06 AM             2,729 dump1.sql 11/25/2023  09:07 AM             2,590 dump2.sql >diff -s "testrun\pg_upgrade\002_pg_upgrade\data\tmp_test_ifk8\dump1.sql" "testrun\pg_upgrade\002_pg_upgrade\data\tmp_test_ifk8\dump2.sql" Files testrun\pg_upgrade\002_pg_upgrade\data\tmp_test_ifk8\dump1.sql and testrun\pg_upgrade\002_pg_upgrade\data\tmp_test_ifk8\dump2.sql are identical As I can see, dump1.sql contains line endings 0d 0a, while dump2.sql — 0a. The attached patch fixes the issue for me. Best regards, Alexander --------------F4lcAGcwSZq0CA2jm9m4Ca6g Content-Type: text/x-patch; charset=UTF-8; name="fix_002_pg_upgrade-with-olddump-win.patch" Content-Disposition: attachment; filename="fix_002_pg_upgrade-with-olddump-win.patch" Content-Transfer-Encoding: base64 ZGlmZiAtLWdpdCBhL3NyYy9iaW4vcGdfdXBncmFkZS90LzAwMl9wZ191cGdyYWRlLnBsIGIv c3JjL2Jpbi9wZ191cGdyYWRlL3QvMDAyX3BnX3VwZ3JhZGUucGwKaW5kZXggYzZkODNkM2My MS4uZDM0YjQ1ZTM0NiAxMDA2NDQKLS0tIGEvc3JjL2Jpbi9wZ191cGdyYWRlL3QvMDAyX3Bn X3VwZ3JhZGUucGwKKysrIGIvc3JjL2Jpbi9wZ191cGdyYWRlL3QvMDAyX3BnX3VwZ3JhZGUu cGwKQEAgLTI5Myw2ICsyOTMsNyBAQCBpZiAoZGVmaW5lZCgkRU5We29sZGluc3RhbGx9KSkK IAl9CiAKIAlvcGVuIG15ICRmaCwgIj4iLCAkZHVtcDFfZmlsZSBvciBkaWUgImNvdWxkIG5v dCBvcGVuIGR1bXAgZmlsZSI7CisJYmlubW9kZSAkZmg7CiAJcHJpbnQgJGZoICRkdW1wX2Rh dGE7CiAJY2xvc2UgJGZoOwogCg== --------------F4lcAGcwSZq0CA2jm9m4Ca6g--