From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Noam Postavsky Newsgroups: gmane.emacs.bugs Subject: bug#28333: 26.0.50; Backtrace not printed when ERT test fails Date: Sat, 2 Sep 2017 17:28:51 -0400 Message-ID: References: <87a82caowm.fsf@chinook> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" X-Trace: blaine.gmane.org 1504387787 9380 195.159.176.226 (2 Sep 2017 21:29:47 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 2 Sep 2017 21:29:47 +0000 (UTC) Cc: 28333@debbugs.gnu.org To: Gemini Lasswell Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Sep 02 23:29:30 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1doFyd-0000tE-K4 for geb-bug-gnu-emacs@m.gmane.org; Sat, 02 Sep 2017 23:29:15 +0200 Original-Received: from localhost ([::1]:58728 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1doFyi-0004QX-RV for geb-bug-gnu-emacs@m.gmane.org; Sat, 02 Sep 2017 17:29:20 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52031) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1doFyV-0004PG-Iw for bug-gnu-emacs@gnu.org; Sat, 02 Sep 2017 17:29:12 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1doFyQ-0004xw-Th for bug-gnu-emacs@gnu.org; Sat, 02 Sep 2017 17:29:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:35406) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1doFyQ-0004xq-On for bug-gnu-emacs@gnu.org; Sat, 02 Sep 2017 17:29:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1doFyQ-0000gy-FP for bug-gnu-emacs@gnu.org; Sat, 02 Sep 2017 17:29:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Noam Postavsky Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 02 Sep 2017 21:29:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 28333 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 28333-submit@debbugs.gnu.org id=B28333.15043877402646 (code B ref 28333); Sat, 02 Sep 2017 21:29:02 +0000 Original-Received: (at 28333) by debbugs.gnu.org; 2 Sep 2017 21:29:00 +0000 Original-Received: from localhost ([127.0.0.1]:44085 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1doFyN-0000gb-Uj for submit@debbugs.gnu.org; Sat, 02 Sep 2017 17:29:00 -0400 Original-Received: from mail-oi0-f44.google.com ([209.85.218.44]:34900) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1doFyM-0000gK-6K for 28333@debbugs.gnu.org; Sat, 02 Sep 2017 17:28:58 -0400 Original-Received: by mail-oi0-f44.google.com with SMTP id n18so23323363oig.2 for <28333@debbugs.gnu.org>; Sat, 02 Sep 2017 14:28:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=1iG3kpgO7xNZZJDnexffbq0VK/XCCA+Rtbk0AE7wU5s=; b=SdMMUXGGG+avbCKqmGQfaAhP5jfIpdLyPHWxicPpQA7NbXo5aidJHzzvX3yap/GyFm kdMUjscQjIZ3uK8mq642S1dxw98MunpepQCGN3DIapZb3yZYO5xp8biLcKHCFJ8J8dKh IHh83YzYjb06TSTHyHQF7ngtR+SheR1p4j1ZkxAqcLLbXGm5MC/V8Iit1OSXoSLQD4to TmX0aXxjy1nTtWc5mMNRh3ndU31vmHfH8gsMGL92SNTZLRDrQSy89KnUktfm8Dx1CKt1 Xfo05Hb9Aokq8/nTpffW3h9708FTtDo+iohTtadiZZDB0YgaPN3P4rd48pQUp/ce9tBp 7yKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=1iG3kpgO7xNZZJDnexffbq0VK/XCCA+Rtbk0AE7wU5s=; b=ZljKRR6dAuvWIuxnKoiT8KgLExrhrAbvy0mnC8Kfpyx8ayxhQvOuPurCwUlGsUmGbP XF8VES18jrFWe1P1q3EZlZ3+y82aRVp8VtuULB/3RVl6OiJbWHPqdWDmrOKbYkfqdBL5 WhWoU5J/CAw9B+gUhDJafTgNqi2SZ47iQKAAkiD/eq8c07JktyIVd63G8fzVCsFZCn8t LAuibW9CEFAsLiU+PTC7Ij0bDTdNGc+IbzbU94DCSWP8hc9JujW37WrZyYPAhcCU0zZH 8IgFsGizq8Fb4TwlHo3wONDyesMRBpXaQ15YCHUxunPdV2YFauXEk3P196kBMu/PbynP bedg== X-Gm-Message-State: AHPjjUgnmbjx6rvTzMbEUW2ll9Ede2yKI3tybs07TZLudhMX17SKk9FJ mE3vpE+zaOreeD2OcGl9dwVan6oiJg== X-Google-Smtp-Source: ADKCNb4rD3num59/+clda05R6XfJxye9iHfa6occAR1fzPZI2tuj/n0pmhlwFeOhoyOGMw6iVgt/vJ7MnLLinx6LA6g= X-Received: by 10.202.78.85 with SMTP id c82mr4935999oib.96.1504387732518; Sat, 02 Sep 2017 14:28:52 -0700 (PDT) Original-Received: by 10.74.17.199 with HTTP; Sat, 2 Sep 2017 14:28:51 -0700 (PDT) In-Reply-To: <87a82caowm.fsf@chinook> X-Google-Sender-Auth: rDSCi26X2idH8sePjYiUpK_8ImI X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:136522 Archived-At: tag 28333 confirmed quit On Sat, Sep 2, 2017 at 3:20 PM, Gemini Lasswell wrote: > ERT used to print a backtrace for every failed test, but recently that > stopped happening. I git bisected and found that the commit which > introduced the problem is ead545824e, "Improve ert backtrace > recording". Hah, ironic isn't it. The problem is this code here: ;; Grab the frames starting from `signal', frames below ;; that are all from the debugger. (backtrace (backtrace-frames 'signal)) When the error comes from division by 0, there is `signal' frame at all, hence we store `nil' as the backtrace. Maybe this could be fixed with something equivalent to the following? --- i/lisp/emacs-lisp/ert.el +++ w/lisp/emacs-lisp/ert.el @@ -739,7 +739,8 @@ ert--run-test-debugger ;; ;; Grab the frames starting from `signal', frames below ;; that are all from the debugger. - (backtrace (backtrace-frames 'signal)) + (backtrace (or (backtrace-frames 'signal) + (cdr (backtrace-frames 'ert--run-test-debugger)))) (infos (reverse ert--infos))) (setf (ert--test-execution-info-result info) (cl-ecase type