Patchwork [v2] libstdc++-v3: add more verifications to testsuite

login
register
mail settings
Submitter Paolo Carlini
Date June 26, 2010, 8:14 p.m.
Message ID <4C265F8A.2070306@oracle.com>
Download mbox | patch
Permalink /patch/57067/
State New
Headers show

Comments

Paolo Carlini - June 26, 2010, 8:14 p.m.
On 06/26/2010 12:50 AM, Kees Cook wrote:
> Hello,
>
> Here is a patch that adds additional tests to the libstdc++-v3 test suite.
> Ubuntu builds packages with -D_FORTIFY_SOURCE=2, so running the suite
> shows a few minor warnings.  This cleans them up by providing additional
> sanity checks around freopen, fgets, and fwrite, as already done in other
> places in the testsuite.
>
> v2:
>  - Adjusted to not use "!= NULL", as recommended by Paolo Carlini.
>   
Thanks, applied to mainline together with the below small tweak to
testsuite_hooks.h (otherwise testsuite/27_io/objects/char/9661-1.cc
spuriously fails)

Paolo.

/////////////////
Matthias Klose - June 26, 2010, 9:49 p.m.
On 26.06.2010 22:14, Paolo Carlini wrote:
> On 06/26/2010 12:50 AM, Kees Cook wrote:
>> Hello,
>>
>> Here is a patch that adds additional tests to the libstdc++-v3 test suite.
>> Ubuntu builds packages with -D_FORTIFY_SOURCE=2, so running the suite
>> shows a few minor warnings.  This cleans them up by providing additional
>> sanity checks around freopen, fgets, and fwrite, as already done in other
>> places in the testsuite.
>>
>> v2:
>>   - Adjusted to not use "!= NULL", as recommended by Paolo Carlini.
>>
> Thanks, applied to mainline together with the below small tweak to
> testsuite_hooks.h (otherwise testsuite/27_io/objects/char/9661-1.cc
> spuriously fails)

ok to apply to the 4.4 and 4.5 branches as well?

   Matthias
Paolo Carlini - June 26, 2010, 10:51 p.m.
On 06/26/2010 11:49 PM, Matthias Klose wrote:
>> Thanks, applied to mainline together with the below small tweak to
>> testsuite_hooks.h (otherwise testsuite/27_io/objects/char/9661-1.cc
>> spuriously fails)
>
> ok to apply to the 4.4 and 4.5 branches as well?
Seems more urgent reducing the huge testcases in 44039 and 44040.

Paolo.
Richard Guenther - June 26, 2010, 11:06 p.m.
On Sun, Jun 27, 2010 at 12:51 AM, Paolo Carlini
<paolo.carlini@oracle.com> wrote:
> On 06/26/2010 11:49 PM, Matthias Klose wrote:
>>> Thanks, applied to mainline together with the below small tweak to
>>> testsuite_hooks.h (otherwise testsuite/27_io/objects/char/9661-1.cc
>>> spuriously fails)
>>
>> ok to apply to the 4.4 and 4.5 branches as well?
> Seems more urgent reducing the huge testcases in 44039 and 44040.

Why don't you do it then?

Richard.
Paolo Carlini - June 27, 2010, 12:03 a.m.
On 06/27/2010 01:06 AM, Richard Guenther wrote:
> Why don't you do it then?
Sure, I do 44039 and you 44040, ok?

Paolo.
Richard Guenther - June 27, 2010, 8:07 a.m.
On Sun, Jun 27, 2010 at 2:03 AM, Paolo Carlini <paolo.carlini@oracle.com> wrote:
> On 06/27/2010 01:06 AM, Richard Guenther wrote:
>> Why don't you do it then?
> Sure, I do 44039 and you 44040, ok?

Ok.

Richard.

> Paolo.
>

Patch

Index: testsuite/util/testsuite_hooks.h
===================================================================
--- testsuite/util/testsuite_hooks.h	(revision 161439)
+++ testsuite/util/testsuite_hooks.h	(working copy)
@@ -1,7 +1,8 @@ 
 // -*- C++ -*-
 // Utility subroutines for the C++ library testsuite. 
 //
-// Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+// Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
+// 2009, 2010
 // Free Software Foundation, Inc.
 //
 // This file is part of the GNU ISO C++ Library.  This library is free
@@ -59,7 +60,7 @@ 
 # include <cassert>
 # define VERIFY(fn) assert(fn)
 #else
-# define VERIFY(fn) test &= (fn)
+# define VERIFY(fn) test &= bool(fn)
 #endif
 
 #ifdef _GLIBCXX_HAVE_UNISTD_H