[PATCH] libstdc++: testsuite: skip fs last_write_time tests if not available
Jonathan Wakely
jwakely@redhat.com
Wed Jun 22 10:47:57 GMT 2022
On Wed, 22 Jun 2022 at 07:35, Alexandre Oliva via Libstdc++
<libstdc++@gcc.gnu.org> wrote:
>
>
> The last_write_time functions are defined in ways that are useful, or
> that fail immediately, depending on various macros. When they fail
> immediately, the filesystem last_write_time.cc tests fail noisily, but
> the fail is entirely expected.
>
> Define HAVE_LWT in the last_write_time.cc tests, according to the
> macros that select implementations of last_write_time, and use it to
> skip tests that are expected to fail.
>
> Regstrapped on x86_64-linux-gnu, also tested with a cross to
> aarch64-rtems6. Ok to install?
OK
> PS: I realize _GLIBCXX_HAVE_SYS_STAT_H is tested for in two different
> ways in the #if expressions added to the tests. This mirrors the
> different uses in the do_stat template body, and in
> fs::last_write_time(const path&, file_time_type, error_code&). Perhaps
> they should all be using either value or definedness, but I didn't want
> to go there, at least not at first, so I retained the apparent
> inconsistency.
Yes, they should be tested consistently in the libstdc++ sources.
And again, this could be a macro defined in testsuite_fs.h
More information about the Libstdc++
mailing list