Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YIN0d-0001Fr-B4 for pgsql-odbc@arkaria.postgresql.org; Mon, 02 Feb 2015 19:50:11 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1YIN0c-0000Qv-RQ for pgsql-odbc@arkaria.postgresql.org; Mon, 02 Feb 2015 19:50:10 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1YIN0c-0000Pw-7Z for pgsql-odbc@postgresql.org; Mon, 02 Feb 2015 19:50:10 +0000 Received: from smtp-outbound-1.vmware.com ([208.91.2.12]) by makus.postgresql.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1YIN0U-0006BP-H3 for pgsql-odbc@postgresql.org; Mon, 02 Feb 2015 19:50:08 +0000 Received: from sc9-mailhost3.vmware.com (sc9-mailhost3.vmware.com [10.113.161.73]) by smtp-outbound-1.vmware.com (Postfix) with ESMTP id 7D5D9294AF; Mon, 2 Feb 2015 11:49:58 -0800 (PST) Received: from EX13-CAS-013.vmware.com (EX13-CAS-013.vmware.com [10.113.191.65]) by sc9-mailhost3.vmware.com (Postfix) with ESMTP id 74548407E3; Mon, 2 Feb 2015 11:49:58 -0800 (PST) Received: from [192.168.1.90] (10.113.160.246) by EX13-MBX-024.vmware.com (10.113.191.44) with Microsoft SMTP Server (TLS) id 15.0.913.22; Mon, 2 Feb 2015 11:49:40 -0800 Message-ID: <54CFD4BF.7000505@vmware.com> Date: Mon, 2 Feb 2015 21:49:19 +0200 From: Heikki Linnakangas Organization: VMware User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.3.0 MIME-Version: 1.0 To: Michael Paquier CC: "pgsql-odbc@postgresql.org" Subject: Re: Regression tests References: <54C8CB1B.8060002@vmware.com> In-Reply-To: Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.113.160.246] X-ClientProxiedBy: EX13-CAS-013.vmware.com (10.113.191.65) To EX13-MBX-024.vmware.com (10.113.191.44) X-Pg-Spam-Score: -6.9 (------) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-odbc Precedence: bulk Sender: pgsql-odbc-owner@postgresql.org 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