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, 23 Sep 2017 11:48:38 -0400 Message-ID: <87wp4pmn55.fsf@users.sourceforge.net> References: <87a82caowm.fsf@chinook> <87377on96c.fsf@runbox.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: blaine.gmane.org 1506181764 8685 195.159.176.226 (23 Sep 2017 15:49:24 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 23 Sep 2017 15:49:24 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.60 (gnu/linux) 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 23 17:49:18 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 1dvmgA-0001YR-4W for geb-bug-gnu-emacs@m.gmane.org; Sat, 23 Sep 2017 17:49:18 +0200 Original-Received: from localhost ([::1]:35303 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dvmgC-0008Ru-Dl for geb-bug-gnu-emacs@m.gmane.org; Sat, 23 Sep 2017 11:49:20 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39717) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dvmg0-0008QO-1C for bug-gnu-emacs@gnu.org; Sat, 23 Sep 2017 11:49:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dvmfv-0001Kk-4k for bug-gnu-emacs@gnu.org; Sat, 23 Sep 2017 11:49:08 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:46087) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dvmfu-0001KR-VW for bug-gnu-emacs@gnu.org; Sat, 23 Sep 2017 11:49:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dvmfu-0006ec-D4 for bug-gnu-emacs@gnu.org; Sat, 23 Sep 2017 11:49: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, 23 Sep 2017 15:49: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: confirmed Original-Received: via spool by 28333-submit@debbugs.gnu.org id=B28333.150618172925557 (code B ref 28333); Sat, 23 Sep 2017 15:49:02 +0000 Original-Received: (at 28333) by debbugs.gnu.org; 23 Sep 2017 15:48:49 +0000 Original-Received: from localhost ([127.0.0.1]:54768 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dvmfg-0006e4-OK for submit@debbugs.gnu.org; Sat, 23 Sep 2017 11:48:48 -0400 Original-Received: from mail-it0-f44.google.com ([209.85.214.44]:44854) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dvmfe-0006dh-HC; Sat, 23 Sep 2017 11:48:47 -0400 Original-Received: by mail-it0-f44.google.com with SMTP id d192so3073879itd.1; Sat, 23 Sep 2017 08:48:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:in-reply-to:references:user-agent:date :message-id:mime-version; bh=7Nxg67FkhKryTUnfY+jNSs0rdLFEswkA6SGsEAVIrjA=; b=XPjA2AmTxum9xujAz2bRPethXMrRtXp/BiUcxJKez/HGqrNXuYKkYyT59SdRYWsB++ ZtvKpPYmJOzVJ/P0GKVVyMe7AIdgR71+nVmnTc201DL4oscovqibifFkJpsmDVAX7mQx HpGuQpoDoMY7rP/JxC6YAuwiT3MIP3eQkQzvXzZczQZ5fsFj4/CdlTSTh+uZm7xDM1k5 3VCh5V1hljlG/FmvLBLkPBd/CFnqKsJw3BFqggt1un0mdB7K8Sz2xdU8esjIaiI6kNn7 +wJAR922+4dPLXXGB9Dc6SW60OCWuOqz7nYV6pD4OAKTmSkIgZaETbXLTxpzQrs5/lpe p5NA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:in-reply-to:references :user-agent:date:message-id:mime-version; bh=7Nxg67FkhKryTUnfY+jNSs0rdLFEswkA6SGsEAVIrjA=; b=rmoC0gazJaTcUQilWP/fC0JRH7vixK32XekKQkb4W94REYXocqhk9HYxZL6RYUrKgT a6mzIfkOEVseezNrqQulxZ2QHCweUrS7bRMSbuTNFp3hzGALUDAzQ2lHbEPZiHM/XsKq PqW3KnQIaVlNlUb9AO095ealf3QSKLq37+m58w5CZR82NBiDSiOBW3U58biBl0BhNWf6 LCVJRlnK/lHXRw6whNFVqPRf0MEsH4R4qeWan4q/mQaHFfuXPy1eYD2LR+En8w4LDrs0 uqexu9hs8qnm542/5VJAC9bVjPBY1pIxBfGfH2WIt1Y36F9iokXtL6EOKpYr1/yAZxMV L3Vg== X-Gm-Message-State: AHPjjUhh1q2NBPA/rgf39Vj/wk6AfrLuLvBTjs8em+uOsQmW85icyJYR jcHu6oS0/uwJEvmovIs0yIh9HA== X-Google-Smtp-Source: AOwi7QAwr9JIxVzUFa4qszDJiNXj8+oAm2LDvK60++UzVFqn7+ygkrAp0qBf0dqvsjfwAwrc2CrRLg== X-Received: by 10.36.28.69 with SMTP id c66mr12643066itc.103.1506181720407; Sat, 23 Sep 2017 08:48:40 -0700 (PDT) Original-Received: from zebian ([45.2.119.34]) by smtp.googlemail.com with ESMTPSA id l195sm1977239itl.2.2017.09.23.08.48.39 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 23 Sep 2017 08:48:39 -0700 (PDT) In-Reply-To: <87377on96c.fsf@runbox.com> (Gemini Lasswell's message of "Thu, 14 Sep 2017 16:39:07 -0700") 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:137298 Archived-At: --=-=-= Content-Type: text/plain tags 28333 + patch quit Gemini Lasswell writes: > Noam Postavsky writes: > >> Maybe this could be fixed with something equivalent to the following? > > I've been running this for a few days and haven't seen any more missing > backtraces. Actually, I think it's giving one extra frame. Using `debugger' as the BASE seems to cover both cases nicely: --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-Fix-ert-backtrace-saving-for-non-signal-ed-errors-Bu.patch Content-Description: patch >From 847ed811022f4d4fe43f2d5e14660f93538423dd Mon Sep 17 00:00:00 2001 From: Noam Postavsky Date: Sat, 23 Sep 2017 11:40:14 -0400 Subject: [PATCH] Fix ert backtrace saving for non-`signal'ed errors (Bug#28333) * lisp/emacs-lisp/ert.el (ert--run-test-debugger): Take the frames above the `debugger' frame, rather than assuming there will be a `signal' frame. --- lisp/emacs-lisp/ert.el | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lisp/emacs-lisp/ert.el b/lisp/emacs-lisp/ert.el index d4276221ba..83acbacb88 100644 --- a/lisp/emacs-lisp/ert.el +++ b/lisp/emacs-lisp/ert.el @@ -742,9 +742,8 @@ ert--run-test-debugger ;; backtrace ready for printing is important for batch ;; use. ;; - ;; Grab the frames starting from `signal', frames below - ;; that are all from the debugger. - (backtrace (backtrace-frames 'signal)) + ;; Grab the frames above the debugger. + (backtrace (cdr (backtrace-frames debugger))) (infos (reverse ert--infos))) (setf (ert--test-execution-info-result info) (cl-ecase type -- 2.11.0 --=-=-=--