From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: taylanbayirli@gmail.com (Taylan Ulrich B.) Newsgroups: gmane.lisp.guile.bugs Subject: bug#14849: (system vm coverage) `line-execution-counts' misleading output Date: Fri, 12 Jul 2013 16:47:00 +0200 Message-ID: <8761wfal97.fsf@taylan.uni.cx> NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1373641101 22986 80.91.229.3 (12 Jul 2013 14:58:21 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 12 Jul 2013 14:58:21 +0000 (UTC) To: 14849@debbugs.gnu.org Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Fri Jul 12 16:58:22 2013 Return-path: Envelope-to: guile-bugs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Uxend-0004ll-4L for guile-bugs@m.gmane.org; Fri, 12 Jul 2013 16:58:21 +0200 Original-Received: from localhost ([::1]:50537 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uxenc-0007sy-Gj for guile-bugs@m.gmane.org; Fri, 12 Jul 2013 10:58:20 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42956) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UxenU-0007jN-AI for bug-guile@gnu.org; Fri, 12 Jul 2013 10:58:15 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UxenR-0007Pi-Fa for bug-guile@gnu.org; Fri, 12 Jul 2013 10:58:12 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:56205) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uxedf-0004C0-36 for bug-guile@gnu.org; Fri, 12 Jul 2013 10:48:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Uxede-0003GM-Le for bug-guile@gnu.org; Fri, 12 Jul 2013 10:48:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: taylanbayirli@gmail.com (Taylan Ulrich B.) Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Fri, 12 Jul 2013 14:48:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 14849 X-GNU-PR-Package: guile X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-guile@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.137364044612484 (code B ref -1); Fri, 12 Jul 2013 14:48:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 12 Jul 2013 14:47:26 +0000 Original-Received: from localhost ([127.0.0.1]:50520 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Uxed3-0003FG-Dg for submit@debbugs.gnu.org; Fri, 12 Jul 2013 10:47:25 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:36816) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Uxed1-0003Eu-4o for submit@debbugs.gnu.org; Fri, 12 Jul 2013 10:47:23 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Uxecq-0003vO-4c for submit@debbugs.gnu.org; Fri, 12 Jul 2013 10:47:17 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:45774) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uxecp-0003vK-VU for submit@debbugs.gnu.org; Fri, 12 Jul 2013 10:47:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38429) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uxecm-0004oG-Hs for bug-guile@gnu.org; Fri, 12 Jul 2013 10:47:11 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Uxecj-0003sD-AG for bug-guile@gnu.org; Fri, 12 Jul 2013 10:47:08 -0400 Original-Received: from mail-ea0-x22b.google.com ([2a00:1450:4013:c01::22b]:53789) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uxecj-0003rV-4B for bug-guile@gnu.org; Fri, 12 Jul 2013 10:47:05 -0400 Original-Received: by mail-ea0-f171.google.com with SMTP id m14so6421342eaj.2 for ; Fri, 12 Jul 2013 07:47:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:message-id:from:to:subject; bh=ih/HcvOZsn6wR00yaVYuZ5QTUbuKgdFi0j2Ta6+BLB0=; b=Si1RrFTmdZ6jOb+dJXlmy6MKqPS9UwGZSFgulwn/1qCwyD3NlBCy3GYfW99d4FYS09 BKvzPNd5ggKjMfyIBvbcXLqA+48zR98l4h+9fg7lFt6LXM54rmsyhTY1Q8r6uKmf4ODe w1gdCu4DsQsod0YhQjTJi63dnfW8c01J2l6uCNnh16mHyFC5q5Np3GZ7KuuFyuyS0tgN eTJZN6JmNKgEuaz+UbWWHAK9+1t6nLDp1+wHfDa1pc7QcxpB7O5rNowjCehfO94AXCBN 6d2d9CXjYuW9hhxxVet/L5kRlFekdD1klfOZah4OJRmrYQpXDn6oMH2a/N8Okevybdd4 8mfQ== X-Received: by 10.15.45.194 with SMTP id b42mr47754388eew.51.1373640423734; Fri, 12 Jul 2013 07:47:03 -0700 (PDT) Original-Received: from taylan.uni.cx (p4FD9238B.dip0.t-ipconnect.de. [79.217.35.139]) by mx.google.com with ESMTPSA id n45sm79005855eew.1.2013.07.12.07.47.02 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 12 Jul 2013 07:47:03 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-guile@gnu.org List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Original-Sender: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.bugs:7206 Archived-At: The following shell/guile transcript showcases a minimal test-case for when a tail-call fools the code-coverage module into thinking that the line with the tail-call was not executed. The result in the Guile transcript, $1, is an alist from line numbers (starting from zero) to execution counts. Converting the relevant coverage-data object into LCOV data via `coverage-data->lcov', as advertised in (info "(guile) Code Coverage"), then to HTML via LCOV's genhtml(1), will result in the relevant line being colored red and contribute negatively to the total line-coverage percentage. === BEGIN TRANSCRIPT === $ cat /tmp/test.scm (define (tail-call-test) (display "foo\n") (tail-call-target)) (define (tail-call-target) (display "bar\n")) $ guile GNU Guile 2.0.9.20-10454 Copyright (C) 1995-2013 Free Software Foundation, Inc. Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'. This program is free software, and you are welcome to redistribute it under certain conditions; type `,show c' for details. Enter `,help' for help. scheme@(guile-user)> (begin ... (load "/tmp/test.scm") ... (call-with-values ... (lambda () ... ((@ (system vm coverage) with-code-coverage) ... ((@ (system vm vm) the-vm)) ... tail-call-test)) ... (lambda (data . values) ... ((@ (system vm coverage) line-execution-counts) data "/tmp/test.scm")))) ;;; :0:4095: warning: possibly unbound variable `tail-call-test' foo bar $1 = ((5 . 1) (4 . 1) (2 . 0) (1 . 1) (0 . 1)) scheme@(guile-user)> === END TRANSCRIPT ===