From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Troy Brown Newsgroups: gmane.emacs.bugs Subject: bug#62471: 29.0.60; `erts-run-test' results inconsistent with batch mode Date: Sun, 26 Mar 2023 18:28:27 -0400 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="13128"; mail-complaints-to="usenet@ciao.gmane.io" To: 62471@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Mar 27 00:29:18 2023 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 1pgYrW-0003Bn-FC for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 27 Mar 2023 00:29:18 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pgYrK-000367-NJ; Sun, 26 Mar 2023 18:29:06 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pgYrJ-00035Z-3p for bug-gnu-emacs@gnu.org; Sun, 26 Mar 2023 18:29:05 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pgYrG-0008SE-Tl for bug-gnu-emacs@gnu.org; Sun, 26 Mar 2023 18:29:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pgYrG-00010t-Cq for bug-gnu-emacs@gnu.org; Sun, 26 Mar 2023 18:29:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Troy Brown Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 26 Mar 2023 22:29:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 62471 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.16798697263860 (code B ref -1); Sun, 26 Mar 2023 22:29:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 26 Mar 2023 22:28:46 +0000 Original-Received: from localhost ([127.0.0.1]:46078 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pgYr0-00010C-2B for submit@debbugs.gnu.org; Sun, 26 Mar 2023 18:28:46 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:54678) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pgYqy-000104-8B for submit@debbugs.gnu.org; Sun, 26 Mar 2023 18:28:44 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pgYqx-00031n-V9 for bug-gnu-emacs@gnu.org; Sun, 26 Mar 2023 18:28:43 -0400 Original-Received: from mail-ed1-f42.google.com ([209.85.208.42]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pgYqw-00087n-9p for bug-gnu-emacs@gnu.org; Sun, 26 Mar 2023 18:28:43 -0400 Original-Received: by mail-ed1-f42.google.com with SMTP id b20so28650405edd.1 for ; Sun, 26 Mar 2023 15:28:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679869720; h=content-transfer-encoding:to:subject:message-id:date:from :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=ZYE8J3HhQYRBHRziNrCJ1NxXZV9FYDO7un7NJQn5APg=; b=aL/fILSdRkF+I4rIgPYyFI/SxpilTL9y5ioZMjQoZJIsqXut3YJTN06V38IFeCGYDl WoWg6+9dq62Wk9ya+MF7jOqLKYTnUdI2lTYgMRHeTEUQhTQhIz3SPpvrLUg98TYZlv9g Qik3Sr3QKyYCq+mZgqT92+rQHZLuT0aZYqLgQomlHsOv4UqXfKyHwrJvCorUok9cOywC tZ0ukMAKR+bKbKG4ivvuaEnwjFV6DNNdcVRnzwRwe4NZeuRc/uTc1Are7vSo2v7JEeYC +/uXf+U+TD138DitKNR1f3E7nRJBfBG0HW3b7BuvTMQSCkKl29PLJw8a+fKVhUmhyMTS Ggbw== X-Gm-Message-State: AAQBX9cUmPzj6pU5cax7qAIspzNEr4rGGpyS2upAPI0/GcM8sQ2CyHun E1nM9o4Qn4cL0WTfUx+ui3ZHQXVdh5/d2g== X-Google-Smtp-Source: AKy350ZqfKqPcp5YQQWkqFs8558KzIzjYdyjLK7QtUmKugfIgqw6o3iD4t0woulbH0cRjhG8TgFHsg== X-Received: by 2002:a17:906:eda3:b0:931:7350:a4f3 with SMTP id sa3-20020a170906eda300b009317350a4f3mr11683171ejb.10.1679869719534; Sun, 26 Mar 2023 15:28:39 -0700 (PDT) Original-Received: from mail-ed1-f41.google.com (mail-ed1-f41.google.com. [209.85.208.41]) by smtp.gmail.com with ESMTPSA id g5-20020a170906394500b0092fb818127dsm13484992eje.94.2023.03.26.15.28.39 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 26 Mar 2023 15:28:39 -0700 (PDT) Original-Received: by mail-ed1-f41.google.com with SMTP id cn12so28612239edb.4 for ; Sun, 26 Mar 2023 15:28:39 -0700 (PDT) X-Received: by 2002:a50:d7d9:0:b0:502:227a:d0da with SMTP id m25-20020a50d7d9000000b00502227ad0damr3863891edj.2.1679869719141; Sun, 26 Mar 2023 15:28:39 -0700 (PDT) X-Gmail-Original-Message-ID: Received-SPF: pass client-ip=209.85.208.42; envelope-from=troy.s.brown@gmail.com; helo=mail-ed1-f42.google.com X-Spam_score_int: -13 X-Spam_score: -1.4 X-Spam_bar: - X-Spam_report: (-1.4 / 5.0 requ) BAYES_00=-1.9, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:258703 Archived-At: Interactively running `erts-run-test' provides different (i.e., incorrect) results as when the test is run in batch mode. I noticed this happens when a new "code" block is introduced. In the following situation, there are two ERTS tests, each one supplies its own "code" block associated with the test case. When I interactively attempt to execute the second test case (i.e., C-c C-c from within `erts-mode'), the test fails and the expected results match the output from the first case. I used the following two test files. `hi-test.el' is used to run the test in batch mode (emacs -batch -l ert -l hi-test.el -f ert-run-tests-batch-and-exit). This just runs the ERTS test cases. The second file (located relatively from `hi-test.el' in resources/hi.erts) contains the two test cases. hi-test.el: (require 'ert) (require 'ert-x) (ert-deftest hi-test-run () (ert-test-erts-file (ert-resource-file "hi.erts"))) resources/hi.erts: Code: (lambda () (fundamental-mode) (goto-char (point-max)) (insert "there\n")) Name: Hi there =3D-=3D Hi =3D-=3D Hi there =3D-=3D-=3D Code: (lambda () (fundamental-mode) (goto-char (point-max)) (insert "you\n")) Name: Hi you =3D-=3D Hi =3D-=3D Hi you =3D-=3D-=3D Running in batch mode, I get the following result: Running 1 tests (2023-03-26 18:10:33-0400, selector =E2=80=98t=E2=80=99) passed 1/1 hi-test-run (0.000384 sec) Ran 1 tests, 1 results as expected, 0 unexpected (2023-03-26 18:10:33-0400, 0.000493 sec) Running interactively in the `erts-mode' buffer, I get the following result: Test failure; result: Hi there