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 1u1uI5-00A60s-4m for pgsql-hackers@arkaria.postgresql.org; Mon, 07 Apr 2025 21:46:01 +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 1u1uI3-004974-Hu for pgsql-hackers@arkaria.postgresql.org; Mon, 07 Apr 2025 21:45:59 +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 1u1uI3-00496v-7r for pgsql-hackers@lists.postgresql.org; Mon, 07 Apr 2025 21:45:59 +0000 Received: from mail-yw1-x112a.google.com ([2607:f8b0:4864:20::112a]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1u1uI1-003zri-0y for pgsql-hackers@postgresql.org; Mon, 07 Apr 2025 21:45:59 +0000 Received: by mail-yw1-x112a.google.com with SMTP id 00721157ae682-6feab7c5f96so46825837b3.3 for ; Mon, 07 Apr 2025 14:45:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1744062355; x=1744667155; darn=postgresql.org; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :from:to:cc:subject:date:message-id:reply-to; bh=e9vScqei/6nmuA2kTZGh0lSE1XwQhekOdbq/JmxMihE=; b=TZwSny5cBQCmbEXX9EgDY9//dEPxpe/up/UOBONH+2r+8UBYKHBNwKLH+z1qJM3eb6 IZ0ccRBkDu0zL9utPzfG60peULoZ5XzImvSivSK74y8r4u6dqKzuDdY5yiQDl2oGs/g/ CHCbIidSLPr5sNe95t4SCg8X+sGFJ3nLIxmC77mTn165ce6fluXteq5nmF6eRAPCD00r aCU7Z/AJtOd9sLfZLSFvtLXstFY5biYQQSFj4OCsPAdLjRo/NUClCBnWgsN9nMrAg5uu oJubVB7EhChkCHAYRjKjzcM/ws1Us7VWjVwCnh5LP2PteMn6+17zArmvXutqrk0nhK5S iiQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1744062355; x=1744667155; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=e9vScqei/6nmuA2kTZGh0lSE1XwQhekOdbq/JmxMihE=; b=rQYVSYXxA6fyAWJVOsNhaxfpOje+yhCmc6f4rq7Kuj5PDLmJcPAGM/9BLkfEpkKwJA 26bvoQ3t/nzqZ5GpIef0Ktl7XhsdG/c+K7QH7kF9zTUou8GpQbRC+rcw7OPEIEmGmHP+ uyBcy2uicwQu83jaHK6m+P8Fw0OJsuUycGa8Ri81Fu6F31XNlRo+w+0/XaxHxiv6wRJ5 RCDUvXbiA16AqLV+2pXBfdeDuDmzGjSH42YJAlziIqLUGXgg6LxesmgI4f3YArFxo5Bp /Tkn8o82dwPmOtRyTz7uKS0wcZcx3QJv/zOew2ysC1QfzuGEnr0ssI6aJueFjc9nopXn C0RQ== X-Gm-Message-State: AOJu0YwU7OTyDfYfJtDRx0UJ5YcIUmnXJcDjK2rOIyndPQISVf+Bm5Jh XIKDzzFqyIntXdgGKM5SObvbwVtcyqIuTQktMN3Kzev6sxkXFZu4D1/G2Q== X-Gm-Gg: ASbGncuGhKzsCpRdOlzonPLXuNYS4Cp1cXCAukiTKh6WuyWax4HiCryZxkLmrUJMo/l PmLStjNRTvhyDCkR4kwntRJVUoQ60uetMAjY+wSH5CjLfm0Mx0ygpRO6OzbQXbR5sm/vyvnOJpV lsZk5bXekleIw4yCdXlGrJaCfuQVO0QddzzI0+PvCOUaNnLkXKTzlLFOdmMrAJhRWUudLgfEu/6 7nJoX1Let4rFq0TQ7PApBfbDBP7qrNJUFAWcI83jweDU4Nk0ngwFzmOvL3zRHDc7uFNUtNwn0S9 WlAuZHvvy6zmLiEy02XaOx5/kPiGS0XtWNZavcC5nKxAS6TNtP6ozrLRSMUlDdtSZDmONPR44Hm VmlQSC3y+hXYqtCqkWRaUr33ea+lbNhYBdN5v8ekzB7hbCg== X-Google-Smtp-Source: AGHT+IG3YQ7XTX3C/j1MkuKaQkVI9sDT7R0ZovkzcJzA8mcPV1IBfzDfrDTdvVa8Y4CE0xGLFlZUkA== X-Received: by 2002:a05:690c:38c:b0:6fd:390d:5a9c with SMTP id 00721157ae682-703e1545b1amr264318827b3.10.1744062354793; Mon, 07 Apr 2025 14:45:54 -0700 (PDT) Received: from nathan (162-195-168-172.lightspeed.stlsmo.sbcglobal.net. [162.195.168.172]) by smtp.gmail.com with ESMTPSA id 00721157ae682-703d1e5d40bsm27439097b3.50.2025.04.07.14.45.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Apr 2025 14:45:54 -0700 (PDT) Date: Mon, 7 Apr 2025 16:45:52 -0500 From: Nathan Bossart To: pgsql-hackers@postgresql.org Cc: andrew@dunslane.net Subject: prevent 006_transfer_modes.pl from leaving files behind Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="XlFYk3TEz/DERyZy" Content-Disposition: inline List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --XlFYk3TEz/DERyZy Content-Type: text/plain; charset=us-ascii Content-Disposition: inline The other pg_upgrade tests chdir to tmp_check prior to running pg_upgrade to avoid leaving behind delete_old_cluster.{sh,bat}. 006_transfer_modes.pl should, too. However, this test is a little different because it loops over all of the available transfer modes and runs pg_upgrade for each one supported by the platform. From my testing and code analysis, it seems sufficient to change the directory once at the beginning of the test, but we could alternatively save the current directory and change back to it in each iteration to be safe. Thoughts? -- nathan --XlFYk3TEz/DERyZy Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="v1-0001-Fix-the-006_transfer_modes.pl-test.patch" From a349a98b19708984dc677e5809038d343d67bf17 Mon Sep 17 00:00:00 2001 From: Nathan Bossart Date: Mon, 7 Apr 2025 16:23:44 -0500 Subject: [PATCH v1 1/1] Fix the 006_transfer_modes.pl test. This test was leaving files like delete_old_cluster.sh in the source directory for VPATH and meson builds. To fix, change the directory to tmp_check before running the test, as was done in commits 15b6d21553, 8af917be6b, and c462b054ba. Oversight in commit af0d4901c1. Reported-by: Andrew Dunstan (on Discord) Discussion: ??? --- src/bin/pg_upgrade/t/006_transfer_modes.pl | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/bin/pg_upgrade/t/006_transfer_modes.pl b/src/bin/pg_upgrade/t/006_transfer_modes.pl index 34fddbcdab5..ed713a7d44d 100644 --- a/src/bin/pg_upgrade/t/006_transfer_modes.pl +++ b/src/bin/pg_upgrade/t/006_transfer_modes.pl @@ -102,6 +102,11 @@ sub test_mode $new->clean_node(); } +# In a VPATH build, we'll be started in the source directory, but we want +# to run pg_upgrade in the build directory so that any files generated finish +# in it, like delete_old_cluster.{sh,bat}. +chdir ${PostgreSQL::Test::Utils::tmp_check}; + test_mode('--clone'); test_mode('--copy'); test_mode('--copy-file-range'); -- 2.39.5 (Apple Git-154) --XlFYk3TEz/DERyZy--