pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Victor Wagner <vitus@wagner.pp.ru>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Subject: Re: Non-portable shell code in pg_upgrade tap tests
Date: Fri, 20 Jul 2018 17:55:08 +0300
Message-ID: <20180720175508.07776219@fafnir.local.vm> (raw)
In-Reply-To: <17833.1532096747@sss.pgh.pa.us>
References: <20180720153820.69e9ae6c@fafnir.local.vm>
	<17833.1532096747@sss.pgh.pa.us>

On Fri, 20 Jul 2018 10:25:47 -0400
Tom Lane <tgl@sss.pgh.pa.us> wrote:

> Victor Wagner <vitus@wagner.pp.ru> writes:
> > I've discovered that in the branch REL_11_STABLE there is shell
> > script src/bin/pg_upgrade/test.sh which doesn't work under Solaris
> > 10. (it uses $(command) syntax with is not compatible with original
> > Solaris /bin/sh)  

> 
> Please send a patch.  Most of us do not have access to old shells

Here it goes. Previous letter was written before fixed tests were
completed, because this old machine is slow.



> we could test this on.  (The oldest machine I have, and it's old
> enough to vote, does run that script ... I doubt very many other
> developers have anything older.)
> 
> 			regards, tom lane

Attachments:

original_systemV_sh_compatibility.patch (text/x-patch, 1.0K) download commit efb0bbcefeccd826ba951ac31057689e752b79d0 Author: Victor Wagner <vitus@wagner.pp.ru> Date: Fri Jul 20 16:06:50 2018 +0300 Fixed incompatibility of src/bin/pg_upgrade/test.sh with solaris /bin/sh diff --git a/src/bin/pg_upgrade/test.sh b/src/bin/pg_upgrade/test.sh index 45ccd8fa66..775dd5729d 100644 --- a/src/bin/pg_upgrade/test.sh +++ b/src/bin/pg_upgrade/test.sh @@ -234,7 +234,7 @@ pg_upgrade $PG_UPGRADE_OPTS -d "${PGDATA}.old" -D "${PGDATA}" -b "$oldbindir" -B # Windows hosts don't support Unix-y permissions. case $testhost in MINGW*) ;; - *) if [ $(find ${PGDATA} -type f ! -perm 640 | wc -l) -ne 0 ]; then + *) if [ `find ${PGDATA} -type f ! -perm 640 | wc -l` -ne 0 ]; then echo "files in PGDATA with permission != 640"; exit 1; fi ;; @@ -242,7 +242,7 @@ esac case $testhost in MINGW*) ;; - *) if [ $(find ${PGDATA} -type d ! -perm 750 | wc -l) -ne 0 ]; then + *) if [ `find ${PGDATA} -type d ! -perm 750 | wc -l` -ne 0 ]; then echo "directories in PGDATA with permission != 750"; exit 1; fi ;;

view thread (17+ messages)  latest in thread

Message-ID: <20180720175508.07776219@fafnir.local.vm>
Permalink:  ../20180720175508.07776219@fafnir.local.vm/
Also on:    postgresql.org/message-id/20180720175508.07776219@fafnir.local.vm

 ·  · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: vitus@wagner.pp.ru, tgl@sss.pgh.pa.us
  Subject: Re: Non-portable shell code in pg_upgrade tap tests
  In-Reply-To: <20180720175508.07776219@fafnir.local.vm>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox