GNU bug report logs - #24509
25.1.50; backquotes cause testcover to report 1value errors

Previous Next

Package: emacs;

Reported by: Gemini Lasswell <gazally <at> runbox.com>

Date: Thu, 22 Sep 2016 15:54:01 UTC

Severity: normal

Found in version 25.1.50

Done: Gemini Lasswell <gazally <at> runbox.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 24509 in the body.
You can then email your comments to 24509 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#24509; Package emacs. (Thu, 22 Sep 2016 15:54:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Gemini Lasswell <gazally <at> runbox.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Thu, 22 Sep 2016 15:54:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Gemini Lasswell <gazally <at> runbox.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 25.1.50; backquotes cause testcover to report 1value errors
Date: Thu, 22 Sep 2016 08:52:28 -0700
[Message part 1 (text/plain, inline)]
Backquote syntax can cause testcover to report "Value of form marked with ‘1value’ does vary” errors. Here is some code with two different variations of the problem:

(defmacro my-lambda (&rest body)
  `(lambda () ,@body))

(defun my-example ()
  (let ((lambda-1 (my-lambda (message "lambda-1")))
	(lambda-2 (my-lambda (message "lambda-2"))))
    (funcall lambda-1)
    (funcall lambda-2)))

(defmacro my-print-symbol (name)
  `(message "the symbol is %s" ',name))

(defun my-example-2 ()
  (my-print-symbol foo)
  (my-print-symbol bar))

To reproduce the bug:
1. save the above code into a file
2. emacs -Q
3. M-x eval-expression RET (require ‘testcover) RET
4. M-x testcover-start RET filename RET

To make the attached stack trace:
5. M-x toggle-debug-on-error RET
6. M-x eval-expression RET (my-example-2) RET

In my opinion testcover should not be claiming that it is an error if its 1value determination is incorrect. There is no error in the code being tested, there is just a shortcoming in the heuristics that testcover is using to figure out what color splotch to put on the line. But if a form has returned a second value, that code has had adequate coverage and no splotch is necessary.

[testcover-backtrace.txt (text/plain, attachment)]
[Message part 3 (text/plain, inline)]


In GNU Emacs 25.1.50.4 (x86_64-apple-darwin15.6.0, NS appkit-1404.47 Version 10.11.6 (Build 15G1004))
of 2016-09-19 built on malolo.local
Windowing system distributor 'Apple', version 10.3.1404
Recent messages:
You can run the command ‘eval-expression’ with M-:
testcover
Edebug: my-lambda
Edebug: my-example
Eager macro-expansion failure: (error "Value of form marked with ‘1value’ does vary: (lambda nil (message lambda-2))")
Edebug: my-print-symbol
Edebug: my-example-2
Eager macro-expansion failure: (error "Value of form marked with ‘1value’ does vary: (message the symbol is %s (quote bar))")
You can run the command ‘testcover-start’ with M-x tes-s RET
Eager macro-expansion failure: (error "Value of form marked with ‘1value’ does vary: (message the symbol is %s (quote bar))")

Configured using:
'configure --with-ns'

Configured features:
JPEG RSVG IMAGEMAGICK NOTIFY ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS
NS

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Emacs-Lisp

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message subr-x puny seq byte-opt gv
bytecomp byte-compile cl-extra help-mode cconv dired dired-loaddefs
format-spec rfc822 mml mml-sec password-cache epa derived epg epg-config
gnus-util rmail rmail-loaddefs mm-decode mm-bodies mm-encode mail-parse
rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045
ietf-drums mm-util mail-prsvr mail-utils testcover edebug easymenu
cl-loaddefs pcase cl-lib time-date mule-util tooltip eldoc electric
uniquify ediff-hook vc-hooks lisp-float-type mwheel term/ns-win ns-win
ucs-normalize term/common-win tool-bar dnd fontset image regexp-opt
fringe tabulated-list newcomment elisp-mode lisp-mode prog-mode register
page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock
font-lock syntax facemenu font-core term/tty-colors frame cl-generic
cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech
european ethiopic indian cyrillic chinese charscript case-table epa-hook
jka-cmpr-hook help simple abbrev obarray minibuffer cl-preloaded nadvice
loaddefs button faces cus-face macroexp files text-properties overlay
sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote kqueue cocoa ns multi-tty
make-network-process emacs)

Memory information:
((conses 16 208822 9083)
(symbols 48 20772 0)
(miscs 40 54 207)
(strings 32 19256 5265)
(string-bytes 1 616985)
(vectors 16 35113)
(vector-slots 8 671287 4994)
(floats 8 179 99)
(intervals 56 227 22)
(buffers 976 12))

Reply sent to Gemini Lasswell <gazally <at> runbox.com>:
You have taken responsibility. (Sun, 08 Oct 2017 23:49:01 GMT) Full text and rfc822 format available.

Notification sent to Gemini Lasswell <gazally <at> runbox.com>:
bug acknowledged by developer. (Sun, 08 Oct 2017 23:49:02 GMT) Full text and rfc822 format available.

Message #10 received at 24509-done <at> debbugs.gnu.org (full text, mbox):

From: Gemini Lasswell <gazally <at> runbox.com>
To: 24509-done <at> debbugs.gnu.org
Subject: Re: bug#24509: 25.1.50;
 backquotes cause testcover to report 1value errors
Date: Sun, 08 Oct 2017 16:48:05 -0700
Fixed in master, by the patch applied for bug#25316.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 06 Nov 2017 12:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 7 years and 229 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.