Fix intermittent test failures in process-tests
authorRob Browning <rlb@defaultvalue.org>
Sun, 17 May 2020 00:21:39 +0000 (19:21 -0500)
committerRob Browning <rlb@defaultvalue.org>
Sun, 17 May 2020 00:21:47 +0000 (19:21 -0500)
Add 0012-The-Emacs-process-tests-should-no-longer-fail-interm.patch to
address the issue.

Thanks to Ivo De Decker for reporting the problem, J. Smith for
tracking down the upstream bug, and Nick Gasson for locating the
upstream patch.

Closes: 944616
1  2 
debian/.git-dpm
debian/patches/0012-The-Emacs-process-tests-should-no-longer-fail-interm.patch
debian/patches/series

diff --cc debian/.git-dpm
index 21a8f65a901ef33015fc52d364c4cfaa298ed260,0000000000000000000000000000000000000000..e5c6132977dc3df8baed1e12d9e3a08c7a37d178
mode 100644,000000..100644
--- /dev/null
@@@ -1,8 -1,0 +1,8 @@@
- ea69030e0a64234bd6e459bfdbc737e744b42762
- ea69030e0a64234bd6e459bfdbc737e744b42762
 +# see git-dpm(1) from git-dpm package
++accdeeadcb023c681e52dfacc07c58b455707d23
++accdeeadcb023c681e52dfacc07c58b455707d23
 +b820e6781829e25468113a01b4310907740ffe06
 +b820e6781829e25468113a01b4310907740ffe06
 +emacs_26.3+1.orig.tar.xz
 +0cd09244355fe10f8db19707cceeaa75e8dde3b2
 +24346116
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..dc9b37afb99d23b81602b011ffc8d45664f1d282
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,65 @@@
++From accdeeadcb023c681e52dfacc07c58b455707d23 Mon Sep 17 00:00:00 2001
++From: Noam Postavsky <npostavs@gmail.com>
++Date: Thu, 22 Aug 2019 20:48:19 -0400
++Subject: The Emacs process-tests should no longer fail intermittently
++
++This upstream patch has been incorporated to fix the problem:
++
++  Fix non-deterministic process test
++
++  * test/src/process-tests.el (set-process-filter-t): Don't assume
++  subprocess output will come in a single chunk, keep waiting for more
++  data until next "prompt" is read from subprocess.
++
++Origin: backport, commit: aa49aa884053d0e8b33efe265f2aade19d1f3f3d)
++Bug: https://debbugs.gnu.org/36591
++Forwarded: not-needed
++---
++ test/src/process-tests.el | 26 ++++++++++++++++----------
++ 1 file changed, 16 insertions(+), 10 deletions(-)
++
++diff --git a/test/src/process-tests.el b/test/src/process-tests.el
++index 7a6762a9226..ef057af6b79 100644
++--- a/test/src/process-tests.el
+++++ b/test/src/process-tests.el
++@@ -154,24 +154,30 @@ process-test-sentinel-wait-function-working-p
++                   (concat invocation-directory invocation-name)
++                   "-Q" "--batch" "--eval"
++                   (prin1-to-string
++-                   '(let (s)
++-                      (while (setq s (read-from-minibuffer "$ "))
+++                   '(let ((s nil) (count 0))
+++                      (while (setq s (read-from-minibuffer
+++                                      (format "%d> " count)))
++                         (princ s)
++-                        (princ "\n")))))))
+++                        (princ "\n")
+++                        (setq count (1+ count))))))))
++       (set-process-query-on-exit-flag proc nil)
++       (send-string proc "one\n")
++-      (should
++-       (accept-process-output proc 1))  ; Read "one".
++-      (should (equal (buffer-string) "$ one\n$ "))
+++      (while (not (equal (buffer-substring
+++                          (line-beginning-position) (point-max))
+++                         "1> "))
+++        (accept-process-output proc))   ; Read "one".
+++      (should (equal (buffer-string) "0> one\n1> "))
++       (set-process-filter proc t)       ; Stop reading from proc.
++       (send-string proc "two\n")
++       (should-not
++        (accept-process-output proc 1))  ; Can't read "two" yet.
++-      (should (equal (buffer-string) "$ one\n$ "))
+++      (should (equal (buffer-string) "0> one\n1> "))
++       (set-process-filter proc nil)     ; Resume reading from proc.
++-      (should
++-       (accept-process-output proc 1))  ; Read "two" from proc.
++-      (should (equal (buffer-string) "$ one\n$ two\n$ ")))))
+++      (while (not (equal (buffer-substring
+++                          (line-beginning-position) (point-max))
+++                         "2> "))
+++        (accept-process-output proc))   ; Read "Two".
+++      (should (equal (buffer-string) "0> one\n1> two\n2> ")))))
++ 
++ (ert-deftest start-process-should-not-modify-arguments ()
++   "`start-process' must not modify its arguments in-place."
index db84ba5b7a4c49431c95d7f2d336c29f13826889,0000000000000000000000000000000000000000..9fa4759b9d8bc1d64b7b29dc947dc9c597a0aa9a
mode 100644,000000..100644
--- /dev/null
@@@ -1,11 -1,0 +1,12 @@@
 +0001-Prefer-usr-share-info-emacs.patch
 +0002-Run-debian-startup-and-set-debian-emacs-flavor.patch
 +0003-Remove-files-that-appear-to-be-incompatible-with-the.patch
 +0004-Adjust-documentation-references-for-Debian.patch
 +0005-Modify-the-output-of-version-to-indicate-Debian-modi.patch
 +0006-Don-t-try-to-build-src-macuvs.h-via-IVD_Sequences.tx.patch
 +0007-Kill-gpg-agent-in-package-test.el-to-avoid-a-race.patch
 +0008-Don-t-downcase-real-xref-in-elisp-mode-tests.patch
 +0009-Mark-vc-bzr-test-fauilt-bzr-autoloads-as-unstable-fo.patch
 +0010-Mark-echo-server-with-dns-test-as-unstable-for-now.patch
 +0011-Fix-an-eshell-ls-dired-test-for-non-recent-files.patch
++0012-The-Emacs-process-tests-should-no-longer-fail-interm.patch