diff mbox

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

Message ID 4C265F8A.2070306@oracle.com
State New
Headers show

Commit Message

Paolo Carlini June 26, 2010, 8:14 p.m. UTC
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.

/////////////////

Comments

Matthias Klose June 26, 2010, 9:49 p.m. UTC | #1
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. UTC | #2
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 Biener June 26, 2010, 11:06 p.m. UTC | #3
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. UTC | #4
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 Biener June 27, 2010, 8:07 a.m. UTC | #5
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.
>
diff mbox

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