From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Philipp Stephani Newsgroups: gmane.emacs.bugs Subject: bug#11218: with-demoted-errors use of condition-case-unless-debug; ert Date: Tue, 24 Nov 2020 18:34:07 +0100 Message-ID: References: <4F8DE112.5010106@gnu.org> <87in4cxwnk.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17701"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 11218@debbugs.gnu.org, Stefan Monnier To: Noam Postavsky Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Nov 24 18:36:04 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1khcEV-0004Sj-Kn for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 24 Nov 2020 18:36:03 +0100 Original-Received: from localhost ([::1]:48090 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1khcEU-0005t4-NT for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 24 Nov 2020 12:36:02 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36848) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1khcDW-0005Zp-ID for bug-gnu-emacs@gnu.org; Tue, 24 Nov 2020 12:35:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:49599) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1khcDW-0004Z9-A1 for bug-gnu-emacs@gnu.org; Tue, 24 Nov 2020 12:35:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1khcDW-000490-76 for bug-gnu-emacs@gnu.org; Tue, 24 Nov 2020 12:35:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Philipp Stephani Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 24 Nov 2020 17:35:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 11218 X-GNU-PR-Package: emacs Original-Received: via spool by 11218-submit@debbugs.gnu.org id=B11218.160623926515880 (code B ref 11218); Tue, 24 Nov 2020 17:35:02 +0000 Original-Received: (at 11218) by debbugs.gnu.org; 24 Nov 2020 17:34:25 +0000 Original-Received: from localhost ([127.0.0.1]:32912 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1khcCv-000484-5v for submit@debbugs.gnu.org; Tue, 24 Nov 2020 12:34:25 -0500 Original-Received: from mail-oi1-f174.google.com ([209.85.167.174]:35415) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1khcCu-00047q-90 for 11218@debbugs.gnu.org; Tue, 24 Nov 2020 12:34:24 -0500 Original-Received: by mail-oi1-f174.google.com with SMTP id c80so24653579oib.2 for <11218@debbugs.gnu.org>; Tue, 24 Nov 2020 09:34:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=h0TTI0J0jKrEuKPRYwKiy2wA5REgAI4DhuzLx1ldH04=; b=bhbnbqI72Nb9M210EqbFS4R4cGxhWuxRN9Pqw3I4n5WNfKJvIUamETT+p7iWjUkTI/ CPancYr2UjjlG2sdYZMBLBP6FGOw51QKC9NjBAN0xg1vTLb3mwok0E6x7mdpiLCaYgEq 8OGr4jpVKToQK3FTAMnEPGDQYXJWnDPQzvJagQzGDZYtKJtuHaMSdVS33dZ2WbCbm+Sb OtsGilDa8ssYn56mvG4JhXaEH3RLWYu5Cem3McJL4MwGb1PNQXEUerkJerdvHhaGSlUt 2ntgLKyWU09n/Dj67BlyD6FyMxaVlPZ2YNUszjsAcRLEfV5GUw1QlxZXDG/U44YUU9ZE I+TQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=h0TTI0J0jKrEuKPRYwKiy2wA5REgAI4DhuzLx1ldH04=; b=Dtr/BlbVGr2OxseH65miqTO4IHU/wUU0zIp29+1QYyrdlh2CYk+MPQKEwojQtGHZX7 IfigSpw7gqU2bYnf50pYQAMo65b9yVmutm0iX0qky143wWEcYbFqDPOqXmJ16yyVRseE GGqxVYyMXb6ntDEfKXkTvSttPNLbC3kQPP0W69mqjZg2+Lq4G6ZK2m8MIvaY2igOqY9l 6V9WC5l5l8ChnLRwAhbKLRmwoGZ9tN8tdM9Rdgf6qgbMiTtUI3VBb3qZHpLdcPxUSUYF PG5mxwotD7leBb8rcCr3m6uMw9j2wVbqCN0GuPWoEYKcHhHQdeuqoB6+EBAKnDQ7OKhP bwMA== X-Gm-Message-State: AOAM531yCJqOEyUFduduc5jG1WLD7b0q/Qs6YuM7RZmm0KYGqwIH+TR+ pjMAdPCv/vE72eeOckOkxABjIp+ZuWUkJrWPQT0= X-Google-Smtp-Source: ABdhPJxs0C71GwThRf75N7TvC/h+1n44ytzoPIELbXz1giY2mAdjwIgNmOZW12h2Q597wcILnReOWR3lSjtbCFIECYU= X-Received: by 2002:a05:6808:3af:: with SMTP id n15mr3575136oie.65.1606239258452; Tue, 24 Nov 2020 09:34:18 -0800 (PST) In-Reply-To: <87in4cxwnk.fsf@gmail.com> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:194095 Archived-At: Am Mi., 15. Aug. 2018 um 03:11 Uhr schrieb Noam Postavsky : > > Christian Ohler writes: > > > On 4/13/12 6:44 AM, Stefan Monnier wrote: > >>>>> If you replace with-demoted-errors with ignore-errors, the test passes. > >>>> Looks like a bug in ERT. > >>> I don't know if it's a "bug" per se... > >>> ert--run-test-internal binds debug-on-error to t, and redefines the > >>> debugger to ert--run-test-debugger. As the doc of that function says: > >> > >> I wonder why ERT doesn't just use condition-case to catch and record > >> the errors. > > > > Two reasons that I remember off the top of my head: Recording > > backtraces, and recording additional information provided with > > `ert-info'. Using condition-case would let ERT regain control only > > after the stack is unwound, at which point that information is gone. > > I just posted a patch which changes ERT to use `signal-hook-function' to > record backtraces instead. It fixes the case in the OP. > > https://debbugs.gnu.org/cgi/bugreport.cgi?bug=30745#20 > > Note that condition-case also needs an enhancement to be able to catch > any signal (Bug#24618), so that might be a third reason why ERT didn't > go this route originally. > This issue continues to bug me because normal and expected use of with-demoted-errors in (unrelated) libraries breaks tests in annoying ways. Is there any way I can help move this forward? Is your patch still blocked on anything?