Re: Re: Email to hackers for test coverage

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: "movead(dot)li(at)highgo(dot)ca" <movead(dot)li(at)highgo(dot)ca>
Cc: "ibrar(dot)ahmad" <ibrar(dot)ahmad(at)gmail(dot)com>, "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Re: Email to hackers for test coverage
Date: 2019-08-27 06:07:48
Message-ID: 20190827060748.GE7422@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Aug 26, 2019 at 05:10:59PM +0800, movead(dot)li(at)highgo(dot)ca wrote:
> Thanks for your remind, I have modified the patch and now it is
> 'regression_20190826.patch' in attachment, and I have done a successful
> test on Cygwin.

There is a section in float4.sql which deals with overflow and
underflow, so wouldn't it be better to move the tests there? You
could just trigger the failures with that:
=# insert into float4_tbl values ('-10e-70'::float8);
ERROR: 22003: value out of range: underflow
LOCATION: check_float4_val, float.h:145
=# insert into float4_tbl values ('-10e70'::float8);
ERROR: 22003: value out of range: overflow
LOCATION: check_float4_val, float.h:140

I would also test all four patterns: 10e70, 10e-70, -10e70, -10e-70.

For the numeric part, this improves the case of
ApplySortAbbrevFullComparator() where both values are not NULL. Could
things be done so as the other code paths are fully covered? One
INSERT is fine by the way to add the extra coverage.
--
Michael

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2019-08-27 06:27:26 Re: fix "Success" error messages
Previous Message Jamison, Kirk 2019-08-27 05:55:18 RE: Resume vacuum and autovacuum from interruption and cancellation