On 30/08/18 19:19 -0600, Sandra Loosemore wrote:
One of the simulators we use for testing nios2-elf builds doesn't
include full semihosted fileio support. (IIRC it can do I/O to the
console and open and close files, but doesn't support fseek,
stat/fstat, unlink, etc). There are a bunch of libstdc++
wchar_t/$test.cc test cases that fail on this target where the
corresponding char/$test.cc test is skipped, because the char test
case files already specify "dg-require-fileio" and the wchar_t ones
don't.
I used grep etc to find all such pairs of test cases, and then added
"dg-require-fileio" to the wchar_t files where it was missing. Note
that this patch touches more test cases than the ones that were
actually failing,
Three of them use dg-require-namedlocale to only run when localedata
for a specific locale is available, and four are restricted to only be
tested for { target *-*-mingw* }, would that explain it?
and I didn't confirm that all the similarly-named
char and wchar_t files were actually testing the exact same things.
These ones don't match the corresponding /char/ version:
libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/wchar_t/2.cc
libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/wchar_t/3.cc
libstdc++-v3/testsuite/27_io/basic_ifstream/cons/wchar_t/1.cc
libstdc++-v3/testsuite/27_io/basic_ofstream/cons/wchar_t/1.cc
libstdc++-v3/testsuite/27_io/basic_ofstream/open/wchar_t/1.cc
libstdc++-v3/testsuite/27_io/objects/wchar_t/10.cc
They do all use file I/O though.
Is this OK to check in? Or is some deeper analysis required to
identify which tests are affected?
I checked the files, most of them #include <fstream> so we can
safely assume they require file I/O. These ones don't include
<fstream> but they all use fopen and/or freopen:
libstdc++-v3/testsuite/27_io/objects/wchar_t/10.cc
libstdc++-v3/testsuite/27_io/objects/wchar_t/12048-1.cc
libstdc++-v3/testsuite/27_io/objects/wchar_t/12048-2.cc
libstdc++-v3/testsuite/27_io/objects/wchar_t/12048-3.cc
libstdc++-v3/testsuite/27_io/objects/wchar_t/12048-4.cc
libstdc++-v3/testsuite/27_io/objects/wchar_t/12048-5.cc
libstdc++-v3/testsuite/ext/stdio_sync_filebuf/wchar_t/1.cc
So the patch seems fine. Thanks for keeping the test results clean.