From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Oskari Saarenmaa <os(at)ohmu(dot)fi> |
Cc: | Andres Freund <andres(at)anarazel(dot)de>, Bruce Momjian <bruce(at)momjian(dot)us>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Repeated pg_upgrade buildfarm failures on binturon |
Date: | 2015-07-07 15:24:25 |
Message-ID: | 26168.1436282665@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
I wrote:
> Given the last sentence in the POSIX 2008 text, I think unconditionally
> munging PWD as you're proposing is a bit risky. What I suggest is that
> we add code to set PWD only if it's not set, which is most easily done
> in test.sh itself, along the lines of
> # Very old shells may not set PWD for us.
> if [ x"$PWD" = x"" ]; then
> PWD=`pwd -P`
> fi
Oh, wait, scratch that: the build logs you showed clearly indicate that
the test is running with temp_root set to
/export/home/pgfarmer/build-farm/tmp_check
which implies that PWD was not empty but "/export/home/pgfarmer/build-farm".
So the above wouldn't fix it.
A likely hypothesis is that the buildfarm script was invoked using some
modern shell that did set PWD, but then test.sh is being executed (in a
much lower directory) by some SUSv2-era shell that doesn't.
I'm still kind of afraid to explicitly change PWD in a modern shell,
though. Perhaps the right thing is just not to rely on PWD at all
in test.sh, but replace $PWD with `pwd -P`. (I did check that this
utility is required by SUSv2.)
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Simon Riggs | 2015-07-07 15:25:13 | Re: Freeze avoidance of very large table. |
Previous Message | David Christensen | 2015-07-07 15:23:11 | [PATCH] correct the initdb.log path for pg_regress |