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: Mon, 30 Oct 2023 13:47:53 -0700 Message-ID: <877cn3kfba.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> <87pm0xf63w.fsf@debian-hx90.lan> 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="2103"; 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 Mon Oct 30 21:48:50 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 1qxZBq-0000KK-6Z for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 30 Oct 2023 21:48:50 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qxZBd-0002Fz-CN; Mon, 30 Oct 2023 16:48:37 -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 1qxZBY-0002F5-0S for bug-gnu-emacs@gnu.org; Mon, 30 Oct 2023 16:48:32 -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 1qxZBU-0000m9-VR for bug-gnu-emacs@gnu.org; Mon, 30 Oct 2023 16:48:31 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qxZC1-00009R-NK for bug-gnu-emacs@gnu.org; Mon, 30 Oct 2023 16:49:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Xiyue Deng Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 30 Oct 2023 20:49:01 +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.1698698916408 (code B ref 66782); Mon, 30 Oct 2023 20:49:01 +0000 Original-Received: (at 66782) by debbugs.gnu.org; 30 Oct 2023 20:48:36 +0000 Original-Received: from localhost ([127.0.0.1]:46740 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qxZBc-00006S-9f for submit@debbugs.gnu.org; Mon, 30 Oct 2023 16:48:36 -0400 Original-Received: from mail-pg1-x529.google.com ([2607:f8b0:4864:20::529]:48272) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qxZBa-00005Y-3I for 66782@debbugs.gnu.org; Mon, 30 Oct 2023 16:48:34 -0400 Original-Received: by mail-pg1-x529.google.com with SMTP id 41be03b00d2f7-5b980391d70so1477111a12.0 for <66782@debbugs.gnu.org>; Mon, 30 Oct 2023 13:48:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1698698875; x=1699303675; 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=4GLORL1r9kZ63xCQfadrpdEdxnxOU4UeqkGhid9PzTk=; b=eGNcRGH5rqXub17btacM1s2gnWHXh+nYovg5V+eYTXUbknpPuht9ZZEoMy9reb1DaI TDRb6NMtUMGKg5VNyAGBnv19Llof5yZFXO07AskBaEqc28j2d5LwUxTQBbwktxP6o2cf jlfF/eJIz4l9p+w/uo2ECSFcdrH4EFfHgGuHhe7svD2fQVIdIe/dNzIigyMvksWH6+Ot Y0SwL4YVWDFvdpqrORM+2gvv2Rw8gy8jbps1aTlkQvwNguBA2i57MmWK2l53j9StT068 bkG5te7Z+FBgYOypYGCr+NECPQ7pZP44/3pvFe/flfSG0FiEPelIsBLzn1RjyQm+DJfI wNTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698698875; x=1699303675; 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=4GLORL1r9kZ63xCQfadrpdEdxnxOU4UeqkGhid9PzTk=; b=R/CCYmPIL96e1EtzggFlm9cJTT2trTrZITEAAc2eKSxelb3UgErMpOMQT42KADFj7l Y4ENA+nrHjfkf15xSsRXpyJ5dQenhBepVwiohCpyJFA1zNsFr5mdZcu1CaK8iMh7QHei nGT/SKjzftNabbUfD27CrmnwKkzN43WtNdQtqhv39X0nl+JwZCiflm7cHvZ1Tit2Z35W +GeovKWsV+by2llxt+AZAXKfGurswUhAuodW8NDg1tDYU+Ad5zYOJCOZUFp82rDX1WRU v3F6rHSZjUSkhdvXS+EdNPEBxsWh/OchGIvNV8ltpsNSMCx83D2fZQRK2Y13D9wH6EbZ HgjA== X-Gm-Message-State: AOJu0Yxgnhm0MDC0YXx5CyqD1gQupybV7Tb+M1TJfqiuIk91PleHeieb KsDd3up3WFkKKq2fC1ZTCPZMM0ZXr44= X-Google-Smtp-Source: AGHT+IGMHRIVgnGjdX/JpzjDIxmH4C9a9bKjuTIRvkViEh/N66SBsy3vdZIJnX3CXaHndpZMIctCzA== X-Received: by 2002:a05:6a20:a483:b0:137:74f8:62ee with SMTP id y3-20020a056a20a48300b0013774f862eemr10000689pzk.18.1698698874610; Mon, 30 Oct 2023 13:47:54 -0700 (PDT) Original-Received: from debian-hx90 (2603-8000-a400-0cdc-b64c-ffef-aad7-acd1.res6.spectrum.com. [2603:8000:a400:cdc:b64c:ffef:aad7:acd1]) by smtp.gmail.com with ESMTPSA id a7-20020a17090abe0700b00277371fd346sm5479131pjs.30.2023.10.30.13.47.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Oct 2023 13:47:54 -0700 (PDT) In-Reply-To: ("Mattias =?UTF-8?Q?Engdeg=C3=A5rd?="'s message of "Mon, 30 Oct 2023 13:04:58 +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:273554 Archived-At: Mattias Engdeg=C3=A5rd writes: > 29 okt. 2023 kl. 22.53 skrev Xiyue Deng : > >> 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). > > I don't think ERT can forbid anyone from loading in the same .el file mul= tiple times because it's none of its business. Or did you have something el= se in mind? > It's not that loading the same .el multiple times that caused this error, but loading a module with `ert-deftest' and both .el modules are passed to batch ert processing which is common practice. But see below. > All in all, I'm not sure there is anything that we can do in Emacs right = now that would help, but if you have any concrete suggestions, do tell. > I understand if upstream don't want to complicate `require' logic too much. However I wonder whether it's OK to add warning if a required module has `ert-deftest' in it, so that it can help people identify that a `Test "foo" redefined' error is due to requiring other module instead of an actual duplicated test name. How does this sound? --=20 Xiyue Deng