| 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-29 02:26:08 |
| Message-ID: | 200607290226.k6T2Q8h02249@momjian.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers pgsql-patches |
Tom Lane wrote:
> Bruce Momjian <bruce(at)momjian(dot)us> writes:
> >> Tom Lane wrote:
> >>> The cases that I think we most need to defend against are
> >>> (A) diff program not found
>
> > In summary, on MinGW, files differ or 'diff' not found, returns 1. If
> > one of the files to be compared does not exist, it returns 2. And of
> > course, if the files are the same, it returns zero.
>
> OK. The problem here is that pg_regress is coded to assume that
> zero-length output file represents success. Given the above Windows
> behavior that is *clearly* not good enough, because that's probably
> exactly what we will see after diff-not-found (if the Windows shell
> acts like a Unix shell does and creates the ">" target first).
>
> I'd suggest modifying the logic so that zero-length output file with a
> nonzero return from the child be treated as a fatal condition (not just
> a difference, but bail out).
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.
--
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 |
|---|---|---|
| /pgpatches/wait | text/x-diff | 4.8 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2006-07-29 02:50:01 | Re: [Pgbuildfarm-members] [Fwd: RE: Build farm on Windows] |
| Previous Message | Alvaro Herrera | 2006-07-29 02:21:01 | Re: The vacuum-ignore-vacuum patch |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Bruce Momjian | 2006-07-29 02:54:57 | Re: Possible explanation for Win32 stats regression test |
| Previous Message | Alvaro Herrera | 2006-07-29 02:21:01 | Re: The vacuum-ignore-vacuum patch |