public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "redi at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug libstdc++/108530] [13 regression] std/time/tzdb/1.cc fails after r13-5168-g559993b85744ae
Date: Tue, 24 Jan 2023 23:21:47 +0000	[thread overview]
Message-ID: <bug-108530-4-M0Rjf7CaQj@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-108530-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108530

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2023-01-24
           Keywords|                            |testsuite-fail

--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to seurer from comment #2)
> Yes it is a regular file.
> 
> With the previous commit it wasn't UNSUPPORTED and worked just fine:

Ah, because rather than being UNSUPPORTED, the test was skipping some checks
via #if


// { dg-additional-options "-DHAVE_TZDB" { target tzdb } }

void
test_current()
{
#ifdef HAVE_TZDB
  const tzdb& db = get_tzdb();
  const time_zone* tz = db.current_zone();
  VERIFY( tz == std::chrono::current_zone() );
#endif
}

Previously this machine did not match the effective target tzdb, and so
std::chrono::current_zone() was not tested. Now it matches the et, and so that
function is tested.

And because it's a regular file, that function doesn't work, so we get a FAIL
now. I should really have split that test into two files, one that tests the
always-available functionality and one which depends on effective target tzdb.
That would have gone from UNSUPPORTED to FAIL for the latter test, instead of
the confusing PASS -> FAIL case we have now for something that never actually
worked.

PR 108409 tracks some other causes of that function not working, but this one
is different. And that reminds me I've seen this before: gcc303 in the compile
farm is a FreeBSD 13.0 system, and /etc/localtime is a regular file there too:

$ ssh gcc303 file /etc/localtime
/etc/localtime: timezone data, version 2, 1 gmt time flag, 1 std time flag, no
leap seconds, no transition times, 1 abbreviation char

  parent reply	other threads:[~2023-01-24 23:21 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-24 19:46 [Bug libstdc++/108530] New: " seurer at gcc dot gnu.org
2023-01-24 20:16 ` [Bug libstdc++/108530] " redi at gcc dot gnu.org
2023-01-24 21:20 ` seurer at gcc dot gnu.org
2023-01-24 23:21 ` redi at gcc dot gnu.org [this message]
2023-01-24 23:42 ` redi at gcc dot gnu.org
2023-01-24 23:51 ` cvs-commit at gcc dot gnu.org
2023-01-24 23:53 ` redi at gcc dot gnu.org
2023-01-25  7:37 ` rguenth at gcc dot gnu.org
2023-01-26 13:38 ` cvs-commit at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-108530-4-M0Rjf7CaQj@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).