Subject: bug#50975: closed (Re: bug#50975: 28.0.60; mh-utils-tests fail with native compilation)

From: [email-masked] (GNU bug Tracking System)
Date: Mon, 04 Oct 2021 22:33:02 +0000

Your bug report

#50975: 28.0.60; mh-utils-tests fail with native compilation

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
50975: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=50975
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#50975: 28.0.60; mh-utils-tests fail with native compilation
From: Ken Brown <[email-masked]>
To: Andrea Corallo <[email-masked]>, Andrea Corallo via Bug reports for GNU "Emacs," the Swiss army knife of text editors <[email-masked]>
Cc: Eli Zaretskii <[email-masked]>, [email-masked]
Date: Mon, 4 Oct 2021 18:32:05 -0400
List-Id: <debbugs-submit.debbugs.gnu.org>

On 10/4/2021 4:57 PM, Andrea Corallo wrote:
> I've pushed 63cb65dcce to fix that, it builds the two trampolines AOT so
> we have no interference with the tests.
> 
> Seems to work here, please have a try.

Confirmed.  Thanks.

Ken

Subject: 28.0.60; mh-utils-tests fail with native compilation
From: Ken Brown <[email-masked]>
To: [email-masked]
Date: Sat, 2 Oct 2021 14:49:04 -0400
List-Id: <debbugs-submit.debbugs.gnu.org>

Most of the tests in mh-utils-tests fail if I build the emacs-28 branch on 
Cygwin with native compilation:

$ make -C test mh-utils-tests
make: Entering directory '/home/kbrown/src/emacs/x86_64-emacs-28-native-lisp/test'
make[1]: Entering directory 
'/home/kbrown/src/emacs/x86_64-emacs-28-native-lisp/test'
   GEN      lisp/mh-e/mh-utils-tests.log
Running 16 tests (2021-10-02 14:13:13-0400, selector ‘(not (tag :unstable))’)
No MH variant found on the system
call-process mock unexpected arglist (emacs --batch -l 
/tmp/emacs-int-comp-subr--trampoline-66696c652d6469726563746f72792d70_file_directory_p_0-rg5Ucy.el)
call-process mock unexpected arglist (emacs --batch -l 
/tmp/emacs-int-comp-subr--trampoline-66696c652d6469726563746f72792d70_file_directory_p_0-f6P2ZU.el)
Test mh-folder-completion-function-02-empty backtrace:
   signal(native-compiler-error ((lambda (arg538 &optional) (let ((f #'
   comp--native-compile((lambda (arg538 &optional) (let ((f #'file-dire
   comp-trampoline-compile(file-directory-p)
   comp-subr-trampoline-install(file-directory-p)
   fset(file-directory-p #<subr file-directory-p>)
   (unwind-protect (progn (if mh-test-variant-logged-already nil (mh-va
   (let* ((vnew (make-hash-table :test #'equal)) (vnew (getenv "MH")) (
   (let ((lexical-binding t)) (let* ((vnew (make-hash-table :test #'equ
   (closure (t) nil (let ((lexical-binding t)) (let* ((vnew (make-hash-
   ert--run-test-internal(#s(ert--test-execution-info :test #s(ert-test
   ert-run-test(#s(ert-test :name mh-folder-completion-function-02-empt
   ert-run-or-rerun-test(#s(ert--stats :selector (not (tag :unstable))
   ert-run-tests((not (tag :unstable)) #f(compiled-function (event-type
   ert-run-tests-batch((not (tag :unstable)))
   ert-run-tests-batch-and-exit((not (tag :unstable)))
   command-line-1(("-L" ":../../emacs-28-x86_64/test" "-l" "ert" "-l" "
   command-line()
   normal-top-level()
Test mh-folder-completion-function-02-empty condition:
     (native-compiler-error
      (lambda
        (arg538 &optional)
        (let
            ((f ...))
          (funcall f arg538)))
      "")
    FAILED   1/16  mh-folder-completion-function-02-empty (1.860486 sec)
[...]
Ran 16 tests, 4 results as expected, 12 unexpected (2021-10-02 14:13:21-0400, 
7.807508 sec)
2 expected failures

12 unexpected results:
    FAILED  mh-folder-completion-function-02-empty
    FAILED  mh-folder-completion-function-03-plus
    FAILED  mh-folder-completion-function-04-rel-folder
    FAILED  mh-folder-completion-function-05-rel-folder-slash
    FAILED  mh-folder-completion-function-06-rel-folder-slash-foo
    FAILED  mh-folder-completion-function-07-rel-folder-slash-foo-slash
    FAILED  mh-folder-completion-function-10-plus-slash-abs-folder
    FAILED  mh-folder-completion-function-11-plus-slash-abs-folder-slash-foo
    FAILED  mh-folder-completion-function-12-plus-nosuchfolder
    FAILED  mh-folder-completion-function-13-plus-slash-nosuchfolder
    FAILED  mh-sub-folders
    FAILED  mh-sub-folders-actual

This doesn't happen in a build without native compilation:

$ make -C test mh-utils-tests
make: Entering directory '/home/kbrown/src/emacs/x86_64-emacs-28/test'
make[1]: Entering directory '/home/kbrown/src/emacs/x86_64-emacs-28/test'
   GEN      lisp/mh-e/mh-utils-tests.log
Running 16 tests (2021-10-02 14:18:12-0400, selector ‘(not (or (tag :unstable) 
(tag :nativecomp)))’)
No MH variant found on the system
[...]
Ran 16 tests, 16 results as expected, 0 unexpected (2021-10-02 14:18:12-0400, 
0.081313 sec)
2 expected failures