Re: [PATCH] [libstdc++] [testsuite] avoid arbitrary errno codes

2024-07-15 Thread Alexandre Oliva
On Jul 12, 2024, Jonathan Wakely wrote: > On Fri, 12 Jul 2024 at 10:27, Jonathan Wakely wrote: >> >> On Fri, 12 Jul 2024 at 09:27, Alexandre Oliva wrote: >> > >> > On Jul 11, 2024, Jonathan Wakely wrote: >> > >> > > There's no requirement that system_error uses strerror, that's just an >> > >

Re: [PATCH] [libstdc++] [testsuite] avoid arbitrary errno codes

2024-07-12 Thread Jonathan Wakely
On Fri, 12 Jul 2024 at 10:27, Jonathan Wakely wrote: > > On Fri, 12 Jul 2024 at 09:27, Alexandre Oliva wrote: > > > > On Jul 11, 2024, Jonathan Wakely wrote: > > > > > There's no requirement that system_error uses strerror, that's just an > > > implementation detail. > > > > *nod*. I meant it w

Re: [PATCH] [libstdc++] [testsuite] avoid arbitrary errno codes

2024-07-12 Thread Jonathan Wakely
On Fri, 12 Jul 2024 at 09:27, Alexandre Oliva wrote: > > On Jul 11, 2024, Jonathan Wakely wrote: > > > There's no requirement that system_error uses strerror, that's just an > > implementation detail. > > *nod*. I meant it was more of a libc test in the case that relied on > strerror. But I ful

Re: [PATCH] [libstdc++] [testsuite] avoid arbitrary errno codes

2024-07-12 Thread Alexandre Oliva
On Jul 11, 2024, Jonathan Wakely wrote: > There's no requirement that system_error uses strerror, that's just an > implementation detail. *nod*. I meant it was more of a libc test in the case that relied on strerror. But I fully agree that testing the C++ standard API makes perfect sense. It'

Re: [PATCH] [libstdc++] [testsuite] avoid arbitrary errno codes

2024-07-11 Thread Jonathan Wakely
On Thu, 11 Jul 2024 at 17:23, Alexandre Oliva wrote: > > On Jul 11, 2024, Jonathan Wakely wrote: > > > And std::system_error doesn't limit the values that can be passed to > > it either. So I'd prefer to keep testing with arbitrary int values, > > because that *should* work. > > Fair enough, than

Re: [PATCH] [libstdc++] [testsuite] avoid arbitrary errno codes

2024-07-11 Thread Alexandre Oliva
On Jul 11, 2024, Jonathan Wakely wrote: > And std::system_error doesn't limit the values that can be passed to > it either. So I'd prefer to keep testing with arbitrary int values, > because that *should* work. Fair enough, thanks. I've seen portability documentation suggesting that strerror re

Re: [PATCH] [libstdc++] [testsuite] avoid arbitrary errno codes

2024-07-11 Thread Jonathan Wakely
On Thu, 11 Jul 2024 at 14:23, Alexandre Oliva wrote: > > > Passing an arbitrary error number to strerror* functions doesn't seem > to be portable; 19_diagnostics/system_error/cons-1.cc is hitting > runtime errors in the block that attempts to instantiate a > std:;system_error for error number 95.

[PATCH] [libstdc++] [testsuite] avoid arbitrary errno codes

2024-07-11 Thread Alexandre Oliva
Passing an arbitrary error number to strerror* functions doesn't seem to be portable; 19_diagnostics/system_error/cons-1.cc is hitting runtime errors in the block that attempts to instantiate a std:;system_error for error number 95. The range of errno macros defined on this target doesn't reach