From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: haj@posteo.de (Harald =?UTF-8?Q?J=C3=B6rg?=) Newsgroups: gmane.emacs.bugs Subject: bug#44317: [PATCH] cperl-mode: Make timeout tests more robust Date: Thu, 29 Oct 2020 22:09:29 +0100 Message-ID: <87lffo3fjq.fsf@hajtower> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="40487"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) To: 44317@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Oct 29 22:10:08 2020 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 1kYFBQ-000AR5-Gv for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 29 Oct 2020 22:10:08 +0100 Original-Received: from localhost ([::1]:52256 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kYFBP-0005AK-3K for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 29 Oct 2020 17:10:07 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:32910) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kYFBK-0005AE-2Q for bug-gnu-emacs@gnu.org; Thu, 29 Oct 2020 17:10:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:43551) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kYFBJ-0007xo-Os for bug-gnu-emacs@gnu.org; Thu, 29 Oct 2020 17:10:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kYFBJ-0001Rk-Iq for bug-gnu-emacs@gnu.org; Thu, 29 Oct 2020 17:10:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: haj@posteo.de (Harald =?UTF-8?Q?J=C3=B6rg?=) Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 29 Oct 2020 21:10:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 44317 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.16040057775520 (code B ref -1); Thu, 29 Oct 2020 21:10:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 29 Oct 2020 21:09:37 +0000 Original-Received: from localhost ([127.0.0.1]:55097 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kYFAu-0001Qx-So for submit@debbugs.gnu.org; Thu, 29 Oct 2020 17:09:37 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:41026) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kYFAt-0001Qq-8y for submit@debbugs.gnu.org; Thu, 29 Oct 2020 17:09:35 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:32890) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kYFAt-00059O-31 for bug-gnu-emacs@gnu.org; Thu, 29 Oct 2020 17:09:35 -0400 Original-Received: from mout02.posteo.de ([185.67.36.66]:54625) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kYFAq-0007vj-Om for bug-gnu-emacs@gnu.org; Thu, 29 Oct 2020 17:09:34 -0400 Original-Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id BA4B72400FD for ; Thu, 29 Oct 2020 22:09:29 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017; t=1604005769; bh=XHVnitE4GYziWTNPueOcpBOmzCrFVWL9sEamnLQyJWA=; h=From:To:Subject:Date:From; b=HKD8Je9OP23GI10TFOjun+GW0q8xDGkcOd7TYbsRfCOqg2HyLfyujz/rkVOERs9lk TqoTL7rSoLcaond/1uWxM34ybgaQZraEhG+lFERBU5F4vGOKI/VzAqOsFeW4v80Ks6 8MeOqgw0gLXEadocflySE5TEek2bLt4p4T3nEaT25ZnoL2iWiDdxEq80xkRVSEf3W8 yKt45hCvjwTewmynzujkjGBj1xpj1kNxNPzhuV31/a0DonKitF61wZq7018pEAjCRH mFFwEnVeCxRI1RMGhWK4i8z1P+8gO7gwdsiYFFrX2c5e8FadSa+bSi6TTjdOXKlZhS LaqHzo/QYtEhg== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4CMdNn2blVz6tmL for ; Thu, 29 Oct 2020 22:09:29 +0100 (CET) Received-SPF: pass client-ip=185.67.36.66; envelope-from=haj@posteo.de; helo=mout02.posteo.de X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/29 17:05:53 X-ACL-Warn: Detected OS = Linux 3.11 and newer [fuzzy] X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham 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" Xref: news.gmane.io gmane.emacs.bugs:191999 Archived-At: --=-=-= Content-Type: text/plain One of the tests in cperl-mode-tests.el starts an external Emacs process under timeout to check for an endless loop. It turns out that the timeout of 1 sec is rather short for slower machines. Thanks to recent ERT which now reports the run time in batch tests, I saw that it takes about 0.7 seconds on my machine, so I increased the timeout to 2 seconds. I also flagged the test as "expensive" and skip it under older Emacs versions (I run tests for Emacs version 26.1 and above). --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0001-cperl-mode-Make-timeout-test-more-robust.patch Content-Description: cperl-mode: Make timeout tests more robust >From b169038b5d619907f2513de944e4515bf7524d53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Harald=20J=C3=B6rg?= Date: Thu, 29 Oct 2020 22:06:56 +0100 Subject: [PATCH] cperl-mode: Make timeout test more robust * test/lisp/progmodes/cperl-mode-tests.el (cperl-mode-test-bug-10483): Increase the timeout to 2 seconds and mark the test as expensive. Also, suppress it for Emacs versions below 28, where the test times out though the function works quite fine in manual tests. --- test/lisp/progmodes/cperl-mode-tests.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/lisp/progmodes/cperl-mode-tests.el b/test/lisp/progmodes/cperl-mode-tests.el index e67678cf6b..9b486ae2e2 100644 --- a/test/lisp/progmodes/cperl-mode-tests.el +++ b/test/lisp/progmodes/cperl-mode-tests.el @@ -108,8 +108,10 @@ cperl-mode-test-bug-10483 without a statement terminator on the same line does not loop forever. The test starts an asynchronous Emacs batch process under timeout control." + :tags '(:expensive-test) (interactive) (skip-unless (not (getenv "EMACS_HYDRA_CI"))) ; FIXME times out + (skip-unless (not (< emacs-major-version 28))) ; times out in older Emacsen (let* ((emacs (concat invocation-directory invocation-name)) (test-function 'cperl-mode-test--run-bug-10483) (test-function-name (symbol-name test-function)) @@ -118,7 +120,7 @@ cperl-mode-test-bug-10483 (process-connection-type nil) runner) (with-temp-buffer - (with-timeout (1 + (with-timeout (2 (delete-process runner) (setq ran-out-of-time t)) (setq runner (start-process "speedy" -- 2.20.1 --=-=-=--