From: Vin Shelton <acs@alumni.princeton.edu>
To: "Zsh Hackers' List" <zsh-workers@zsh.org>
Subject: pwd -r vs. pwd test failure
Date: Thu, 26 Mar 2020 08:22:23 -0400 [thread overview]
Message-ID: <CACeGjnVRZsvUuWTSWL9Hq-LbnqLVAHqR0Jia2Ax6a4MmfcBVug@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 2243 bytes --]
I got a test failure in B13 today:
Running test: whence symlink resolution
ZTST_test: expecting status: 0
Input: /tmp/zsh.ztst.360386/ztst.in, output: /tmp/zsh.ztst.360386/ztst.out,
error: /tmp/zsh.ztst.360386/ztst.terr
ZTST_execchunk: status 0
ZTST_test: test produced standard output:
/opt/build/zsh-2020-03-26/Test/whence.tmp/step1 ->
/SSD-2/opt/build/zsh-2020-03-26/Test/whence.tmp/step1 -> /SSD-2/opt/
build/zsh-2020-03-26/Test/whence.tmp/step2 ->
/SSD-2/opt/build/zsh-2020-03-26/Test/whence.tmp/step3 -> /SSD-2/opt/build
/zsh-2020-03-26/Test/whence.tmp/real
/opt/build/zsh-2020-03-26/Test/whence.tmp/step1 ->
/SSD-2/opt/build/zsh-2020-03-26/Test/whence.tmp/real
ZTST_test: and standard error:
--- /tmp/zsh.ztst.360386/ztst.out 2020-03-26 08:04:38.543366746 -0400
+++ /tmp/zsh.ztst.360386/ztst.tout 2020-03-26 08:04:38.543366746 -0400
@@ -1,2 +1,2 @@
-/opt/build/zsh-2020-03-26/Test/whence.tmp/step1 ->
/opt/build/zsh-2020-03-26/Test/whence.tmp/step2 ->
/opt/build/zsh-2020-03-26/Test/whence.tmp/step3 ->
/opt/build/zsh-2020-03-26/Test/whence.tmp/real
-/opt/build/zsh-2020-03-26/Test/whence.tmp/step1 ->
/opt/build/zsh-2020-03-26/Test/whence.tmp/real
+/opt/build/zsh-2020-03-26/Test/whence.tmp/step1 ->
/SSD-2/opt/build/zsh-2020-03-26/Test/whence.tmp/step1 ->
/SSD-2/opt/build/zsh-2020-03-26/Test/whence.tmp/step2 ->
/SSD-2/opt/build/zsh-2020-03-26/Test/whence.tmp/step3 ->
/SSD-2/opt/build/zsh-2020-03-26/Test/whence.tmp/real
+/opt/build/zsh-2020-03-26/Test/whence.tmp/step1 ->
/SSD-2/opt/build/zsh-2020-03-26/Test/whence.tmp/real
Test ../../../src/zsh-2020-03-26/Test/B13whence.ztst failed: output differs
from expected as shown above for:
(
path=( $PWD/whence.tmp $path )
whence -S step1
whence -s step1
)
Was testing: whence symlink resolution
../../../src/zsh-2020-03-26/Test/B13whence.ztst: test failed.
Looking at the diff, I realized that my build directory is under a symlink;
/opt -> /SSD-2/opt. The test uses $PWD, which resolves to
/opt/build/zsh-2020-03-26, but pwd -r correct identifies the path as
/SSD-2/opt/build/zsh-2020-03-26; sure enough, if I run the test from
/SSD-2/opt/build/zsh-2020-03-26, the test passes. Is the right thing to fix
the test, or should $PWD track realpath?
- Vin
next reply other threads:[~2020-03-26 12:24 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-26 12:22 Vin Shelton [this message]
2020-03-26 22:02 ` Daniel Shahaf
2020-03-27 11:56 ` Vin Shelton
2020-03-27 23:11 ` Daniel Shahaf
2020-03-28 0:20 ` Vin Shelton
2020-03-28 0:57 ` Daniel Shahaf
2020-03-28 1:17 ` Vin Shelton
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=CACeGjnVRZsvUuWTSWL9Hq-LbnqLVAHqR0Jia2Ax6a4MmfcBVug@mail.gmail.com \
--to=acs@alumni.princeton.edu \
--cc=zsh-workers@zsh.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.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
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 NNTP newsgroup(s).