Re: mb_regress.sh gripes

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Josh Kupershmidt <schmiddy(at)gmail(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: mb_regress.sh gripes
Date: 2011-09-01 13:25:44
Message-ID: CA+TgmobBp1yJ8kHfOHWBbcowLcgkDv=n3WUrS6mBfifgB_uVyw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Aug 18, 2011 at 6:19 PM, Josh Kupershmidt <schmiddy(at)gmail(dot)com> wrote:
> A few gripes about mb_regress.sh:
>  1. No exit code is specified, so even if there are differences
> between results/ and expected/ the script will still return 0.
>
>  2. The 'dropdb' command is used to wipe out the "utf8" database
> before the run. This generates an error message like:
>  dropdb: database removal failed: ERROR:  database "utf8" does not exist
>
> the first time you run the script. IMO it would be less startling to
> just print a NOTICE here.
>
>  3. No error checking for whether createdb succeeds.
>
> The attached patch fixes these problems.

Committed, with some changes. I used the new --if-exists option for
dropdb rather than doing it as you had it here; I assume this may have
been the motivation for that patch. I also just made the exit code 1
no matter how many failures there were. That seems more normal, and I
wasn't altogether certain that $((expr)) is completely portable. I
also set the execute bit on the script.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2011-09-01 14:04:33 Re: Removal of useless include references
Previous Message Kohei Kaigai 2011-09-01 12:56:19 Re: [v9.1] sepgsql - userspace access vector cache