From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Andrea Corallo via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#50975: 28.0.60; mh-utils-tests fail with native compilation Date: Tue, 05 Oct 2021 07:54:41 +0000 Message-ID: References: <9fd40a2f-c653-60b7-7f59-09c925122bf5@cornell.edu> <540302.1633393742@pental> Reply-To: Andrea Corallo Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25007"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: 50975@debbugs.gnu.org To: Stephen Gildea Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Oct 05 09:55:27 2021 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 1mXfIM-0006Ff-3q for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 05 Oct 2021 09:55:26 +0200 Original-Received: from localhost ([::1]:59496 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mXfIL-0003iP-6n for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 05 Oct 2021 03:55:25 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43152) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mXfHz-0003ZP-3J for bug-gnu-emacs@gnu.org; Tue, 05 Oct 2021 03:55:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:55649) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mXfHx-0002Nb-O2 for bug-gnu-emacs@gnu.org; Tue, 05 Oct 2021 03:55:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mXfHx-0007Ab-KO for bug-gnu-emacs@gnu.org; Tue, 05 Oct 2021 03:55:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Andrea Corallo Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 05 Oct 2021 07:55:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50975 X-GNU-PR-Package: emacs Original-Received: via spool by 50975-submit@debbugs.gnu.org id=B50975.163342048627531 (code B ref 50975); Tue, 05 Oct 2021 07:55:01 +0000 Original-Received: (at 50975) by debbugs.gnu.org; 5 Oct 2021 07:54:46 +0000 Original-Received: from localhost ([127.0.0.1]:38962 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mXfHi-00079z-78 for submit@debbugs.gnu.org; Tue, 05 Oct 2021 03:54:46 -0400 Original-Received: from mx.sdf.org ([205.166.94.24]:49904) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mXfHf-00079q-5E for 50975@debbugs.gnu.org; Tue, 05 Oct 2021 03:54:44 -0400 Original-Received: from ma.sdf.org (ma.sdf.org [205.166.94.33]) by mx.sdf.org (8.15.2/8.14.5) with ESMTPS id 1957sfvH022440 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits) verified NO); Tue, 5 Oct 2021 07:54:42 GMT In-Reply-To: <540302.1633393742@pental> (Stephen Gildea's message of "Mon, 04 Oct 2021 17:29:02 -0700") 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:216424 Archived-At: Stephen Gildea writes: > Thank you, Andrea, for the native-trampolines patch to mh-utils-tests.el. > In this patch, the test explicitly compiles trampolines before redefining > two functions that are defined in C. > > Is it necessary to provide trampolines at all for these short-lived test > functions? The following works for me: > > (mapc (lambda (x) (add-to-list 'native-comp-never-optimize-functions x)) > '(call-process file-directory-p)) Yes disabling the trampoline generation is another option. > Before redefining the functions, the test could create a dynamic local > binding for native-comp-never-optimize-functions and add to it as above. > > If that is a reasonable approach, can we go further? Can the > native-compile code detect that this is a test and automatically > suppress trying to compile a trampoline, without the test having > to be aware of native-compile? I don't think so. The Emacs implementation has the right to use `call-process' to function and in general I think we really want to test the full implementation including trampolines as much as possible in all running tests we can. If we find it useful we could add a knob to disable all trampoline generation for special cases like this. Best Regards Andrea