all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Jim Porter <jporterbugs@gmail.com>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: emacs-devel@gnu.org
Subject: Re: master updated (5af5ed6c62 -> f07505d1ec)
Date: Wed, 7 Sep 2022 14:03:41 -0700	[thread overview]
Message-ID: <038f151d-19db-b4ea-3172-76f34014c147@gmail.com> (raw)
In-Reply-To: <874jxjpfua.fsf@gnus.org>

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

On 9/7/2022 4:46 AM, Lars Ingebrigtsen wrote:
> In the last run on EMBA, that test didn't fail, but this one did:
> 
> Test esh-proc-test/sigpipe-exits-process condition:
>      (ert-test-failed
>       ((should
>         (eq
> 	(process-list)
> 	nil))
>        :form
>        (eq
>         (#<process sh-stderr>)
>         nil)
>        :value nil))
>     FAILED  16/16  esh-proc-test/sigpipe-exits-process (1.013610 sec) at lisp/eshell/esh-proc-tests.el:122
> Ran 16 tests, 14 results as expected, 1 unexpected, 1 skipped (2022-09-07 10:27:03+0000, 2.594968 sec)
> 1 unexpected results:
>     FAILED  esh-proc-test/sigpipe-exits-process  ((should (eq
>      (process-list) nil)) :form (eq (#<process sh-stderr>) nil) :value
>      nil)

Luckily, that's an easy one to fix. See attached.

The changes for bug#21605 resulted in that test spawning an extra pipe 
process to monitor stderr, which confused the test. For simplicity, I 
just tweaked the pipeline in that test to avoid spawning the pipe process.

[-- Attachment #2: 0001-Fix-a-race-condition-in-an-Eshell-test.patch --]
[-- Type: text/plain, Size: 1314 bytes --]

From c6bb09c4ac22ffa76f248ccca8285397cc46f12e Mon Sep 17 00:00:00 2001
From: Jim Porter <jporterbugs@gmail.com>
Date: Wed, 7 Sep 2022 13:58:31 -0700
Subject: [PATCH] Fix a race condition in an Eshell test

* test/lisp/eshell/esh-proc-tests.el
(esh-proc-test/sigpipe-exits-process): Use "|&" when creating the
pipeline to prevent an extra pipe process from being started.
---
 test/lisp/eshell/esh-proc-tests.el | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/test/lisp/eshell/esh-proc-tests.el b/test/lisp/eshell/esh-proc-tests.el
index 52a0d1eeeb..abe363bee0 100644
--- a/test/lisp/eshell/esh-proc-tests.el
+++ b/test/lisp/eshell/esh-proc-tests.el
@@ -128,8 +128,10 @@ esh-proc-test/sigpipe-exits-process
    (eshell-match-command-output
     ;; The first command is like `yes' but slower.  This is to prevent
     ;; it from taxing Emacs's process filter too much and causing a
-    ;; hang.
-    (concat "sh -c 'while true; do echo y; sleep 1; done' | "
+    ;; hang.  Note that we use "|&" to connect the processes so that
+    ;; Emacs doesn't create an extra pipe process for the first "sh"
+    ;; invocation.
+    (concat "sh -c 'while true; do echo y; sleep 1; done' |& "
             "sh -c 'read NAME; echo ${NAME}'")
     "y\n")
    (eshell-wait-for-subprocess t)
-- 
2.25.1


  reply	other threads:[~2022-09-07 21:03 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <166233264971.21612.17042094685015365861@vcs2.savannah.gnu.org>
2022-09-05  0:17 ` master updated (5af5ed6c62 -> f07505d1ec) Lars Ingebrigtsen
2022-09-05  0:18   ` Lars Ingebrigtsen
2022-09-05  0:22   ` Lars Ingebrigtsen
2022-09-05  0:25   ` Jim Porter
2022-09-06  9:33     ` Lars Ingebrigtsen
2022-09-06 18:41       ` Jim Porter
2022-09-06 20:13         ` Lars Ingebrigtsen
2022-09-06 22:46           ` Jim Porter
2022-09-07 11:46             ` Lars Ingebrigtsen
2022-09-07 21:03               ` Jim Porter [this message]
2022-09-08 12:02                 ` Lars Ingebrigtsen
2022-09-08 22:16                   ` Jim Porter

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=038f151d-19db-b4ea-3172-76f34014c147@gmail.com \
    --to=jporterbugs@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=larsi@gnus.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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.