zsh-workers
 help / color / mirror / code / Atom feed
* Five New Test Failures
@ 2020-07-05 15:28 Vin Shelton
  2020-07-05 16:28 ` Bart Schaefer
  2020-07-05 16:54 ` Message size limit? (was: Five New Test Failures) Daniel Shahaf
  0 siblings, 2 replies; 21+ messages in thread
From: Vin Shelton @ 2020-07-05 15:28 UTC (permalink / raw)
  To: Zsh Hackers' List

[-- Attachment #1: Type: text/plain, Size: 1714 bytes --]

Dear zsh Hackers,

Today's build resulted in five new test failures:

For example:

Test ../../../src/zsh-2020-07-05/Test/Y03arguments.ztst failed: output
differs from expected as shown above for:
 tst_arguments ':desc1:(arg1)'
 comptest $'tst \t\C-wa\t\C-war\t\C-warg\t\C-warg1\t\C-wr\t\C-wx\t \ty \t'
Error output:
(eval):1: command not found: tst_arguments
Was testing: one non-option argument
../../../src/zsh-2020-07-05/Test/Y03arguments.ztst: test failed.

grep failed: /opt/build/zsh-2020-07-05/check.out

Test ../../../src/zsh-2020-07-05/Test/E01options.ztst failed: output
differs from expected as shown above for:
Test ../../../src/zsh-2020-07-05/Test/X02zlevi.ztst failed: non-zero status
from preparation code:
Test ../../../src/zsh-2020-07-05/Test/X03zlebindkey.ztst failed: non-zero
status from preparation code:
Test ../../../src/zsh-2020-07-05/Test/Y01completion.ztst failed: non-zero
status from preparation code:
Test ../../../src/zsh-2020-07-05/Test/Y01completion.ztst failed: output
differs from expected as shown above for:
Test ../../../src/zsh-2020-07-05/Test/Y02compmatch.ztst failed: non-zero
status from preparation code:
Test ../../../src/zsh-2020-07-05/Test/Y02compmatch.ztst failed: output
differs from expected as shown above for:
Test ../../../src/zsh-2020-07-05/Test/Y03arguments.ztst failed: non-zero
status from preparation code:
Test ../../../src/zsh-2020-07-05/Test/Y03arguments.ztst failed: output
differs from expected as shown above for:

If more details are required, please let me know. *

Regards,
  Vin Shelton

* Previously, I got a bounce message when I attempted to attach config.log
because the message was too long. 80,000 bytes seems too small for the
current day.

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

* Re: Five New Test Failures
  2020-07-05 15:28 Five New Test Failures Vin Shelton
@ 2020-07-05 16:28 ` Bart Schaefer
  2020-07-05 16:57   ` Bart Schaefer
  2020-07-05 16:54 ` Message size limit? (was: Five New Test Failures) Daniel Shahaf
  1 sibling, 1 reply; 21+ messages in thread
From: Bart Schaefer @ 2020-07-05 16:28 UTC (permalink / raw)
  To: Vin Shelton; +Cc: Zsh Hackers' List

On Sun, Jul 5, 2020 at 8:29 AM Vin Shelton <acs@alumni.princeton.edu> wrote:
>
> Today's build resulted in five new test failures:

It's the change to supposedly subvert symlink attacks.  The "always {
rm $tmp }" seems to have created a race condition, the file is
sometimes removed before the zpty job has finished with it.

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

* Message size limit? (was: Five New Test Failures)
  2020-07-05 15:28 Five New Test Failures Vin Shelton
  2020-07-05 16:28 ` Bart Schaefer
@ 2020-07-05 16:54 ` Daniel Shahaf
  2020-07-05 17:13   ` Vin Shelton
  1 sibling, 1 reply; 21+ messages in thread
From: Daniel Shahaf @ 2020-07-05 16:54 UTC (permalink / raw)
  To: Vin Shelton; +Cc: Zsh Hackers' List

Vin Shelton wrote on Sun, 05 Jul 2020 11:28 -0400:
> * Previously, I got a bounce message when I attempted to attach config.log
> because the message was too long. 80,000 bytes seems too small for the
> current day.

What was the error message?

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

* Re: Five New Test Failures
  2020-07-05 16:28 ` Bart Schaefer
@ 2020-07-05 16:57   ` Bart Schaefer
  2020-07-05 17:22     ` Bart Schaefer
  0 siblings, 1 reply; 21+ messages in thread
From: Bart Schaefer @ 2020-07-05 16:57 UTC (permalink / raw)
  To: Vin Shelton; +Cc: Zsh Hackers' List

On Sun, Jul 5, 2020 at 9:28 AM Bart Schaefer <schaefer@brasslantern.com> wrote:
>
> It's the change to supposedly subvert symlink attacks.

Hmm, no, I'm getting random failures even after I revert.  Sorry for
the red herring.

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

* Re: Message size limit? (was: Five New Test Failures)
  2020-07-05 16:54 ` Message size limit? (was: Five New Test Failures) Daniel Shahaf
@ 2020-07-05 17:13   ` Vin Shelton
  2020-07-07 16:06     ` Daniel Shahaf
  0 siblings, 1 reply; 21+ messages in thread
From: Vin Shelton @ 2020-07-05 17:13 UTC (permalink / raw)
  To: Daniel Shahaf; +Cc: Zsh Hackers' List

[-- Attachment #1: Type: text/plain, Size: 448 bytes --]

<zsh-workers@zsh.org>:
ezmlm-reject: fatal: Sorry, I don't accept messages larger than 80000 bytes
(#5.2.3)

On Sun, Jul 5, 2020 at 12:54 PM Daniel Shahaf <d.s@daniel.shahaf.name>
wrote:

> Vin Shelton wrote on Sun, 05 Jul 2020 11:28 -0400:
> > * Previously, I got a bounce message when I attempted to attach
> config.log
> > because the message was too long. 80,000 bytes seems too small for the
> > current day.
>
> What was the error message?
>

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

* Re: Five New Test Failures
  2020-07-05 16:57   ` Bart Schaefer
@ 2020-07-05 17:22     ` Bart Schaefer
  2020-07-07 14:14       ` Vin Shelton
  0 siblings, 1 reply; 21+ messages in thread
From: Bart Schaefer @ 2020-07-05 17:22 UTC (permalink / raw)
  To: Vin Shelton; +Cc: Zsh Hackers' List

On Sun, Jul 5, 2020 at 9:57 AM Bart Schaefer <schaefer@brasslantern.com> wrote:
>
> On Sun, Jul 5, 2020 at 9:28 AM Bart Schaefer <schaefer@brasslantern.com> wrote:
> >
> > It's the change to supposedly subvert symlink attacks.
>
> Hmm, no, I'm getting random failures even after I revert.  Sorry for
> the red herring.

Ahem.  Those failures were something else in my environment.

It does have to do with the "always" block.  All the tests pass if I
just put a "return 0" after the "always".

A bit of further digging indicates that
  zpty_flush After comptesteval
does not always succeed, but it doesn't need to.  The "always" is now
preserving that failure status.

So perhaps this?

diff --git a/Test/comptest b/Test/comptest
index b14d4c9..a36e301 100644
--- a/Test/comptest
+++ b/Test/comptest
@@ -128,6 +128,7 @@ comptesteval () {
        return 1
      }
      zpty_flush After comptesteval
+     : Suppress error from zpty_flush
    } always {
      rm $tmp
    }

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

* Re: Five New Test Failures
  2020-07-05 17:22     ` Bart Schaefer
@ 2020-07-07 14:14       ` Vin Shelton
  2020-07-07 16:03         ` Daniel Shahaf
  2020-07-08  0:25         ` Jun T
  0 siblings, 2 replies; 21+ messages in thread
From: Vin Shelton @ 2020-07-07 14:14 UTC (permalink / raw)
  To: Bart Schaefer; +Cc: Zsh Hackers' List

[-- Attachment #1: Type: text/plain, Size: 1652 bytes --]

Thanks, Bart.  That fixes four of the five failures.  All except this one:

../../../src/zsh-2020-07-07/Test/E01options.ztst: starting.
This test hangs the shell when it fails...
Pattern match failed, line 1:
-<zsh: sure you want to delete all 15 files in
/opt/build/zsh-2020-07-07/Test/options.tmp \[yn\]\?
 <zsh: sure you want to delete all <-> files in / \[yn\]\?
+>nuc2% zsh: sure you want to delete all 15 files in
/opt/build/zsh-2020-07-07/Test/options.tmp [yn]?
 >nuc2% zsh: sure you want to delete all 28 files in / [yn]?

On Sun, Jul 5, 2020 at 1:23 PM Bart Schaefer <schaefer@brasslantern.com>
wrote:

> On Sun, Jul 5, 2020 at 9:57 AM Bart Schaefer <schaefer@brasslantern.com>
> wrote:
> >
> > On Sun, Jul 5, 2020 at 9:28 AM Bart Schaefer <schaefer@brasslantern.com>
> wrote:
> > >
> > > It's the change to supposedly subvert symlink attacks.
> >
> > Hmm, no, I'm getting random failures even after I revert.  Sorry for
> > the red herring.
>
> Ahem.  Those failures were something else in my environment.
>
> It does have to do with the "always" block.  All the tests pass if I
> just put a "return 0" after the "always".
>
> A bit of further digging indicates that
>   zpty_flush After comptesteval
> does not always succeed, but it doesn't need to.  The "always" is now
> preserving that failure status.
>
> So perhaps this?
>
> diff --git a/Test/comptest b/Test/comptest
> index b14d4c9..a36e301 100644
> --- a/Test/comptest
> +++ b/Test/comptest
> @@ -128,6 +128,7 @@ comptesteval () {
>         return 1
>       }
>       zpty_flush After comptesteval
> +     : Suppress error from zpty_flush
>     } always {
>       rm $tmp
>     }
>

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

* Re: Five New Test Failures
  2020-07-07 14:14       ` Vin Shelton
@ 2020-07-07 16:03         ` Daniel Shahaf
  2020-07-07 16:39           ` Bart Schaefer
  2020-07-08  0:25         ` Jun T
  1 sibling, 1 reply; 21+ messages in thread
From: Daniel Shahaf @ 2020-07-07 16:03 UTC (permalink / raw)
  To: Vin Shelton; +Cc: Bart Schaefer, Zsh Hackers' List

Vin Shelton wrote on Tue, 07 Jul 2020 10:14 -0400:
> Thanks, Bart.  That fixes four of the five failures.  All except this one:
> 
> ../../../src/zsh-2020-07-07/Test/E01options.ztst: starting.
> This test hangs the shell when it fails...
> Pattern match failed, line 1:
> -<zsh: sure you want to delete all 15 files in
> /opt/build/zsh-2020-07-07/Test/options.tmp \[yn\]\?
>  <zsh: sure you want to delete all <-> files in / \[yn\]\?
> +>nuc2% zsh: sure you want to delete all 15 files in
> /opt/build/zsh-2020-07-07/Test/options.tmp [yn]?
>  >nuc2% zsh: sure you want to delete all 28 files in / [yn]?

Well, it's my patch, but I can't reproduce the failure.  I'm guessing
it's the prompt at the start that causes it, but I'm not sure why it'd
be printed in Vin's setup but not in mine.

In the meantime, a theoretical fix for the case of /* expanding to more than 100 names:

diff --git a/Test/E01options.ztst b/Test/E01options.ztst
index c59509f2e..7b8e3940e 100644
--- a/Test/E01options.ztst
+++ b/Test/E01options.ztst
@@ -1449,4 +1449,4 @@ F:If this test fails at the first unsetopt, refer to P01privileged.ztst.
   BEL=$'\a'
 0q:RM_STAR_SILENT
 *>zsh: sure you want to delete all 15 files in ${PWD:h}/options.tmp \[yn\]\? ${BEL}
-*>zsh: sure you want to delete all <-> files in / \[yn\]\? ${BEL}
+*>zsh: sure you want to delete (more than <->|all <->) files in / \[yn\]\? ${BEL}

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

* Re: Message size limit? (was: Five New Test Failures)
  2020-07-05 17:13   ` Vin Shelton
@ 2020-07-07 16:06     ` Daniel Shahaf
  0 siblings, 0 replies; 21+ messages in thread
From: Daniel Shahaf @ 2020-07-07 16:06 UTC (permalink / raw)
  To: Vin Shelton; +Cc: Zsh Hackers' List

Vin Shelton wrote on Sun, 05 Jul 2020 13:13 -0400:
> On Sun, Jul 5, 2020 at 12:54 PM Daniel Shahaf <d.s@daniel.shahaf.name>
> wrote:
> 
> > Vin Shelton wrote on Sun, 05 Jul 2020 11:28 -0400:  
> > > * Previously, I got a bounce message when I attempted to attach  
> > config.log  
> > > because the message was too long. 80,000 bytes seems too small for the
> > > current day.  
> >
> > What was the error message?
> >  
> 
> <zsh-workers@zsh.org>:
> ezmlm-reject: fatal: Sorry, I don't accept messages larger than 80000 bytes
> (#5.2.3)

Thanks.  I wondered about that, as the SMTP SIZE limit was around 48MiB.

I see in the archives larger messages were allowed in the past, the
latest being in 2018.  I don't know why it was changed.  Was the change
deliberate?

Cheers,

Daniel

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

* Re: Five New Test Failures
  2020-07-07 16:03         ` Daniel Shahaf
@ 2020-07-07 16:39           ` Bart Schaefer
  2020-07-07 19:33             ` Vin Shelton
  0 siblings, 1 reply; 21+ messages in thread
From: Bart Schaefer @ 2020-07-07 16:39 UTC (permalink / raw)
  To: Daniel Shahaf; +Cc: Vin Shelton, Zsh Hackers' List

On Tue, Jul 7, 2020 at 9:03 AM Daniel Shahaf <d.s@daniel.shahaf.name> wrote:
>
> Vin Shelton wrote on Tue, 07 Jul 2020 10:14 -0400:
> > Thanks, Bart.  That fixes four of the five failures.  All except this one:
> >
> > ../../../src/zsh-2020-07-07/Test/E01options.ztst: starting.
> > This test hangs the shell when it fails...
> > Pattern match failed, line 1:
>
> Well, it's my patch, but I can't reproduce the failure.  I'm guessing
> it's the prompt at the start that causes it, but I'm not sure why it'd
> be printed in Vin's setup but not in mine.

Prompt setting in an /etc/z* file?

I can't reproduce that one either.

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

* Re: Five New Test Failures
  2020-07-07 16:39           ` Bart Schaefer
@ 2020-07-07 19:33             ` Vin Shelton
  0 siblings, 0 replies; 21+ messages in thread
From: Vin Shelton @ 2020-07-07 19:33 UTC (permalink / raw)
  To: Bart Schaefer; +Cc: Daniel Shahaf, Zsh Hackers' List

[-- Attachment #1: Type: text/plain, Size: 1057 bytes --]

No soap on the global prompt:

% \ls -ld /etc/z*
drwxr-xr-x 2 root root 4096 Mar 31 15:10 /etc/zsh-dist/

I moved global rc files aside when I installed.

The diffs indicate a misinterpretation of the quoting of "[". "]" and "?".
Is there some kind of locale-specific interpretation of backslash-quoting?

  - Vin

On Tue, Jul 7, 2020 at 12:39 PM Bart Schaefer <schaefer@brasslantern.com>
wrote:

> On Tue, Jul 7, 2020 at 9:03 AM Daniel Shahaf <d.s@daniel.shahaf.name>
> wrote:
> >
> > Vin Shelton wrote on Tue, 07 Jul 2020 10:14 -0400:
> > > Thanks, Bart.  That fixes four of the five failures.  All except this
> one:
> > >
> > > ../../../src/zsh-2020-07-07/Test/E01options.ztst: starting.
> > > This test hangs the shell when it fails...
> > > Pattern match failed, line 1:
> >
> > Well, it's my patch, but I can't reproduce the failure.  I'm guessing
> > it's the prompt at the start that causes it, but I'm not sure why it'd
> > be printed in Vin's setup but not in mine.
>
> Prompt setting in an /etc/z* file?
>
> I can't reproduce that one either.
>

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

* Re: Five New Test Failures
  2020-07-07 14:14       ` Vin Shelton
  2020-07-07 16:03         ` Daniel Shahaf
@ 2020-07-08  0:25         ` Jun T
  2020-07-08  1:03           ` Vin Shelton
  2020-07-08 10:49           ` Jun T
  1 sibling, 2 replies; 21+ messages in thread
From: Jun T @ 2020-07-08  0:25 UTC (permalink / raw)
  To: zsh-workers


> 2020/07/07 23:14, Vin Shelton <acs@alumni.princeton.edu> wrote:
> 
> -<zsh: sure you want to delete all 15 files in
> /opt/build/zsh-2020-07-07/Test/options.tmp \[yn\]\?
> <zsh: sure you want to delete all <-> files in / \[yn\]\?
> +>nuc2% zsh: sure you want to delete all 15 files in
> /opt/build/zsh-2020-07-07/Test/options.tmp [yn]?

It seems the prompt 'nuc2% ' is not consumed by the line
      zpty -rt subshell REPLY # "${PS1} rm *"
in the test. Which operating system are you using?

On Fedora32 and Ubuntu20.04 and I got a different diff:
Pattern match failed, line 1:
-<zsh: sure you want to delete all 15 files in /home/takimoto/src/zsh/Test/options.tmp \[yn\]\? 
 <zsh: sure you want to delete all <-> files in / \[yn\]\? 
+>zsh: sure you want to delete all 15 files in /home/takimoto/src/zsh/Test/options.tmp [yn]? n
 >zsh: sure you want to delete all 20 files in / [yn]? n

There is no prompt problem here, but the 'n' sent by the test is
echoed back and causes the failure.

On macOS, the diff is:
Pattern match failed, line mismatch (2/1):
 <zsh: sure you want to delete all 15 files in /Users/takimoto/dev/src/zsh/zsh/Test/options.tmp \[yn\]\? 
 <zsh: sure you want to delete all <-> files in / \[yn\]\? 
 >

In this case virtually no response from the zpty.


The following patch seems to work on the above three systems,
but there is a possibility that it fails with very low probability.
I haven't tested on other OSs.


diff --git a/Test/E01options.ztst b/Test/E01options.ztst
index c59509f2e..d8b3d7d21 100644
--- a/Test/E01options.ztst
+++ b/Test/E01options.ztst
@@ -1435,9 +1435,9 @@ F:If this test fails at the first unsetopt, refer to P01privileged.ztst.
       zpty subshell $ZTST_testdir/../Src/zsh -f
       [[ $PWD == */options.tmp ]] || return 1 # Sanity check before calling rm(1).
       zpty -w subshell "rm $target_pattern"
-      zpty -w subshell 'n'
+      zpty -w -n subshell 'n'
+      zpty -r -m subshell REPLY $'*rm *\n'
       sleep 1
-      zpty -rt subshell REPLY # "${PS1} rm *"
       zpty -rt subshell REPLY && print -r -- ${REPLY%%$'\r\n'}
       zpty -d subshell
       after=`ls -a -- $target_dir`
@@ -1448,5 +1448,5 @@ F:If this test fails at the first unsetopt, refer to P01privileged.ztst.
   fi
   BEL=$'\a'
 0q:RM_STAR_SILENT
-*>zsh: sure you want to delete all 15 files in ${PWD:h}/options.tmp \[yn\]\? ${BEL}
-*>zsh: sure you want to delete all <-> files in / \[yn\]\? ${BEL}
+*>zsh: sure you want to delete all 15 files in ${PWD:h}/options.tmp \[yn\]\? ${BEL}(|n)
+*>zsh: sure you want to delete all <-> files in / \[yn\]\? ${BEL}(|n)




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

* Re: Five New Test Failures
  2020-07-08  0:25         ` Jun T
@ 2020-07-08  1:03           ` Vin Shelton
  2020-07-08 10:49           ` Jun T
  1 sibling, 0 replies; 21+ messages in thread
From: Vin Shelton @ 2020-07-08  1:03 UTC (permalink / raw)
  To: Jun T; +Cc: Zsh Hackers' List

[-- Attachment #1: Type: text/plain, Size: 2986 bytes --]

Jun -

Thanks for asking.  "nuc2" is the hostname of a Manjaro (arch-based)
system.  I assumed that got consumed by the leading * in the response.

I'll try out your patch.

  - Vin

On Tue, Jul 7, 2020 at 8:25 PM Jun T <takimoto-j@kba.biglobe.ne.jp> wrote:

>
> > 2020/07/07 23:14, Vin Shelton <acs@alumni.princeton.edu> wrote:
> >
> > -<zsh: sure you want to delete all 15 files in
> > /opt/build/zsh-2020-07-07/Test/options.tmp \[yn\]\?
> > <zsh: sure you want to delete all <-> files in / \[yn\]\?
> > +>nuc2% zsh: sure you want to delete all 15 files in
> > /opt/build/zsh-2020-07-07/Test/options.tmp [yn]?
>
> It seems the prompt 'nuc2% ' is not consumed by the line
>       zpty -rt subshell REPLY # "${PS1} rm *"
> in the test. Which operating system are you using?
>
> On Fedora32 and Ubuntu20.04 and I got a different diff:
> Pattern match failed, line 1:
> -<zsh: sure you want to delete all 15 files in
> /home/takimoto/src/zsh/Test/options.tmp \[yn\]\?
>  <zsh: sure you want to delete all <-> files in / \[yn\]\?
> +>zsh: sure you want to delete all 15 files in
> /home/takimoto/src/zsh/Test/options.tmp [yn]? n
>  >zsh: sure you want to delete all 20 files in / [yn]? n
>
> There is no prompt problem here, but the 'n' sent by the test is
> echoed back and causes the failure.
>
> On macOS, the diff is:
> Pattern match failed, line mismatch (2/1):
>  <zsh: sure you want to delete all 15 files in
> /Users/takimoto/dev/src/zsh/zsh/Test/options.tmp \[yn\]\?
>  <zsh: sure you want to delete all <-> files in / \[yn\]\?
>  >
>
> In this case virtually no response from the zpty.
>
>
> The following patch seems to work on the above three systems,
> but there is a possibility that it fails with very low probability.
> I haven't tested on other OSs.
>
>
> diff --git a/Test/E01options.ztst b/Test/E01options.ztst
> index c59509f2e..d8b3d7d21 100644
> --- a/Test/E01options.ztst
> +++ b/Test/E01options.ztst
> @@ -1435,9 +1435,9 @@ F:If this test fails at the first unsetopt, refer to
> P01privileged.ztst.
>        zpty subshell $ZTST_testdir/../Src/zsh -f
>        [[ $PWD == */options.tmp ]] || return 1 # Sanity check before
> calling rm(1).
>        zpty -w subshell "rm $target_pattern"
> -      zpty -w subshell 'n'
> +      zpty -w -n subshell 'n'
> +      zpty -r -m subshell REPLY $'*rm *\n'
>        sleep 1
> -      zpty -rt subshell REPLY # "${PS1} rm *"
>        zpty -rt subshell REPLY && print -r -- ${REPLY%%$'\r\n'}
>        zpty -d subshell
>        after=`ls -a -- $target_dir`
> @@ -1448,5 +1448,5 @@ F:If this test fails at the first unsetopt, refer to
> P01privileged.ztst.
>    fi
>    BEL=$'\a'
>  0q:RM_STAR_SILENT
> -*>zsh: sure you want to delete all 15 files in ${PWD:h}/options.tmp
> \[yn\]\? ${BEL}
> -*>zsh: sure you want to delete all <-> files in / \[yn\]\? ${BEL}
> +*>zsh: sure you want to delete all 15 files in ${PWD:h}/options.tmp
> \[yn\]\? ${BEL}(|n)
> +*>zsh: sure you want to delete all <-> files in / \[yn\]\? ${BEL}(|n)
>
>
>
>

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

* Re: Five New Test Failures
  2020-07-08  0:25         ` Jun T
  2020-07-08  1:03           ` Vin Shelton
@ 2020-07-08 10:49           ` Jun T
  2020-07-08 18:23             ` Vin Shelton
  2020-07-09 10:17             ` Jun T
  1 sibling, 2 replies; 21+ messages in thread
From: Jun T @ 2020-07-08 10:49 UTC (permalink / raw)
  To: zsh-workers


Sorry, please forget the previous patch.
I noticed that we should better to start the subshell without zle,
i.e., with option +Z. Then the command 'rm *' is not echoed back.
 
> 2020/07/08 9:25, I wrote:
> 
> There is no prompt problem here, but the 'n' sent by the test is
> echoed back and causes the failure.

But I still get this 'n' on Fedora32 (maybe also on Ubuntu20.04).
I don't know why. It doesn't happen on CentOS8.
It seems we need '(|n)' at the end of the pattern.

In the patch below, I explicitly set PS1 and wait for the prompt.

Do we need to set MODULE_PATH in the subshell?
I guess we don't since no module is used in this test?

diff --git a/Test/E01options.ztst b/Test/E01options.ztst
index c59509f2e..5a1c8ebcf 100644
--- a/Test/E01options.ztst
+++ b/Test/E01options.ztst
@@ -1432,12 +1432,13 @@ F:If this test fails at the first unsetopt, refer to P01privileged.ztst.
       '/' '/*'
     do
       before=`ls -a -- $target_dir`
-      zpty subshell $ZTST_testdir/../Src/zsh -f
+      zpty subshell $ZTST_testdir/../Src/zsh -f +Z
       [[ $PWD == */options.tmp ]] || return 1 # Sanity check before calling rm(1).
+      zpty -w subshell 'PS1=PROMPT'
+      zpty -r -m subshell REPLY $'*PROMPT'
       zpty -w subshell "rm $target_pattern"
-      zpty -w subshell 'n'
+      zpty -w -n subshell 'n'
       sleep 1
-      zpty -rt subshell REPLY # "${PS1} rm *"
       zpty -rt subshell REPLY && print -r -- ${REPLY%%$'\r\n'}
       zpty -d subshell
       after=`ls -a -- $target_dir`
@@ -1448,5 +1449,5 @@ F:If this test fails at the first unsetopt, refer to P01privileged.ztst.
   fi
   BEL=$'\a'
 0q:RM_STAR_SILENT
-*>zsh: sure you want to delete all 15 files in ${PWD:h}/options.tmp \[yn\]\? ${BEL}
-*>zsh: sure you want to delete all <-> files in / \[yn\]\? ${BEL}
+*>zsh: sure you want to delete all 15 files in ${PWD:h}/options.tmp \[yn\]\? ${BEL}(|n)
+*>zsh: sure you want to delete all <-> files in / \[yn\]\? ${BEL}(|n)




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

* Re: Five New Test Failures
  2020-07-08 10:49           ` Jun T
@ 2020-07-08 18:23             ` Vin Shelton
  2020-07-08 20:30               ` Bart Schaefer
  2020-07-09  8:04               ` Jun T
  2020-07-09 10:17             ` Jun T
  1 sibling, 2 replies; 21+ messages in thread
From: Vin Shelton @ 2020-07-08 18:23 UTC (permalink / raw)
  To: Jun T; +Cc: Zsh Hackers' List

[-- Attachment #1: Type: text/plain, Size: 2252 bytes --]

Yes, that worked.

BTW, I have no idea how my PS1 gets set to %m (I checked), but this
compares OK.

Thanks,
  Vin

On Wed, Jul 8, 2020 at 6:50 AM Jun T <takimoto-j@kba.biglobe.ne.jp> wrote:

>
> Sorry, please forget the previous patch.
> I noticed that we should better to start the subshell without zle,
> i.e., with option +Z. Then the command 'rm *' is not echoed back.
>
> > 2020/07/08 9:25, I wrote:
> >
> > There is no prompt problem here, but the 'n' sent by the test is
> > echoed back and causes the failure.
>
> But I still get this 'n' on Fedora32 (maybe also on Ubuntu20.04).
> I don't know why. It doesn't happen on CentOS8.
> It seems we need '(|n)' at the end of the pattern.
>
> In the patch below, I explicitly set PS1 and wait for the prompt.
>
> Do we need to set MODULE_PATH in the subshell?
> I guess we don't since no module is used in this test?
>
> diff --git a/Test/E01options.ztst b/Test/E01options.ztst
> index c59509f2e..5a1c8ebcf 100644
> --- a/Test/E01options.ztst
> +++ b/Test/E01options.ztst
> @@ -1432,12 +1432,13 @@ F:If this test fails at the first unsetopt, refer
> to P01privileged.ztst.
>        '/' '/*'
>      do
>        before=`ls -a -- $target_dir`
> -      zpty subshell $ZTST_testdir/../Src/zsh -f
> +      zpty subshell $ZTST_testdir/../Src/zsh -f +Z
>        [[ $PWD == */options.tmp ]] || return 1 # Sanity check before
> calling rm(1).
> +      zpty -w subshell 'PS1=PROMPT'
> +      zpty -r -m subshell REPLY $'*PROMPT'
>        zpty -w subshell "rm $target_pattern"
> -      zpty -w subshell 'n'
> +      zpty -w -n subshell 'n'
>        sleep 1
> -      zpty -rt subshell REPLY # "${PS1} rm *"
>        zpty -rt subshell REPLY && print -r -- ${REPLY%%$'\r\n'}
>        zpty -d subshell
>        after=`ls -a -- $target_dir`
> @@ -1448,5 +1449,5 @@ F:If this test fails at the first unsetopt, refer to
> P01privileged.ztst.
>    fi
>    BEL=$'\a'
>  0q:RM_STAR_SILENT
> -*>zsh: sure you want to delete all 15 files in ${PWD:h}/options.tmp
> \[yn\]\? ${BEL}
> -*>zsh: sure you want to delete all <-> files in / \[yn\]\? ${BEL}
> +*>zsh: sure you want to delete all 15 files in ${PWD:h}/options.tmp
> \[yn\]\? ${BEL}(|n)
> +*>zsh: sure you want to delete all <-> files in / \[yn\]\? ${BEL}(|n)
>
>
>
>

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

* Re: Five New Test Failures
  2020-07-08 18:23             ` Vin Shelton
@ 2020-07-08 20:30               ` Bart Schaefer
  2020-07-08 20:55                 ` Vin Shelton
  2020-07-09  8:04               ` Jun T
  1 sibling, 1 reply; 21+ messages in thread
From: Bart Schaefer @ 2020-07-08 20:30 UTC (permalink / raw)
  To: Vin Shelton; +Cc: Jun T, Zsh Hackers' List

On Wed, Jul 8, 2020 at 11:24 AM Vin Shelton <acs@alumni.princeton.edu> wrote:
>
> BTW, I have no idea how my PS1 gets set to %m (I checked)

Exported into the environment somewhere upstream?

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

* Re: Five New Test Failures
  2020-07-08 20:30               ` Bart Schaefer
@ 2020-07-08 20:55                 ` Vin Shelton
  0 siblings, 0 replies; 21+ messages in thread
From: Vin Shelton @ 2020-07-08 20:55 UTC (permalink / raw)
  To: Bart Schaefer; +Cc: Jun T, Zsh Hackers' List

[-- Attachment #1: Type: text/plain, Size: 402 bytes --]

I ran:

: ~ Wed 8 14:40; env - /usr/bin/zsh -f
nuc2%

so I tried to avoid that.  I also looked at /etc/environment.

On Wed, Jul 8, 2020 at 4:31 PM Bart Schaefer <schaefer@brasslantern.com>
wrote:

> On Wed, Jul 8, 2020 at 11:24 AM Vin Shelton <acs@alumni.princeton.edu>
> wrote:
> >
> > BTW, I have no idea how my PS1 gets set to %m (I checked)
>
> Exported into the environment somewhere upstream?
>

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

* Re: Five New Test Failures
  2020-07-08 18:23             ` Vin Shelton
  2020-07-08 20:30               ` Bart Schaefer
@ 2020-07-09  8:04               ` Jun T
  2020-07-11  0:02                 ` Daniel Shahaf
  1 sibling, 1 reply; 21+ messages in thread
From: Jun T @ 2020-07-09  8:04 UTC (permalink / raw)
  To: zsh-workers


> 2020/07/09 3:23, Vin Shelton <acs@alumni.princeton.edu> wrote:
> 
> BTW, I have no idea how my PS1 gets set to %m (I checked),

Isn't '%m%# ' the default value for PS1 ?


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

* Re: Five New Test Failures
  2020-07-08 10:49           ` Jun T
  2020-07-08 18:23             ` Vin Shelton
@ 2020-07-09 10:17             ` Jun T
  2020-07-11  0:03               ` Daniel Shahaf
  1 sibling, 1 reply; 21+ messages in thread
From: Jun T @ 2020-07-09 10:17 UTC (permalink / raw)
  To: zsh-workers

I've pushed the patch (46215⁩) with modification that the test
is skipped on Cygwin.

It works at least on FreeBSD-12.0, Dragonfly-5.8, NetBSD-8.1 and OpenBSD-8.5
in addition to Fedora-30, Ubuntu-20.04, CentOS-8 and macOS-10.14.


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

* Re: Five New Test Failures
  2020-07-09  8:04               ` Jun T
@ 2020-07-11  0:02                 ` Daniel Shahaf
  0 siblings, 0 replies; 21+ messages in thread
From: Daniel Shahaf @ 2020-07-11  0:02 UTC (permalink / raw)
  To: Jun T; +Cc: zsh-workers

Jun T wrote on Thu, 09 Jul 2020 17:04 +0900:
> > 2020/07/09 3:23, Vin Shelton <acs@alumni.princeton.edu> wrote:
> > 
> > BTW, I have no idea how my PS1 gets set to %m (I checked),  
> 
> Isn't '%m%# ' the default value for PS1 ?
> 

It is; it's hardcoded in init.c.

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

* Re: Five New Test Failures
  2020-07-09 10:17             ` Jun T
@ 2020-07-11  0:03               ` Daniel Shahaf
  0 siblings, 0 replies; 21+ messages in thread
From: Daniel Shahaf @ 2020-07-11  0:03 UTC (permalink / raw)
  To: Jun T; +Cc: zsh-workers

Jun T wrote on Thu, 09 Jul 2020 19:17 +0900:
> I've pushed the patch (46215⁩) with modification that the test
> is skipped on Cygwin.
> 
> It works at least on FreeBSD-12.0, Dragonfly-5.8, NetBSD-8.1 and OpenBSD-8.5
> in addition to Fedora-30, Ubuntu-20.04, CentOS-8 and macOS-10.14.
> 

Thanks!

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

end of thread, other threads:[~2020-07-11  0:04 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-05 15:28 Five New Test Failures Vin Shelton
2020-07-05 16:28 ` Bart Schaefer
2020-07-05 16:57   ` Bart Schaefer
2020-07-05 17:22     ` Bart Schaefer
2020-07-07 14:14       ` Vin Shelton
2020-07-07 16:03         ` Daniel Shahaf
2020-07-07 16:39           ` Bart Schaefer
2020-07-07 19:33             ` Vin Shelton
2020-07-08  0:25         ` Jun T
2020-07-08  1:03           ` Vin Shelton
2020-07-08 10:49           ` Jun T
2020-07-08 18:23             ` Vin Shelton
2020-07-08 20:30               ` Bart Schaefer
2020-07-08 20:55                 ` Vin Shelton
2020-07-09  8:04               ` Jun T
2020-07-11  0:02                 ` Daniel Shahaf
2020-07-09 10:17             ` Jun T
2020-07-11  0:03               ` Daniel Shahaf
2020-07-05 16:54 ` Message size limit? (was: Five New Test Failures) Daniel Shahaf
2020-07-05 17:13   ` Vin Shelton
2020-07-07 16:06     ` Daniel Shahaf

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