unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#37697: Recently-added checkdoc tests fail if stdin is empty
@ 2019-10-10 20:28 Paul Eggert
  2019-10-11  5:47 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 2+ messages in thread
From: Paul Eggert @ 2019-10-10 20:28 UTC (permalink / raw)
  To: 37697; +Cc: Damien Cassou

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





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

* bug#37697: Recently-added checkdoc tests fail if stdin is empty
  2019-10-10 20:28 bug#37697: Recently-added checkdoc tests fail if stdin is empty Paul Eggert
@ 2019-10-11  5:47 ` Lars Ingebrigtsen
  0 siblings, 0 replies; 2+ messages in thread
From: Lars Ingebrigtsen @ 2019-10-11  5:47 UTC (permalink / raw)
  To: Paul Eggert; +Cc: Damien Cassou, 37697

Paul Eggert <eggert@cs.ucla.edu> writes:

> 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:

[...]

> 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

I thought I had removed those before checking in, but nope.  I've now
removed them.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





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

end of thread, other threads:[~2019-10-11  5:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-10-10 20:28 bug#37697: Recently-added checkdoc tests fail if stdin is empty Paul Eggert
2019-10-11  5:47 ` Lars Ingebrigtsen

Code repositories for project(s) associated with this public inbox

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

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 read-only IMAP folder(s) and NNTP newsgroup(s).