Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit9a8f583

Browse files
committed
Fix portability issue in pg_upgrade test script: avoid $PWD.
SUSv2-era shells don't set the PWD variable, though anything more moderndoes. In the buildfarm environment this could lead to test.sh executingwith PWD pointing to $HOME or another high-level directory, so that therewere conflicts between concurrent executions of the test in differentbranch subdirectories. This appears to be the explanation for recentintermittent failures on buildfarm members binturong and dingo (and mightwell have something to do with the buildfarm script's failure to capturelog files from pg_upgrade tests, too).To fix, just use `pwd` in place of $PWD. AFAICS test.sh is the only placein our source tree that depended on $PWD. Back-patch to all versionscontaining this script.Per buildfarm. Thanks to Oskari Saarenmaa for diagnosing the problem.
1 parent414bef3 commit9a8f583

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

‎src/bin/pg_upgrade/test.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,8 @@ esac
6262
POSTMASTER_OPTS="-F -c listen_addresses=$LISTEN_ADDRESSES -k\"$PGHOST\""
6363
export PGHOST
6464

65-
temp_root=$PWD/tmp_check
65+
# don't rely on $PWD here, as old shells don't set it
66+
temp_root=`pwd`/tmp_check
6667

6768
if ["$1"='--install' ];then
6869
temp_install=$temp_root/install
@@ -104,7 +105,7 @@ PGDATA="$BASE_PGDATA.old"
104105
export PGDATA
105106
rm -rf"$BASE_PGDATA""$PGDATA"
106107

107-
logdir=$PWD/log
108+
logdir=`pwd`/log
108109
rm -rf"$logdir"
109110
mkdir"$logdir"
110111

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp