This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [RFA:] Stricter libstdc++ testsuite gate for working target file I/O
- From: Hans-Peter Nilsson <hans-peter dot nilsson at axis dot com>
- To: paolo dot carlini at oracle dot com
- Cc: hp at axis dot com, gcc-patches at gcc dot gnu dot org, libstdc++ at gcc dot gnu dot org, rdsandiford at googlemail dot com, nathan at codesourcery dot com
- Date: Thu, 7 Oct 2010 01:05:45 +0200
- Subject: Re: [RFA:] Stricter libstdc++ testsuite gate for working target file I/O
> Date: Wed, 06 Oct 2010 11:47:00 +0200
> From: Paolo Carlini <paolo.carlini@oracle.com>
> The approach makes sense, in general. My only doubt
I take that as approval for the patch for the gate function!
> is that I don't
> think we want to add the gate to a large part of the test files in
> 27_io/basic_filebuf, essentially.
grep says that 105 of them have it, 110 lack it. So, maybe
better eliminate the need for the gate in that subtree.
> Can't we skip the entire set at once,
> like we do for wchar_t or thread testcases, and leave the gate for those
> specific tests which are really sensitive to an lseek fully functional?
I think I see what you mean, hacking conformance.exp and filter
by filename. As below, looking for the "_filebuf" substring
perhaps? The base filenames themselves are rarely revealing
enough and most tests in */*_filebuf seem to need it. Half the
files in 27_io/basic_filebuf already have the
// { dg-require-fileio "" }
gate; I'm not completely sure how many of those without would
actually need the gate, but of those that I checked, 9/10 seem
to need it. A bit too many, so I appreciate been given an easy
way out. :)
Tested in trees with/without a working simulator (together with
the gate-function-patch), observing the right choice taken.
Ok?
libstdc++-v3:
* testsuite/libstdc++-dg/conformance.exp: Apply
check_v3_target_fileio as a gate for tests in
subdirectories matching the substring _filebuf.
--- libstdc++-v3/testsuite/libstdc++-dg/conformance.exp.orig Mon Oct 5 21:02:02 2009
+++ libstdc++-v3/testsuite/libstdc++-dg/conformance.exp Thu Oct 7 00:13:50 2010
@@ -1,6 +1,6 @@
# Functional and regression tests in C++ for libstdc++.
-# Copyright (C) 2001, 2002, 2003, 2004, 2009 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003, 2004, 2009, 2010 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -83,10 +83,13 @@ if {[info exists tests_file] && [file ex
# 2. performance tests.
# 3. wchar_t tests, if not supported.
# 4. thread tests, if not supported.
+ # 5. *_filebuf, if file I/O is not supported.
if { [string first _xin $t] == -1
&& [string first performance $t] == -1
&& (${v3-wchar_t} || [string first wchar_t $t] == -1)
- && (${v3-threads} || [string first thread $t] == -1) } {
+ && (${v3-threads} || [string first thread $t] == -1)
+ && ([string first "_filebuf" $t] == -1
+ || [check_v3_target_fileio]) } {
lappend tests $t
}
}
brgds, H-P