[v3, testsuite] Introduce dg-add-options net_ts
Rainer Orth
ro@CeBiTec.Uni-Bielefeld.DE
Tue Oct 16 12:55:00 GMT 2018
Some of the new Networking TS tests FAIL before Solaris 11.4 like this:
FAIL: experimental/net/internet/address/v4/members.cc (test for excess errors)
Excess errors:
Undefined first referenced
symbol in file
inet_ntop /var/tmp//ccpcIRXj.o
gai_strerror /var/tmp//ccpcIRXj.o
ld: fatal: symbol referencing errors. No output written to ./members.exe
collect2: error: ld returned 1 exit status
This happens because until the socket etc. functions were integrated
into libc in Solaris 11.4, they only lived in libsocket and libnsl.
The following patch fixes this by introducing a new dg-add-options
keyword net_ts (I'm open for suggestions for the name, of course;
networking_ts might be an option, too) and adding the requirement to the
tests involved.
With the patch below, all but one of the tests PASS on
i386-pc-solaris2.10:
FAIL: experimental/net/internet/resolver/ops/lookup.cc execution test
/vol/gcc/src/hg/trunk/local/libstdc++-v3/testsuite/experimental/net/internet/res
olver/ops/lookup.cc:35: void test01(): Assertion '!ec' failed.
The code in question is
auto addrs = resolv.resolve("localhost", "http", ec);
VERIFY( !ec );
but "http" is missing from /etc/services before Solaris 11.4.
Ok for mainline?
Btw., one may want to do similarly for the Filesystem TS tests,
introducing dg-add-options fs_ts (or filesystem_ts) instead of repeating
dg-options "-DUSE_FILESYSTEM_TS -lstdc++fs" over and over again.
Rainer
--
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University
2018-10-16 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
libstdc++-v3:
* testsuite/lib/dg-options.exp (add_options_for_net_ts): New proc.
* testsuite/experimental/net/internet/address/v4/comparisons.cc:
Add dg-add-options net_ts.
* testsuite/experimental/net/internet/address/v4/cons.cc: Likewise.
* testsuite/experimental/net/internet/address/v4/creation.cc: Likewise.
* testsuite/experimental/net/internet/address/v4/members.cc: Likewise.
* testsuite/experimental/net/internet/resolver/base.cc: Likewise.
* testsuite/experimental/net/internet/resolver/ops/lookup.cc: Likewise.
* testsuite/experimental/net/internet/resolver/ops/reverse.cc: Likewise.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: v3-testsuite-add-options-net_ts.patch
Type: text/x-patch
Size: 4351 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20181016/368dac6b/attachment.bin>
More information about the Gcc-patches
mailing list