From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from rock.gnat.com (rock.gnat.com [IPv6:2620:20:4000:0:a9e:1ff:fe9b:1d1]) by sourceware.org (Postfix) with ESMTPS id D5AA53858D1E; Thu, 23 Jun 2022 03:59:28 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org D5AA53858D1E Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 5E4E911619B; Wed, 22 Jun 2022 23:59:28 -0400 (EDT) X-Virus-Scanned: Debian amavisd-new at gnat.com Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id OSUERKLN1GyZ; Wed, 22 Jun 2022 23:59:28 -0400 (EDT) Received: from free.home (tron.gnat.com [IPv6:2620:20:4000:0:46a8:42ff:fe0e:e294]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by rock.gnat.com (Postfix) with ESMTPS id E2D9B1160E1; Wed, 22 Jun 2022 23:59:27 -0400 (EDT) Received: from livre (livre.home [172.31.160.2]) by free.home (8.15.2/8.15.2) with ESMTPS id 25N3xEwF752733 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 23 Jun 2022 00:59:15 -0300 From: Alexandre Oliva To: Jonathan Wakely Cc: Sebastian Huber , "libstdc++" , gcc Patches , RTEMS Subject: Re: [PATCH] libstdc++: testsuite: fs rename to self may fail Organization: Free thinker, does not speak for AdaCore References: <4fe20709-e617-7644-175c-bd49b52dc6c2@embedded-brains.de> Errors-To: aoliva@lxoliva.fsfla.org Date: Thu, 23 Jun 2022 00:59:14 -0300 In-Reply-To: (Jonathan Wakely's message of "Wed, 22 Jun 2022 11:41:14 +0100") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Scanned-By: MIMEDefang 2.84 X-Spam-Status: No, score=-6.3 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, SPF_HELO_NONE, SPF_PASS, 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: Thu, 23 Jun 2022 03:59:30 -0000 On Jun 22, 2022, Jonathan Wakely wrote: > On Wed, 22 Jun 2022 at 08:02, Alexandre Oliva via Libstdc++ > wrote: >> >> Hello, Sebastian, >> >> On Jun 22, 2022, Sebastian Huber wrote: >> >> > On 22/06/2022 08:24, Alexandre Oliva via Libstdc++ wrote: >> >> rtems6's rename() implementation errors with EEXIST when the rename-to >> >> filename exists, even when renaming a file to itself or when renaming >> >> a nonexisting file. Adjust expectations. >> >> >> >> Regstrapped on x86_64-linux-gnu, also tested with a cross to >> >> aarch64-rtems6. Ok to install? >> >> >> >> PS:https://devel.rtems.org/ticket/2169 doesn't seem to suggest plans to >> >> change behavior so as to comply with POSIX. >> >> > I would not adjust the test case to cope with systems which are not in >> > line with POSIX. >> >> My understanding is that the libstdc++ testsuite is not meant to test >> for POSIX conformance, but for conformance with the C++ language >> standards. >> >> C++ inherits rename from C, and C says the behavior is implementation >> defined if the new name already exists. > std::filesystem::rename is explicitly specified in terms of POSIX > rename, not C rename. Oh, sorry, I stand corrected. I meant ::rename only. My mind seems to still resist the notion that is standard C++, rather than an experimental extension proposal :-) Anyway, I did not realize it deferred to POSIX semantics, even when that's stricter than C standard. Interesting... > Instead, the implementation of std::filesystem::rename should have a > special-case for rtems (and maybe other targets) that implements the > POSIX rename semantics if calling ::rename isn't good enough. Given what I've just learned, I agree. Patch withdrawn. I suppose the other patch, on subdir renaming, must share the same fate. /me longs for XFAILs for libstdc++ subtests ;-) -- Alexandre Oliva, happy hacker https://FSFLA.org/blogs/lxo/ Free Software Activist GNU Toolchain Engineer Disinformation flourishes because many people care deeply about injustice but very few check the facts. Ask me about