From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jim Porter Newsgroups: gmane.emacs.bugs Subject: bug#62578: 30.0.50; [PATCH] Add regression tests for synchronous processes in Eshell Date: Sat, 1 Apr 2023 00:16:38 -0700 Message-ID: References: <8eeb9d54-1ac4-485d-f888-0f89217fc0ca@gmail.com> <83355k16gr.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="33516"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 62578@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Apr 01 09:17:16 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 1piVUB-0008aO-IW for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 01 Apr 2023 09:17:15 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1piVU0-0001Lp-Vm; Sat, 01 Apr 2023 03:17:05 -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 1piVTz-0001LW-Nc for bug-gnu-emacs@gnu.org; Sat, 01 Apr 2023 03:17:03 -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 1piVTz-0003Ai-9m for bug-gnu-emacs@gnu.org; Sat, 01 Apr 2023 03:17:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1piVTy-0001rL-H8 for bug-gnu-emacs@gnu.org; Sat, 01 Apr 2023 03:17:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Jim Porter Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 01 Apr 2023 07:17:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62578 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 62578-submit@debbugs.gnu.org id=B62578.16803334067111 (code B ref 62578); Sat, 01 Apr 2023 07:17:02 +0000 Original-Received: (at 62578) by debbugs.gnu.org; 1 Apr 2023 07:16:46 +0000 Original-Received: from localhost ([127.0.0.1]:35318 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1piVTi-0001qd-9F for submit@debbugs.gnu.org; Sat, 01 Apr 2023 03:16:46 -0400 Original-Received: from mail-pl1-f177.google.com ([209.85.214.177]:38592) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1piVTh-0001qN-8Q for 62578@debbugs.gnu.org; Sat, 01 Apr 2023 03:16:45 -0400 Original-Received: by mail-pl1-f177.google.com with SMTP id ja10so23541535plb.5 for <62578@debbugs.gnu.org>; Sat, 01 Apr 2023 00:16:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1680333399; x=1682925399; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:mime-version:date:message-id:from:to:cc :subject:date:message-id:reply-to; bh=4V0nKdknrxRz6oLM970Uiitno/73pdiRjfr1cJFYh/4=; b=LaOtRZXfJpGvy64Krje+cqE6pGr8CXiaAwSAxUj/grU+QWYVEEdqoZyyYy+0+GdzGe SGBZaLtlSYKQOKzH+UrEvC4OZQASGu4qcu2lt/pSeUBMm7c3UcXONIlm2gzlfdRFMXPn YgDP4D4md8VT1qI+VpNj3wb1bbw3BScQlyPWtfsmqMG80KwWUyJ0cPkDC+G34PE41JMK /ECoaOj+mkLS5D+y9gUmt10zopmLKPoDL6+qUfU/hnoDTRuiR3zKmJ/Eoyj/I0mKbaBz 9mq62FQo+S4FXpvDwENTGsXFCTOTHI5ZdOUSmoIYfutM5RnHmnbKQSHLnicHXVK5sF0J Zbbw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680333399; x=1682925399; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=4V0nKdknrxRz6oLM970Uiitno/73pdiRjfr1cJFYh/4=; b=dKubTYZXyUGegHbfBiFRAhpq5CVwAYOOvvlqHlAtziOhh76IyVhDdcZsWd28F24gEa NssmsBbgIFFzvzHCR0apHPETzc7D7b8urniNwofk9LIzLdSYoAX/V/xkzDwhuTTLq4dJ vqzXEWpavSgz2rcbuZCmJ/r9C21zsHCo5bjZZF7z3cFbjVVDwC0YzN4XBndnZZRYQZk6 SaBl5BkUT+TYqBKIQodOfUThNEaIX/a2nSNAP+0s2MDoTAAVG/GmqwZ4JLMhqUyWNnKh Z26N3uahSlBTMDATNMa2EiC3FXvaa+qtXQKbOWXwIklnHQbeOV7wIWAohkHhlWAG/GeQ G5XA== X-Gm-Message-State: AAQBX9cA3q0JubzGslUQNAMXHEtLVqGUCwPmMauLX2hHqP40mC1Ar1se jsFMMpNjRk3jplZf3hyRN57iZG6qbHg= X-Google-Smtp-Source: AKy350aH34pk8uFMeeb1NF7WacAss8oFq3yUeQ9W3cmYUEPXLPLzb5XcFbCVnK8yY8uvNIcQRp5GBg== X-Received: by 2002:a17:90b:1c8b:b0:234:d78:9b4c with SMTP id oo11-20020a17090b1c8b00b002340d789b4cmr32625282pjb.18.1680333398694; Sat, 01 Apr 2023 00:16:38 -0700 (PDT) Original-Received: from [192.168.1.2] (cpe-76-168-148-233.socal.res.rr.com. [76.168.148.233]) by smtp.googlemail.com with ESMTPSA id g11-20020a17090a300b00b00233e860f69esm6047531pjb.56.2023.04.01.00.16.38 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 01 Apr 2023 00:16:38 -0700 (PDT) Content-Language: en-US In-Reply-To: <83355k16gr.fsf@gnu.org> 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:259031 Archived-At: On 3/31/2023 11:07 PM, Eli Zaretskii wrote: >> Date: Fri, 31 Mar 2023 21:41:09 -0700 >> From: Jim Porter >> >> +(ert-deftest esh-proc-test/synchronous-proc/simple/interactive () >> + "Test that synchronous processes work in an interactive shell." >> + (skip-unless (executable-find "echo")) > > This will always skip on MS-DOS, since "echo" is not available as an > external program OOTB, only if GNU Coreutils are installed. And even > if Coreutils _are_ installed, a command that invokes "echo" will most > probably invoke the shell builtin instead. My main goal here is to test synchronous subprocesses on platforms *other than* MS-DOS, since these new tests aren't really necessary on MS-DOS itself: there are plenty of existing Eshell tests that create processes, and they'd *all* use synchronous subprocesses on MS-DOS. As for calling a shell builtin, Eshell should translate "*echo" to "/path/to/echo" (or "C:/path/to/echo.exe") before calling it, so it shouldn't use a shell builtin here. You're right though that the tests probably require GNU Coreutils to be installed (this is also true of quite a few existing Eshell tests though). >> + (skip-unless (and (executable-find "echo") >> + (executable-find "rev"))) > > Likewise here: "rev" is not expected to be available on MS-DOS. To make this work in more places, I could switch "rev" to something that's actually in GNU Coreutils. Maybe "wc". > I think you need to rethink these tests in a way that uses different > commands. My suggestion is to use the Emacs executable, since that is > always available when running these tests. Since these tests are meant to check the "synchronous subprocess" code in Eshell on non-MS-DOS platforms, I'd say it's ok. However, I can change my patch if you prefer. I could either: 1) Add a comment to the tests explaining that they're just meant to simulate some of MS-DOS's limitations on non-MS-DOS systems, or 2) Rework these tests so they work the same on both MS-DOS and other systems. Personally, I lean softly towards (1), partly because the Eshell test suite probably breaks in quite a few other places on MS-DOS anyway. However, it shouldn't be too hard to do (2) instead. What do you think?