From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 8582D3835686 for ; Wed, 22 Jun 2022 10:48:11 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 8582D3835686 Received: from mail-ej1-f69.google.com (mail-ej1-f69.google.com [209.85.218.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-612-BpXuAe37Oj-4_yiDVBs_tw-1; Wed, 22 Jun 2022 06:48:09 -0400 X-MC-Unique: BpXuAe37Oj-4_yiDVBs_tw-1 Received: by mail-ej1-f69.google.com with SMTP id sg40-20020a170907a42800b00722faf0aacbso68671ejc.3 for ; Wed, 22 Jun 2022 03:48:09 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=1eI9YdTkj7XDI+lObySHkPhwedx0S8A86EE9kSMx02k=; b=M3S3zYtbHR35phlYiVMr7EAg7qT4TndkrqV2tnbiOILVqjfxX4YHNnLww3AHZyTxxB lKtIoUVVcqKz7XVbCkiGh2reRnUhV61ReFSNoi1NUQM0rP1uCDyUhAX9PzhesURdEY2B By4QF4ByTlpv5GPQkvq9y5KLfYnefe4VK4Cdx4A5v6J/tlfl/suXUchOo2MS7Vv2hDDL QsBqw5qmIGBbsP7zbqxDbZj80cIIZW8TL1LrAfqvfFz3N0j2HQbSgVJ3jAm95uLCpa89 IL17zvcEAhxfuNYgvVYgDjB4Y7cPtQKNdGVDTGlahvQKlY8ggemTiNnVjIbl3RcTUPMH 5rRQ== X-Gm-Message-State: AJIora97G9Ou15pBtCAsQ4D1nbD08/p817bl4zoji+YFDOv1DsfcfYSS BQBj4UoTMtWc21+EQYURaPB3geww6U1tMLCl9oU0pEIG2tOcneejIsaKdd/UlBlAtf9y8szJ0BY qTr24z8hJpDdR234J2T5GCsNnM746VqE= X-Received: by 2002:a05:6402:354c:b0:431:51e2:eef9 with SMTP id f12-20020a056402354c00b0043151e2eef9mr3460052edd.344.1655894888696; Wed, 22 Jun 2022 03:48:08 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sRZZoFzcNavfP5r8v4yvFGaIdYjZDdboBIHC1z/QyvgiuePlnijaJF/d3XXyOmonA7QJycT9KFL/iQf8KwgoU= X-Received: by 2002:a05:6402:354c:b0:431:51e2:eef9 with SMTP id f12-20020a056402354c00b0043151e2eef9mr3460038edd.344.1655894888503; Wed, 22 Jun 2022 03:48:08 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Jonathan Wakely Date: Wed, 22 Jun 2022 11:47:57 +0100 Message-ID: Subject: Re: [PATCH] libstdc++: testsuite: skip fs last_write_time tests if not available To: Alexandre Oliva Cc: gcc Patches , "libstdc++" X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libstdc++@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libstdc++ mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Jun 2022 10:48:12 -0000 On Wed, 22 Jun 2022 at 07:35, Alexandre Oliva via Libstdc++ 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