From unknown Mon Jun 23 04:08:18 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#25471 <25471@debbugs.gnu.org> To: bug#25471 <25471@debbugs.gnu.org> Subject: Status: 26.0.50; Edebug and Testcover give incorrect code coverage results for code that uses 'unknown Reply-To: bug#25471 <25471@debbugs.gnu.org> Date: Mon, 23 Jun 2025 11:08:18 +0000 retitle 25471 26.0.50; Edebug and Testcover give incorrect code coverage re= sults for code that uses 'unknown reassign 25471 emacs submitter 25471 Gemini Lasswell severity 25471 normal tag 25471 fixed thanks From debbugs-submit-bounces@debbugs.gnu.org Tue Jan 17 16:25:09 2017 Received: (at submit) by debbugs.gnu.org; 17 Jan 2017 21:25:09 +0000 Received: from localhost ([127.0.0.1]:34112 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cTbFd-00024W-CI for submit@debbugs.gnu.org; Tue, 17 Jan 2017 16:25:09 -0500 Received: from eggs.gnu.org ([208.118.235.92]:48935) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cTbFb-00024I-Te for submit@debbugs.gnu.org; Tue, 17 Jan 2017 16:25:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cTbFV-0006Ux-Ub for submit@debbugs.gnu.org; Tue, 17 Jan 2017 16:25:02 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:52841) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cTbFV-0006Uo-SO for submit@debbugs.gnu.org; Tue, 17 Jan 2017 16:25:01 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39887) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cTbFU-0006fs-IM for bug-gnu-emacs@gnu.org; Tue, 17 Jan 2017 16:25:01 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cTbFQ-0006Qe-GT for bug-gnu-emacs@gnu.org; Tue, 17 Jan 2017 16:25:00 -0500 Received: from aibo.runbox.com ([91.220.196.211]:45045) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cTbFQ-0006O6-9O for bug-gnu-emacs@gnu.org; Tue, 17 Jan 2017 16:24:56 -0500 Received: from [10.9.9.210] (helo=mailfront10.runbox.com) by bars.runbox.com with esmtp (Exim 4.71) (envelope-from ) id 1cTbFM-0004ru-Pb for bug-gnu-emacs@gnu.org; Tue, 17 Jan 2017 22:24:52 +0100 Received: from c-24-22-244-161.hsd1.wa.comcast.net ([24.22.244.161] helo=rainbow.local) by mailfront10.runbox.com with esmtpsa (uid:179284 ) (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) id 1cTbF6-00046Z-PO for bug-gnu-emacs@gnu.org; Tue, 17 Jan 2017 22:24:37 +0100 From: Gemini Lasswell To: bug-gnu-emacs@gnu.org Subject: 26.0.50; Edebug and Testcover give incorrect code coverage results for code that uses 'unknown Date: Tue, 17 Jan 2017 13:24:11 -0800 Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.1 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.1 (----) If you use Edebug or Testcover to gather code coverage information on code which uses the symbol `unknown', you will get incorrect code coverage results, because Edebug uses `unknown' internally to represent forms which have never been evaluated under Edebug. `unknown' is an obvious name for a Lisp symbol and is used in the Emacs sources in cedet, calc, cus-edit, elint, erc, gnus and several other places. For an example of incorrect code coverage, save this function definition in a file called bug.el: (defun how-do-i-know-you (name) (let ((val 'unknown)) (when (equal name "Bob") (setq val 'known)) val)) And then use: M-x testcover-start RET bug.el RET M-: (how-do-i-know-you "Liz") RET M-x testcover-mark-all RET RET The result will be red splotches on the last line of how-do-i-know-you indicating that Testcover thinks it was never executed. This could be very simply fixed by changing Edebug to use `edebug-unknown' instead. The other symbols currently used to record code coverage are `1value' and `ok-coverage', and they could be changed respectively to `testcover-1value' and `edebug-ok-coverage'. edebug.el and testcover.el still wouldn't be able to do code coverage on themselves, but they should then work for everybody else. From debbugs-submit-bounces@debbugs.gnu.org Sat Jul 27 06:30:56 2019 Received: (at 25471) by debbugs.gnu.org; 27 Jul 2019 10:30:56 +0000 Received: from localhost ([127.0.0.1]:43637 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hrJyZ-0006I4-OX for submit@debbugs.gnu.org; Sat, 27 Jul 2019 06:30:55 -0400 Received: from quimby.gnus.org ([80.91.231.51]:35718) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hrJyX-0006Hw-TR for 25471@debbugs.gnu.org; Sat, 27 Jul 2019 06:30:54 -0400 Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=marnie) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hrJyT-0006Fj-Fb; Sat, 27 Jul 2019 12:30:51 +0200 From: Lars Ingebrigtsen To: Gemini Lasswell Subject: Re: bug#25471: 26.0.50; Edebug and Testcover give incorrect code coverage results for code that uses 'unknown References: Date: Sat, 27 Jul 2019 12:30:49 +0200 In-Reply-To: (Gemini Lasswell's message of "Tue, 17 Jan 2017 13:24:11 -0800") Message-ID: <874l37lqg6.fsf@mouse.gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Gemini Lasswell writes: > If you use Edebug or Testcover to gather code coverage information on > code which uses the symbol `unknown', you will get incorrect code > coverage results, because Edebug uses `unknown' internally [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 25471 Cc: 25471@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Gemini Lasswell writes: > If you use Edebug or Testcover to gather code coverage information on > code which uses the symbol `unknown', you will get incorrect code > coverage results, because Edebug uses `unknown' internally to represent > forms which have never been evaluated under Edebug. I've now fixed this in edebug.el on the trunk. > For an example of incorrect code coverage, save this function definition > in a file called bug.el: > > (defun how-do-i-know-you (name) > (let ((val 'unknown)) > (when (equal name "Bob") > (setq val 'known)) > val)) > > And then use: > > M-x testcover-start RET bug.el RET > M-: (how-do-i-know-you "Liz") RET > M-x testcover-mark-all RET RET However, the testcover case seems to be more complicated. `unknown' seems straightforward, but there's also `1value' and `maybe' and perhaps some other symbols that I'm not sure need this or not. `noreturn', for instance, seems part of the official API and can't be changed... I think? I don't use testcover myself. Could you perhaps propose a patch to fix this? -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Sat Feb 06 06:29:50 2021 Received: (at 25471) by debbugs.gnu.org; 6 Feb 2021 11:29:50 +0000 Received: from localhost ([127.0.0.1]:45224 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l8Lmg-00068E-40 for submit@debbugs.gnu.org; Sat, 06 Feb 2021 06:29:50 -0500 Received: from quimby.gnus.org ([95.216.78.240]:51590) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l8Lme-00067z-Kx for 25471@debbugs.gnu.org; Sat, 06 Feb 2021 06:29:49 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=W++gYScnIpho9r2i7F7ckmrFiw1ZkN3fhrELJttQM0Y=; b=PizoKfvk9iERdlQAI7B83Yg7OD q8pqdgKY+lKNyr5C+ryDlLKjeMkIHGgjNGcQNubJMKbHYw3fXxY2RaOlzu1/23MHhYca+nXm0cb1Y IzxIh9D3papL2LuJj0psDiAd3ToWtaszt1rKzmdG9a5eZf1+WUQTWEKFoCI3Fb04A7v8=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l8LmT-0004zc-Ps; Sat, 06 Feb 2021 12:29:42 +0100 From: Lars Ingebrigtsen To: Gemini Lasswell Subject: Re: bug#25471: 26.0.50; Edebug and Testcover give incorrect code coverage results for code that uses 'unknown References: X-Now-Playing: David Allred's _In A Town You Wouldn't Know_: "Eyes" Date: Sat, 06 Feb 2021 12:29:35 +0100 In-Reply-To: (Gemini Lasswell's message of "Tue, 17 Jan 2017 13:24:11 -0800") Message-ID: <87sg69cu3k.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Gemini Lasswell writes: > This could be very simply fixed by changing Edebug to use > `edebug-unknown' instead. The other symbols currently used to record > code coverage are `1value' and `ok-coverage', and they could be cha [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 25471 Cc: 25471@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Gemini Lasswell writes: > This could be very simply fixed by changing Edebug to use > `edebug-unknown' instead. The other symbols currently used to record > code coverage are `1value' and `ok-coverage', and they could be changed > respectively to `testcover-1value' and `edebug-ok-coverage'. edebug.el > and testcover.el still wouldn't be able to do code coverage on > themselves, but they should then work for everybody else. I've now done the renaming in testcover.el in Emacs 28, too, and the test case seems to work the same as before, so I'm closing this bug report. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Sat Feb 06 06:29:55 2021 Received: (at control) by debbugs.gnu.org; 6 Feb 2021 11:29:55 +0000 Received: from localhost ([127.0.0.1]:45227 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l8Lml-00068U-Bi for submit@debbugs.gnu.org; Sat, 06 Feb 2021 06:29:55 -0500 Received: from quimby.gnus.org ([95.216.78.240]:51604) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l8Lmj-000685-SQ for control@debbugs.gnu.org; Sat, 06 Feb 2021 06:29:54 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=FY2ocW0ZqtDrIOl0wO9sj0P5FIAQS4gSloaYfc8a2kc=; b=mTLLaaiDJw3uKKXMmy4w4gV2xQ F83Y4BAk35Z0qS42oD3IRUbk9H0EBFtJ6vo6V/Hygti3sk+P3WmSCo2uE+tXUsVXrYE0YjikZjhZY ZrPETcX1XLHUVbeuTOkCzfxbdWVpBzuSU3+o37+rp2Q1y5qrLaVIRLXZNfMsFRTGUIJ4=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l8Lmc-0004zm-9g for control@debbugs.gnu.org; Sat, 06 Feb 2021 12:29:48 +0100 Date: Sat, 06 Feb 2021 12:29:45 +0100 Message-Id: <87r1ltcu3a.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #25471 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: tags 25471 fixed close 25471 28.1 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) tags 25471 fixed close 25471 28.1 quit From unknown Mon Jun 23 04:08:18 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 06 Mar 2021 12:24:07 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator