regression script/makefile exit failure

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: regression script/makefile exit failure
Date: 2004-12-08 01:10:42
Message-ID: 41B65492.6010101@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches


I have seen several cases where either pg_regress appears not to exit
with the expected non-zero exit status or "make check" does not
apparently exit with the expected non-zero status.

In particular, I've seen it on cygwin, windows, and have at least a
suspicion of it happening on FreeBSD.

The apparently offending code is this:

message "initializing database system"
[ "$debug" = yes ] && initdb_options='--debug'
"$bindir/initdb" -D "$PGDATA" -L "$datadir" --noclean
$initdb_options >"$LOGDIR/initdb.log" 2>&1

if [ $? -ne 0 ]
then
echo
echo "$me: initdb failed"
echo "Examine $LOGDIR/initdb.log for the reason."
echo
(exit 2); exit
fi

and it's called from this makefile target:

check: all
-rm -rf ./testtablespace
mkdir ./testtablespace
$(SHELL) ./pg_regress --temp-install
--top-builddir=$(top_builddir) --schedule=$(srcdir)/parallel_schedule
--multibyte=$(MULTIBYTE) $(MAXCONNOPT)

The practical consequence of this is that instead of failing at this
stage, the buildfarm script continues on until it somewhat inexplicably
fails at the initdb stage.

Now, perhaps I'm calling it wrong, but I don't think so. The relevant
perl code is this:

my @makeout = `cd $pgsql/src/test/regress && $make check 2>&1`;
my $status = $? >>8;

which idiom seems to work as expected everywhere else quite happily. And
in fact I've seen "make check" fail as expected on other failure paths
(such as not matching the expected result.)

Anyone have any penetrating thoughts?

cheers

andrew

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Premsun Choltanwanich 2004-12-08 02:37:53 Re: How can I recovery old Data from files and
Previous Message Hannu Krosing 2004-12-08 00:33:38 Re: Status of server side Large Object support?

Browse pgsql-patches by date

  From Date Subject
Next Message Euler Taveira de Oliveira 2004-12-09 02:48:18 pt_BR FAQ update
Previous Message Guillaume LELARGE 2004-12-08 00:27:14 Update french po files