all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Paul Eggert <eggert@cs.ucla.edu>
To: 37697@debbugs.gnu.org
Cc: Damien Cassou <damien@cassou.me>
Subject: bug#37697: Recently-added checkdoc tests fail if stdin is empty
Date: Thu, 10 Oct 2019 13:28:17 -0700	[thread overview]
Message-ID: <c8e37dd0-1245-0cd4-9c8a-7e1dce72ab4d@cs.ucla.edu> (raw)

The recently-added checkdoc CL tests read from stdin, which doesn't work 
when automated tests are run. Here is how I reproduced the bug on Fedora 30:

$ cd test
$ make lisp/emacs-lisp/checkdoc-tests </dev/null
make[1]: Entering directory 
'/home/eggert/src/gnu/emacs/static-checking/test'
   GEN      lisp/emacs-lisp/checkdoc-tests.log
Running 10 tests (2019-10-10 13:23:34-0700, selector `(not (tag 
:unstable))')
    passed   1/10  checkdoc-cl-defmethod-ok (0.000504 sec)
Add GLOBAL-VAR documentation to end of doc string? (y or n) Test 
checkdoc-cl-defmethod-with-context-ok backtrace:
   read-string("Add GLOBAL-VAR documentation to end of doc string?...")
   y-or-n-p("Add GLOBAL-VAR documentation to end of doc string?...")
   checkdoc-y-or-n-p("Add GLOBAL-VAR documentation to end of doc string
   checkdoc-this-string-valid-engine(("foo" nil nil nil "a" "&context"
   checkdoc-this-string-valid()
   checkdoc-defun()
   (progn (emacs-lisp-mode) (insert "(cl-defmethod foo (a &context (glo
   (unwind-protect (progn (emacs-lisp-mode) (insert "(cl-defmethod foo
   (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn
   (let ((temp-buffer (generate-new-buffer " *temp*"))) (save-current-b
   (closure (t) nil (let ((temp-buffer (generate-new-buffer " *temp*"))
   ert--run-test-internal(#s(ert--test-execution-info :test #s(ert-test
   ert-run-test(#s(ert-test :name checkdoc-cl-defmethod-with-context-ok
   ert-run-or-rerun-test(#s(ert--stats :selector (not (tag :unstable))
   ert-run-tests((not (tag :unstable)) #f(compiled-function (event-type
   ert-run-tests-batch((not (tag :unstable)))
   ert-run-tests-batch-and-exit((not (tag :unstable)))
   eval((ert-run-tests-batch-and-exit '(not (tag :unstable))) t)
   command-line-1(("-L" ":." "-l" "ert" "-l" "lisp/emacs-lisp/checkdoc-
   command-line()
   normal-top-level()
Test checkdoc-cl-defmethod-with-context-ok condition:
     (error "Error reading from stdin")
    FAILED   2/10  checkdoc-cl-defmethod-with-context-ok (0.000547 sec)
    passed   3/10  checkdoc-cl-defmethod-with-types-ok (0.000442 sec)
    passed   4/10  checkdoc-cl-defun-with-allow-other-keys-ok (0.000375 sec)
Add C documentation to end of doc string? (y or n) Test 
checkdoc-cl-defun-with-aux-ok backtrace:
   read-string("Add C documentation to end of doc string? (y or n)...")
   y-or-n-p("Add C documentation to end of doc string? ")
   checkdoc-y-or-n-p("Add C documentation to end of doc string? ")
   checkdoc-this-string-valid-engine(("foo" nil nil nil "a" "b" "&aux"
   checkdoc-this-string-valid()
   checkdoc-defun()
   (progn (emacs-lisp-mode) (insert "(cl-defun foo (a b &aux (c (+ a b)
   (unwind-protect (progn (emacs-lisp-mode) (insert "(cl-defun foo (a b
   (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn
   (let ((temp-buffer (generate-new-buffer " *temp*"))) (save-current-b
   (closure (t) nil (let ((temp-buffer (generate-new-buffer " *temp*"))
   ert--run-test-internal(#s(ert--test-execution-info :test #s(ert-test
   ert-run-test(#s(ert-test :name checkdoc-cl-defun-with-aux-ok :docume
   ert-run-or-rerun-test(#s(ert--stats :selector (not ...) :tests [...
   ert-run-tests((not (tag :unstable)) #f(compiled-function (event-type
   ert-run-tests-batch((not (tag :unstable)))
   ert-run-tests-batch-and-exit((not (tag :unstable)))
   eval((ert-run-tests-batch-and-exit '(not (tag :unstable))) t)
   command-line-1(("-L" ":." "-l" "ert" "-l" "lisp/emacs-lisp/checkdoc-
   command-line()
   normal-top-level()
Test checkdoc-cl-defun-with-aux-ok condition:
     (error "Error reading from stdin")
    FAILED   5/10  checkdoc-cl-defun-with-aux-ok (0.000437 sec)
    passed   6/10  checkdoc-cl-defun-with-default-optional-value-ok 
(0.000446 sec)
    passed   7/10  checkdoc-cl-defun-with-destructuring-ok (0.000384 sec)
    passed   8/10  checkdoc-cl-defun-with-key-ok (0.000357 sec)
    passed   9/10  checkdoc-tests--bug-24998 (0.000257 sec)
    passed  10/10  checkdoc-tests--next-docstring (0.000228 sec)

Ran 10 tests, 8 results as expected, 2 unexpected (2019-10-10 
13:23:34-0700, 0.233146 sec)

2 unexpected results:
    FAILED  checkdoc-cl-defmethod-with-context-ok
    FAILED  checkdoc-cl-defun-with-aux-ok

make[1]: *** [Makefile:183: lisp/emacs-lisp/checkdoc-tests.log] Error 1
make[1]: Leaving directory '/home/eggert/src/gnu/emacs/static-checking/test'
make: *** [Makefile:249: lisp/emacs-lisp/checkdoc-tests] Error 2





             reply	other threads:[~2019-10-10 20:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-10 20:28 Paul Eggert [this message]
2019-10-11  5:47 ` bug#37697: Recently-added checkdoc tests fail if stdin is empty Lars Ingebrigtsen

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=c8e37dd0-1245-0cd4-9c8a-7e1dce72ab4d@cs.ucla.edu \
    --to=eggert@cs.ucla.edu \
    --cc=37697@debbugs.gnu.org \
    --cc=damien@cassou.me \
    /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.