From: Heikki Linnakangas <hlinnakangas@vmware.com>
To: Michael Paquier <michael.paquier@gmail.com>
Cc: pgsql-odbc@postgresql.org <pgsql-odbc@postgresql.org>
Subject: Re: Regression tests
Date: Mon, 2 Feb 2015 21:49:19 +0200
Message-ID: <54CFD4BF.7000505@vmware.com> (raw)
In-Reply-To: <CAB7nPqRGMDgS7nHJJ7mbA37djjKmJ_7E25Vn4uMGwyzMMzkA5Q@mail.gmail.com>
References: <54C8CB1B.8060002@vmware.com>
<CAB7nPqRGMDgS7nHJJ7mbA37djjKmJ_7E25Vn4uMGwyzMMzkA5Q@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-odbc>
On 01/29/2015 02:36 PM, Michael Paquier wrote:
> Some remarks about the first patch:
> 2) Tests will fail if test/results does not exist, and that's the case
> of a raw tree. You can either create an empty folder test/results with
> a .gitignore containing "*", or enforce the creation of this folder if
> it does not exist in test/. TBH, the latter is better that having an
> empty folder results/ to keep the code tree clean. This problem is of
> course the same on all platforms.
Fixed. I did the latter, because that works when the tests are run from
different directory than where the source is. Hiroshi did some fixing
earlier to make that work (276cb5e4).
> 5) Shouldn't you use strrchr instead of strchr?
> + /* if the input is a plain test name, construct the binary
> name from it */
> + if (strchr(in, DIR_SEP) == NULL)
> + {
> + strcpy(testname, in);
> + sprintf(binname, "src%c%s-test", DIR_SEP, in);
> + return;
> + }
That's just checking if '/' exists, so it doesn't matter.
> 6) I would imagine strrchr here as well:
> + while (*s != '\0' && (s = strchr(s + 1, DIR_SEP)) != NULL)
> + basename = s + 1;
Yeah, here it makes more sense.
> 8) It doesn't matter much as process exits quickly, but [coverity]
> closing fd in slurpfile() before calling bailout() would be nice
> [/coverity].
Nah, seems more trouble than it's worth.
> 9) sampletables.sql needs to have 1 SQL per line to have reset-db work
> correctly. I don't mind much about this restriction but it seems to me
> that this restriction meritates a comment at the top of
> sampletables.sql.
Yes, good point, that should be documented. Added a comment.
Pushed this first patch. Thanks for the review!
- Heikki
--
Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-odbc
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-odbc@postgresql.org
Cc: hlinnakangas@vmware.com, michael.paquier@gmail.com
Subject: Re: Regression tests
In-Reply-To: <54CFD4BF.7000505@vmware.com>
References: <54C8CB1B.8060002@vmware.com> <CAB7nPqRGMDgS7nHJJ7mbA37djjKmJ_7E25Vn4uMGwyzMMzkA5Q@mail.gmail.com> <54CFD4BF.7000505@vmware.com>
* 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