zsh-workers
 help / color / mirror / code / Atom feed
* pwd -r vs. pwd test failure
@ 2020-03-26 12:22 Vin Shelton
  2020-03-26 22:02 ` Daniel Shahaf
  0 siblings, 1 reply; 7+ messages in thread
From: Vin Shelton @ 2020-03-26 12:22 UTC (permalink / raw)
  To: Zsh Hackers' List

[-- 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

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-03-28  1:20 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-26 12:22 pwd -r vs. pwd test failure Vin Shelton
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

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).