Re: [HACKERS] pg_regress breaks on msys

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Hiroshi Saito <z-saito(at)guitar(dot)ocn(dot)ne(dot)jp>, PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: [HACKERS] pg_regress breaks on msys
Date: 2006-07-30 01:45:25
Message-ID: 200607300145.k6U1jP829686@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Tom Lane wrote:
> Bruce Momjian <bruce(at)momjian(dot)us> writes:
> > I modified pg_regress.c to use just the return code to determine if the
> > diff worked, but I added in a WIN32-specific test for the file size. I
> > think that is the cleanest solution. Attached.
>
> It really needs a comment, along the lines of
>
> /*
> * On Windows we'll get exit status 1 if the diff invocation
> * failed; so we need a way to distinguish failure from "files
> * are different". Check to make sure that a diff file was
> * created and is nonempty.
> */
>
> Also the test ought to account for file_size returning -1 if file's
> not there, so
>
> + #ifdef WIN32
> + if (WEXITSTATUS(r) == 1 && file_size(filename) <= 0)
> ...

I had already added a comment this morning, but didn't post the updated
patch. I have made the adjustment for -1.

Patch attached and applied.

--
Bruce Momjian bruce(at)momjian(dot)us
EnterpriseDB http://www.enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

Attachment Content-Type Size
/bjm/diff text/x-diff 5.0 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Joe Conway 2006-07-30 01:45:44 Re: Values list-of-targetlists patch for comments (was Re: [PATCHES]
Previous Message Tom Lane 2006-07-30 01:44:10 Re: New variable server_version_num

Browse pgsql-patches by date

  From Date Subject
Next Message Joe Conway 2006-07-30 01:45:44 Re: Values list-of-targetlists patch for comments (was Re: [PATCHES]
Previous Message Tom Lane 2006-07-30 01:44:10 Re: New variable server_version_num