From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Xiyue Deng Newsgroups: gmane.emacs.bugs Subject: bug#66782: 29.1; ERT tests report test redefined depending on loading sequence Date: Sun, 29 Oct 2023 14:53:23 -0700 Message-ID: <87pm0xf63w.fsf@debian-hx90.lan> References: <87msw393z8.fsf@debian-hx90.lan> <83y1fncl4k.fsf@gnu.org> <87o7gjgk65.fsf_-_@debian-hx90.lan> <83pm0zcc25.fsf@gnu.org> <87jzr7gfso.fsf@debian-hx90.lan> <83jzr7c74y.fsf@gnu.org> <87cywzge42.fsf@debian-hx90.lan> <83h6mbc5ss.fsf@gnu.org> <962518D0-36A0-4626-9652-0A0A977DBB2C@gmail.com> <87wmv6fnrn.fsf@debian-hx90.lan> <121E7FF6-4D07-40D5-A2D9-1B108605A117@gmail.com> 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="24371"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Eli Zaretskii , 66782@debbugs.gnu.org To: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Oct 29 22:54:48 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 1qxDk7-00069J-KR for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 29 Oct 2023 22:54:47 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qxDjr-0001BQ-V1; Sun, 29 Oct 2023 17:54:31 -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 1qxDjp-0001Aj-PW for bug-gnu-emacs@gnu.org; Sun, 29 Oct 2023 17:54:30 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qxDjp-0005cq-H4 for bug-gnu-emacs@gnu.org; Sun, 29 Oct 2023 17:54:29 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qxDkM-0004xY-84 for bug-gnu-emacs@gnu.org; Sun, 29 Oct 2023 17:55:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Xiyue Deng Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 29 Oct 2023 21:55:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 66782 X-GNU-PR-Package: emacs Original-Received: via spool by 66782-submit@debbugs.gnu.org id=B66782.169861644618980 (code B ref 66782); Sun, 29 Oct 2023 21:55:02 +0000 Original-Received: (at 66782) by debbugs.gnu.org; 29 Oct 2023 21:54:06 +0000 Original-Received: from localhost ([127.0.0.1]:43643 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qxDjS-0004w3-6G for submit@debbugs.gnu.org; Sun, 29 Oct 2023 17:54:06 -0400 Original-Received: from mail-oo1-xc29.google.com ([2607:f8b0:4864:20::c29]:57546) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qxDjP-0004vZ-Rv for 66782@debbugs.gnu.org; Sun, 29 Oct 2023 17:54:04 -0400 Original-Received: by mail-oo1-xc29.google.com with SMTP id 006d021491bc7-581fb6f53fcso2467846eaf.2 for <66782@debbugs.gnu.org>; Sun, 29 Oct 2023 14:53:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1698616405; x=1699221205; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=hha5T1sCNCcrAH07N8SgcDvfHby5h4G3dH4Uw8dVFZs=; b=gBPYejNwz+FaFy4oO6QBAwPxm2BrvgZ6Nuww5iKu1Azp+/U6xZ9oM/oBvd8AFeYmKc LSWl7/SQZ7E8dRa/4F/WiHSCHXIRdXhvV21w6ow2LHxILMtTNaNW31EZ+cKEak16Y4hG x+RLbaOCJEMH77obEOTt3MolCwFcSFVPB6B1SkN7/9l1mqXg16FJoNqEiSl/335lcfcK etvuoAJMILc7ElZps984RxdIle9LYZDk/sjDm5xKz+TmVh59jr3hXY/j7mAf5DaOptPH j94W4AbCVmoC+2z+qTfgXrw2cjCrZujTIW2McmTnMNRT3zQUkqziFVSzIXjk8zN6X1uW CvkA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698616405; x=1699221205; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=hha5T1sCNCcrAH07N8SgcDvfHby5h4G3dH4Uw8dVFZs=; b=iDz9YN3HwIeojNj1vNuQZubI2qmcGdeZSieRBo9PkrBNtd3riB6wDJ42Y8+ybdKKpG AdPsV8zdKieSmVlk6vPBh4+41jYuG8P1sVwKHJrdBvGARk+anSNwk2rKzNBAsYwMkBR4 lC3Z1Yi6Afk6Bfd8SbwfF0JORUlFyQc5anzCS09NsXIqiKDHOaMTUi0G5Fh63Nles1lh Gx/j30U7n0Pjr3Q4Qc5f+XDp+OtITTpT9uC5pcfURO5Ej4vc2nth3FqKQ3P/V6kB+Ven eyZ5zoeU8Lijd/cKwAt5o3zYvDgALnIOcjRSBhBQ+ZyDs3VHTx6o6OiSbUe2I9dLASL0 +tpw== X-Gm-Message-State: AOJu0YwT0panOsUq4PpB1kd42+5fvtP5laDPB+cnNEs6HQ1YcunRDkYx 0zRUGQ6/yxoqa41mvHeR/gi9/zkzGRc= X-Google-Smtp-Source: AGHT+IFSXbzMKUwGRiPliuSHsOnlFxAvGPVzHNV5qeBPXksWkYlPhClVQnXmluR4BDp1iVTWP07PIQ== X-Received: by 2002:a9d:6659:0:b0:6c4:c3ac:a9dc with SMTP id q25-20020a9d6659000000b006c4c3aca9dcmr9762944otm.21.1698616405023; Sun, 29 Oct 2023 14:53:25 -0700 (PDT) Original-Received: from debian-hx90 (2603-8000-a400-0cdc-6fc2-27a4-f474-9a99.res6.spectrum.com. [2603:8000:a400:cdc:6fc2:27a4:f474:9a99]) by smtp.gmail.com with ESMTPSA id m12-20020a17090a858c00b0027360359b70sm6357316pjn.48.2023.10.29.14.53.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 29 Oct 2023 14:53:24 -0700 (PDT) In-Reply-To: <121E7FF6-4D07-40D5-A2D9-1B108605A117@gmail.com> ("Mattias =?UTF-8?Q?Engdeg=C3=A5rd?="'s message of "Sun, 29 Oct 2023 13:09:11 +0100") 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:273529 Archived-At: Mattias Engdeg=C3=A5rd writes: > 28 okt. 2023 kl. 23.19 skrev Xiyue Deng : > >> To clarify one of my >> original proposals: if it makes no sense for a `ert-deftest' to depend >> on other `ert-deftest', I would say there is no reason for such a >> dependency, and people should move reusable components to a helper >> module instead. > > There is no reason for one `ert-deftest` to make use of another, but was = that > the case here? I interpreted it as a test suite that spread its `ert-deft= est` > definitions over multiple .el files which isn't necessarily a bad way of > organising them. > As they just use eask to run all tests under folder test in their Makefile[1], I don't think spreading definitions is what they are doing. To clarify, I think instead they are requiring lsp-integration-test just because they want use the `lsp-test-wait' macro[2] in lsp-clangd-test[3][4][5], which could have been done by putting those macros in a separate file and requiring that from both tests. > As said before, there is little sense in including the same individual te= sts from multiple 'root' .el files since that would run them more than once. > > Perhaps that is what you meant? If so, please forgive me for the pedantry. > Exactly, and no worries. As far as I know, there is no practical use for a test case to depend on another test case in any language I worked with as a test case provides no reusable component. On the other hand, there are alternatives that makes more sense to do what they (e.g. lsp-mode) are doing. Again, IMHO I think it makes sense for ERT not to support it or to even forbid it. Doing this also avoids such misleading error message I was reporting, which got triggered depending on the loading sequence which may make test suites flaky (as the loading sequence is not deterministic). [1] https://github.com/emacs-lsp/lsp-mode/blob/master/Makefile#L42 [2] https://github.com/emacs-lsp/lsp-mode/blob/master/test/lsp-integration-= test.el#L51 [3] https://github.com/emacs-lsp/lsp-mode/blob/master/test/lsp-clangd-test.= el#L109 [4] https://github.com/emacs-lsp/lsp-mode/blob/master/test/lsp-clangd-test.= el#L118 [5] https://github.com/emacs-lsp/lsp-mode/blob/master/test/lsp-clangd-test.= el#L141 --=20 Xiyue Deng