From patchwork Tue Feb 8 14:01:43 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Wakely X-Patchwork-Id: 50917 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 3341A3858417 for ; Tue, 8 Feb 2022 14:04:47 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3341A3858417 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1644329087; bh=HL4wfwM7E8PNjqLvhOJa3xJu2vU6Eyn12fDWiLamgSc=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=pjnTdB5S1AXFAKhTDxkJJQgRMCF4ANK/+zLvGVzW0ssIuTAsuMudXzatqOeI5xaam v0SEy/35g2USfFkhF3h3dWm0M2/6EKRaK0HnTNZ6yDGeUhjx0DJn2PJfxD0niZD4zU +R0N8giil8XlfJ0H4B4kgZrvVyyxBPjWuz9uEyUk= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 9E56D385841B for ; Tue, 8 Feb 2022 14:01:49 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 9E56D385841B Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-115-UB-eoKMJPnujIe0zARH6GA-1; Tue, 08 Feb 2022 09:01:46 -0500 X-MC-Unique: UB-eoKMJPnujIe0zARH6GA-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 0CBBE8143EB; Tue, 8 Feb 2022 14:01:45 +0000 (UTC) Received: from localhost (unknown [10.33.37.88]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9D2947C0EB; Tue, 8 Feb 2022 14:01:44 +0000 (UTC) To: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org Subject: [committed] libstdc++: Adjust Filesystem TS test for Windows Date: Tue, 8 Feb 2022 14:01:43 +0000 Message-Id: <20220208140143.3061230-1-jwakely@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-13.5 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Jonathan Wakely via Gcc-patches From: Jonathan Wakely Reply-To: Jonathan Wakely Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" Tested x86_64-linux and x86_64-w64-mingw, pushed to trunk. The Filesystem TS isn't really supported for Windows, but the FAIL for this test is just because it doesn't match what happens on Windows. libstdc++-v3/ChangeLog: * testsuite/experimental/filesystem/operations/create_directories.cc: Adjust expected results for Windows. --- .../filesystem/operations/create_directories.cc | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/libstdc++-v3/testsuite/experimental/filesystem/operations/create_directories.cc b/libstdc++-v3/testsuite/experimental/filesystem/operations/create_directories.cc index 8cdc7030441..03060c6cbb3 100644 --- a/libstdc++-v3/testsuite/experimental/filesystem/operations/create_directories.cc +++ b/libstdc++-v3/testsuite/experimental/filesystem/operations/create_directories.cc @@ -108,8 +108,15 @@ test02() VERIFY( !result ); VERIFY( ec == std::errc::not_a_directory ); result = create_directories(file.path/"../bar", ec); +#if defined(__MINGW32__) || defined(__MINGW64__) + VERIFY( result ); + VERIFY( !ec ); + VERIFY( is_directory(dir.path/"bar") ); + remove(dir.path/"bar"); +#else VERIFY( !result ); VERIFY( ec ); +#endif } } @@ -120,11 +127,19 @@ test03() const auto p = __gnu_test::nonexistent_path() / "/"; bool result = create_directories(p); VERIFY( result ); +#if defined(__MINGW32__) || defined(__MINGW64__) + VERIFY( exists(p/".") ); // needed due to PR libstdc++/88881 +#else VERIFY( exists(p) ); +#endif remove(p); result = create_directories(p/"foo/"); VERIFY( result ); +#if defined(__MINGW32__) || defined(__MINGW64__) + VERIFY( exists(p/".") ); // needed due to PR libstdc++/88881 +#else VERIFY( exists(p) ); +#endif VERIFY( exists(p/"foo") ); remove_all(p); }