Subject: Re: bug#65590: 29.0.50; esh-var-test/interp-concat-cmd fails on macOS

From: Stefan Kangas <[email-masked]>
Date: Wed, 13 Sep 2023 09:10:52 -0700

Jim Porter <[email-masked]> writes:

> On 9/1/2023 10:00 AM, Jim Porter wrote:
>> I also pushed a small fix to the debugging code to master as
>> da8b323f82417697f9b772689810099f426fe616, but that shouldn't affect this
>> case (much).
>
> I pushed a couple more correctness fixes for Eshell's process management
> to master as fad91b56d13. Hopefully these will help matters (but to be
> fair, I'm a little skeptical that the bug I fixed is the same as this
> bug...)

Sorry for the slow turnaround time.

I'm currently seeing these test failures on master:

Running 46 tests (2023-09-13 16:46:00+0200, selector ‘(not (or (tag
:expensive-test) (tag :unstable) (tag :nativecomp)))’)
Loading em-alias...
Loading em-banner...
Loading em-basic...
Loading em-cmpl...
Loading em-extpipe...
Loading em-glob...
Loading em-hist...
Loading em-ls...
Loading em-pred...
Loading em-prompt...
Loading em-script...
Loading em-term...
Loading em-unix...
   passed   1/46  esh-cmd-test/and-operator (0.259946 sec)
   passed   2/46  esh-cmd-test/backquoted-lisp-form (0.001679 sec)
   passed   3/46  esh-cmd-test/backquoted-lisp-form/splice (0.001686 sec)
   passed   4/46  esh-cmd-test/for-loop (0.006714 sec)
   passed   5/46  esh-cmd-test/for-loop-for-items-shadow (0.004334 sec)
   passed   6/46  esh-cmd-test/for-loop-list (0.003476 sec)
   passed   7/46  esh-cmd-test/for-loop-multiple-args (0.006086 sec)
   passed   8/46  esh-cmd-test/for-loop-name (0.002023 sec)
   passed   9/46  esh-cmd-test/for-loop-name-shadow (0.003343 sec)
   passed  10/46  esh-cmd-test/for-loop-pipe (0.112573 sec)
   passed  11/46  esh-cmd-test/if-else-statement (0.031268 sec)
   passed  12/46  esh-cmd-test/if-else-statement-ext-cmd (0.126054 sec)
   passed  13/46  esh-cmd-test/if-else-statement-lisp-form (0.005082 sec)
   passed  14/46  esh-cmd-test/if-else-statement-lisp-form-2 (0.004613 sec)
   passed  15/46  esh-cmd-test/if-else-statement-pipe (0.239692 sec)
   passed  16/46  esh-cmd-test/if-statement (0.003869 sec)
   passed  17/46  esh-cmd-test/if-statement-pipe (0.226295 sec)
   passed  18/46  esh-cmd-test/let-rebinds-after-defer (0.113418 sec)
   passed  19/46  esh-cmd-test/lisp-command (0.002054 sec)
   passed  20/46  esh-cmd-test/lisp-command-args (0.002587 sec)
   passed  21/46  esh-cmd-test/lisp-command-with-quote (0.001719 sec)
   passed  22/46  esh-cmd-test/or-operator (0.233849 sec)
   passed  23/46  esh-cmd-test/pipeline-wait/head-proc (0.113463 sec)
   passed  24/46  esh-cmd-test/pipeline-wait/multi-proc (1.045003 sec)
   passed  25/46  esh-cmd-test/pipeline-wait/subcommand (0.119225 sec)
   passed  26/46  esh-cmd-test/pipeline-wait/subcommand-with-pipe (0.137609 sec)
   passed  27/46  esh-cmd-test/pipeline-wait/tail-proc (0.124454 sec)
   passed  28/46  esh-cmd-test/quoted-lisp-form (0.002298 sec)
Test esh-cmd-test/reset-in-pipeline/lisp backtrace:
  signal(ert-test-failed (((should (eshell-command-result--equal comma
  ert-fail(((should (eshell-command-result--equal command (eshell-test
  eshell-command-result-equal("echo $(format \"%s\" eshell-in-pipeline
  #f(compiled-function () #<bytecode 0xaa47d7f4bc36b29>)()
  ert--run-test-internal(#s(ert--test-execution-info :test #s(ert-test
  ert-run-test(#s(ert-test :name esh-cmd-test/reset-in-pipeline/lisp :
  ert-run-or-rerun-test(#s(ert--stats :selector ... :tests ... :test-m
  ert-run-tests((not (or (tag :expensive-test) (tag :unstable) (tag :n
  ert-run-tests-batch((not (or (tag :expensive-test) (tag :unstable) (
  ert-run-tests-batch-and-exit((not (or (tag :expensive-test) (tag :un
  eval((ert-run-tests-batch-and-exit '(not (or (tag :expensive-test) (
  command-line-1(("-L" ":." "-l" "ert" "-l" "lisp/eshell/esh-cmd-tests
  command-line()
  normal-top-level()
Test esh-cmd-test/reset-in-pipeline/lisp condition:
    Command logs: command: "echo $(format "%s" eshell-in-pipeline-p) | *cat"

                  ----------------------------------------
                  [process] started external process ‘cat’
    (ert-test-failed
     ((should
       (eshell-command-result--equal command
				     (eshell-test-command-result command)
				     result))
      :form
      (eshell-command-result--equal
       "echo $(format \"%s\" eshell-in-pipeline-p) | *cat" nil "nil")
      :value nil :explanation
      (nonequal-result
       (command "echo $(format \"%s\" eshell-in-pipeline-p) | *cat")
       (result nil) (expected "nil"))))
   FAILED  29/46  esh-cmd-test/reset-in-pipeline/lisp (0.087616 sec)
at lisp/eshell/esh-cmd-tests.el:203
Test esh-cmd-test/reset-in-pipeline/subcommand backtrace:
  signal(ert-test-failed (((should (eshell-command-result--equal comma
  ert-fail(((should (eshell-command-result--equal command (eshell-test
  eshell-command-result-equal("echo {echo | echo $eshell-in-pipeline-p
  #f(compiled-function () #<bytecode 0x1a4482f59c3edde8>)()
  ert--run-test-internal(#s(ert--test-execution-info :test #s(ert-test
  ert-run-test(#s(ert-test :name esh-cmd-test/reset-in-pipeline/subcom
  ert-run-or-rerun-test(#s(ert--stats :selector ... :tests ... :test-m
  ert-run-tests((not (or (tag :expensive-test) (tag :unstable) (tag :n
  ert-run-tests-batch((not (or (tag :expensive-test) (tag :unstable) (
  ert-run-tests-batch-and-exit((not (or (tag :expensive-test) (tag :un
  eval((ert-run-tests-batch-and-exit '(not (or (tag :expensive-test) (
  command-line-1(("-L" ":." "-l" "ert" "-l" "lisp/eshell/esh-cmd-tests
  command-line()
  normal-top-level()
Test esh-cmd-test/reset-in-pipeline/subcommand condition:
    Command logs: command: "echo {echo | echo $eshell-in-pipeline-p} | *cat"

                  ----------------------------------------
                  [process] started external process ‘cat’
    (ert-test-failed
     ((should
       (eshell-command-result--equal command
				     (eshell-test-command-result command)
				     result))
      :form
      (eshell-command-result--equal
       "echo {echo | echo $eshell-in-pipeline-p} | *cat" nil "last")
      :value nil :explanation
      (nonequal-result
       (command "echo {echo | echo $eshell-in-pipeline-p} | *cat")
       (result nil) (expected "last"))))
   FAILED  30/46  esh-cmd-test/reset-in-pipeline/subcommand (0.078130
sec) at lisp/eshell/esh-cmd-tests.el:184
   passed  31/46  esh-cmd-test/simple-command-result (0.003985 sec)
   passed  32/46  esh-cmd-test/subcommand (0.005324 sec)
   passed  33/46  esh-cmd-test/subcommand-args (0.002383 sec)
   passed  34/46  esh-cmd-test/subcommand-lisp (0.001339 sec)
   passed  35/46  esh-cmd-test/subcommand-shadow-value (0.002534 sec)
   passed  36/46  esh-cmd-test/unless-else-statement (0.017221 sec)
Test esh-cmd-test/unless-else-statement-ext-cmd backtrace:
  signal(ert-test-failed (((should (eshell-command-result--equal comma
  ert-fail(((should (eshell-command-result--equal command (eshell-test
  eshell-command-result-equal("unless {[ foo = bar ]} {echo no} {echo
  #f(compiled-function () #<bytecode -0x9ffeea180f72755>)()
  ert--run-test-internal(#s(ert--test-execution-info :test #s(ert-test
  ert-run-test(#s(ert-test :name esh-cmd-test/unless-else-statement-ex
  ert-run-or-rerun-test(#s(ert--stats :selector ... :tests ... :test-m
  ert-run-tests((not (or (tag :expensive-test) (tag :unstable) (tag :n
  ert-run-tests-batch((not (or (tag :expensive-test) (tag :unstable) (
  ert-run-tests-batch-and-exit((not (or (tag :expensive-test) (tag :un
  eval((ert-run-tests-batch-and-exit '(not (or (tag :expensive-test) (
  command-line-1(("-L" ":." "-l" "ert" "-l" "lisp/eshell/esh-cmd-tests
  command-line()
  normal-top-level()
Test esh-cmd-test/unless-else-statement-ext-cmd condition:
    Command logs: command: "unless {[ foo = bar ]} {echo no} {echo yes}"

                  ----------------------------------------
                  [process] started external process ‘[<1>’
    (ert-test-failed
     ((should
       (eshell-command-result--equal command
				     (eshell-test-command-result command)
				     result))
      :form
      (eshell-command-result--equal
       "unless {[ foo = bar ]} {echo no} {echo yes}" "yes" "no")
      :value nil :explanation
      (nonequal-result
       (command "unless {[ foo = bar ]} {echo no} {echo yes}")
       (result "yes") (expected "no"))))
   FAILED  37/46  esh-cmd-test/unless-else-statement-ext-cmd (0.031509
sec) at lisp/eshell/esh-cmd-tests.el:431
   passed  38/46  esh-cmd-test/unless-else-statement-lisp-form (0.007760 sec)
   passed  39/46  esh-cmd-test/unless-statement (0.003845 sec)
   passed  40/46  esh-cmd-test/until-loop (0.010837 sec)
   passed  41/46  esh-cmd-test/until-loop-ext-cmd (0.125156 sec)
   passed  42/46  esh-cmd-test/until-loop-lisp-form (0.009843 sec)
   passed  43/46  esh-cmd-test/while-loop (0.012687 sec)
   passed  44/46  esh-cmd-test/while-loop-ext-cmd (0.155605 sec)
   passed  45/46  esh-cmd-test/while-loop-lisp-form (0.004418 sec)
   passed  46/46  esh-cmd-test/while-loop-pipe (0.120805 sec)

Ran 46 tests, 43 results as expected, 3 unexpected (2023-09-13
16:46:05+0200, 4.562085 sec)

3 unexpected results:
   FAILED  esh-cmd-test/reset-in-pipeline/lisp
   FAILED  esh-cmd-test/reset-in-pipeline/subcommand
   FAILED  esh-cmd-test/unless-else-statement-ext-cmd