From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=0.3 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE,RDNS_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 Received: (qmail 24309 invoked from network); 26 Mar 2020 22:22:06 -0000 Received-SPF: pass (primenet.com.au: domain of zsh.org designates 203.24.36.2 as permitted sender) receiver=inbox.vuxu.org; client-ip=203.24.36.2 envelope-from= Received: from unknown (HELO primenet.com.au) (203.24.36.2) by inbox.vuxu.org with ESMTP; 26 Mar 2020 22:22:06 -0000 Received: (qmail 21058 invoked by alias); 26 Mar 2020 22:22:00 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: List-Unsubscribe: X-Seq: 45637 Received: (qmail 16508 invoked by uid 1010); 26 Mar 2020 22:21:59 -0000 X-Qmail-Scanner-Diagnostics: from out3-smtp.messagingengine.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.102.2/25758. spamassassin: 3.4.2. Clear:RC:0(66.111.4.27):SA:0(-2.6/5.0):. Processed in 0.83009 secs); 26 Mar 2020 22:21:59 -0000 X-Envelope-From: d.s@daniel.shahaf.name X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: none (ns1.primenet.com.au: domain at daniel.shahaf.name does not designate permitted sender hosts) X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedugedrudehjedgleeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvffukfgjfhfogggtgfesthejtddtredtvdenucfhrhhomhepffgrnhhi vghlucfuhhgrhhgrfhcuoegurdhssegurghnihgvlhdrshhhrghhrghfrdhnrghmvgeqne cukfhppeejledrudejiedruddvhedrvdefvdenucevlhhushhtvghrufhiiigvpedtnecu rfgrrhgrmhepmhgrihhlfhhrohhmpegurdhssegurghnihgvlhdrshhhrghhrghfrdhnrg hmvg X-ME-Proxy: Date: Thu, 26 Mar 2020 22:21:20 +0000 From: Daniel Shahaf To: Peter Stephenson Cc: Zsh hackers list Subject: Re: :P test failure Message-ID: <20200326222120.4832e6ad@tarpaulin.shahaf.local2> In-Reply-To: References: X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Peter Stephenson wrote on Thu, 26 Mar 2020 21:27 +0000: > This doesn't work on my machine: > > # This is a bit brittle as it depends on PATH_MAX. > # We could use sysconf.. > bad_pwd="/${(l:16000:: :):-}" > print ${bad_pwd:P} | wc -c > 0:modifier ':P' with path too long > >16002 > > The modification fails with error and output > > zsh: path expansion failed, using root directory > 2 The behaviour you see is exactly what the test's _expected_ output was before 45583/0004. Is there any chance that you ran HEAD's tests on an old zsh binary by accident? What's the value of errno? (Patch at the end for your convenience) Cheers, Daniel diff --git a/Src/utils.c b/Src/utils.c index 69885fed3..8a7558700 100644 --- a/Src/utils.c +++ b/Src/utils.c @@ -1030,8 +1030,9 @@ xsymlink(char *s, int heap) if (*s != '/') return NULL; *xbuf = '\0'; + errno = 0; if (!chrealpath(&s, 'P', heap)) { - zwarn("path expansion failed, using root directory"); + zwarn("path expansion failed (%e) using root directory", errno); return heap ? dupstring("/") : ztrdup("/"); } return s;