From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id iThVF+KC8GrLrjQAWB0awg (envelope-from ) for ; Sun, 08 Nov 2026 09:10:42 -0500 Authentication-Results: simark.ca; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=dYY2zir/; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 5AA45378002; Sun, 08 Nov 2026 09:10:42 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-2.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED, RCVD_IN_VALIDITY_RPBL_BLOCKED,RCVD_IN_VALIDITY_SAFE_BLOCKED autolearn=ham autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [38.145.34.32]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id C6DE01E023 for ; Sun, 08 Nov 2026 09:10:41 -0500 (EST) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 8857F4BA23D1 for ; Sun, 8 Nov 2026 14:10:40 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8857F4BA23D1 Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=dYY2zir/ Received: from mail-wm1-x336.google.com (mail-wm1-x336.google.com [IPv6:2a00:1450:4864:20::336]) by sourceware.org (Postfix) with ESMTPS id A3D304BA23DD for ; Sun, 8 Nov 2026 14:10:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A3D304BA23DD Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org A3D304BA23DD Authentication-Results: sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::336 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1794147008; cv=none; b=JmJ425NnIN5tz0VcniaQCAUgGVUbk6Oq1PDXhfcso5fxwllJXenDNsTorymljjbgbJdjtQLfzYn1DHmLZTlUZAyk+voaVuxs/8ocmajoRbLNIb6JYr10fc+TVLZ2uk5XN4FWxmfCylog3pkLs6NzvIzV/JXp0ko4YYWlTLdOhSA= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1794147008; c=relaxed/simple; bh=1oPRlMYtqW7MGh4mn1vzLy1HXNi6J8EWW7InBsXe6bg=; h=DKIM-Signature:To:Date:Message-ID:MIME-Version:From:Subject; b=bSBp6KsmlhL3RDooWQBFUkjoINzxpVDnHxLKZk92EzTX5+1OA2wAwd1ot3EAolTwPTkaHQlMhMmik34yoKUwC1JAenCZSN6UXiMWY7gVH5sUKhaWbsZkQ8IzkNfz9Cv+Yl8GKEBIKYm3cQm6KnYBoDu2EE/C086vJM5ib8NYvWg= ARC-Authentication-Results: i=1; sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=dYY2zir/ DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A3D304BA23DD Received: by mail-wm1-x336.google.com with SMTP id 5b1f17b1804b1-4afe2d546f9so1105365e9.3 for ; Sun, 08 Nov 2026 06:10:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1794147007; x=1794751807; darn=sourceware.org; h=subject:from:content-transfer-encoding:content-type:mime-version :message-id:date:cc:to:from:to:cc:subject:date:message-id:reply-to :content-type; bh=NZoTuOuABtQc622n/mJR6DmAllPnC3qFbUvo4J//GKQ=; b=dYY2zir/ba7m6B742zTfsNo8sxYWrUUI5F2vSL62Onz0DNOfkzWmwiorukmvLcddA7 0aIX4FHvMjXjqMH5IKEdMoVM4FtsHLbYTmqg8rBd55geffjjQRQX8x7n2Q7+au2wRBCw 9jrpUJQZyvW7YKQQgsoTsgLKnHWVniy9mH4kVzhIHOIHixpNWEEHHAbDSDe5ufRy7xTL uEnzpofMp6LQIBhlaKwJHDQnTkL93DYEQKOrnBPq/yw7/D/jWqEbbl7SX46l3NxjSxGN FpO9/tH7efZia0LJaujLgRNiySt8j1PZU36or26C/6w88M/y94mRNxMvFgV6J6FsOhlV DFaA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1794147007; x=1794751807; h=subject:from:content-transfer-encoding:content-type:mime-version :message-id:date:cc:to:x-gm-gg:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to:content-type; bh=NZoTuOuABtQc622n/mJR6DmAllPnC3qFbUvo4J//GKQ=; b=IFDECUO8F1KpFxlmPguadG4N7NT2Ev/mA8KCMyDRogJFJsReI9kSry4hZKXpOmMtIj f/Ui51hzPdx4AiTHAyLKDShX1aMJIga94QQOxXUu86S0swtt6mEw0lD6yVPG4hS1bb+a AY3ch/LukGOhn2GBxYpoN4mjPN29mMZ8WNbX5gNSRHftu5v9X3BRMY9WhLUVCr1c8cbI R21lzBhKgZG5bsrGLpwZm/7MCy0ODKN6tYVV1WdlcUYUIk/hUxqihW77RbXdnQIJK1sG rHsBNr3QLd56gkDONEED7kNg2r4GtZWnxvF+VP55zJCSh0QBt5s4RsUnJ88OThmeAx5E oZjA== X-Gm-Message-State: APuU4Z/VoH0NcJIJcIUBRWazc26HagbNUoKo3hkkD6pbXVXAZ7tFhn8f NChnINnYKuW0vUC7bDrxqjMpJ10jDpRYMEgMF6r5uujqBF4st65HwiPQLM4C3A== X-Gm-Gg: AYBFou11V+TAwxwCqkIbVFV7NfPYOWJ12+5gPku2Wo8nOXA6kQCoelkCP+Rbr5vvk2E KI3V0YOpgPEE8+Ja1g1MJqiFxRn8biw5nnIyZa+BCYybtry5eh+dpfIAffSPhLn6Z2Ft4MddcwF n2cTufXN6JGH0SAAL7IZ5dZ5uJ4G08ufmGqXcOXO2hwHODqerHp88St8rTk+1FMtXz9p1pVoWRy pu0b2o2ykvSuvxqPfjUCZwz9daWO8Xwb5S3DTI+2y8n7lwVnEYbxlYTtG1mNdaStTXWFDGxoxWv O8eT4W5HK3qMNjsWNsyyaAAolpkwZVeA4+zmI/7g/J8SZrn0D2pfw8Bg0GkVbbs3thfr4ekavEF OwwipokULYHGtbB82kfywdU5WSxSMTFdZmZHvkn6eRfW/rrkn/SlMkASNDZWAEKTWV1ZTGeRO7x s8cHW4QO3RtSXjpkXHkoTEeW5kBLVoU48d0Ok27t9Ws7r7ZzMDFCok/b1S3IFIJ8fspfeNYUwlw IpkrwHWxlaoAxxA5QtBdft4vIi/cwMdq3xj8/FCz0AKbq4tUAyKA2LBO+KbRZCBHcybqTXNKO1I Yqbv595KUdTaY3PIwUeBNCWd2dcBkWtx+gveHxOL32PvOOnmsRFhoA== X-Received: by 2002:a05:600c:8b58:b0:4a1:fe26:24f0 with SMTP id 5b1f17b1804b1-4b963c6bbb5mr24807425e9.20.1794147007335; Sun, 08 Nov 2026 06:10:07 -0800 (PST) Received: from [127.0.1.1] ([45.150.175.155]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4b90ee249d3sm64142595e9.7.2026.11.08.06.10.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 08 Nov 2026 06:10:06 -0800 (PST) To: gdb-patches@sourceware.org Cc: Tom de Vries Date: Sun, 08 Nov 2026 14:09:53 +0000 Message-ID: <179414699302.1085057.4969927483463461350@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Josip Seketa Subject: [PATCH] gdb/testsuite: accept any shell's error in non-existing-program.exp X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org With startup-with-shell, gdbserver runs the program through $SHELL, and the test expects the error that a POSIX shell or bash prints for a missing program: exec: non-existing-program: not found Other shells word it differently. With SHELL=/usr/bin/zsh: zsh:1: command not found: non-existing-program During startup program exited with code 127. Exiting FAIL: gdb.server/non-existing-program.exp: gdbserver exits cleanly Accept any line that names the program, followed by the exit with code 127. --- Tested on x86_64 GNU/Linux with native-gdbserver and native-extended-gdbserver: passes with SHELL set to /bin/sh, bash, zsh and fish; without this patch it fails with zsh and fish. I have no FSF copyright assignment. This is my own work, not my employer's. gdb/testsuite/gdb.server/non-existing-program.exp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gdb/testsuite/gdb.server/non-existing-program.exp b/gdb/testsuite/gdb.server/non-existing-program.exp index 34a9f047a24..6729981cac6 100644 --- a/gdb/testsuite/gdb.server/non-existing-program.exp +++ b/gdb/testsuite/gdb.server/non-existing-program.exp @@ -47,8 +47,10 @@ expect { exp_continue } # Likewise, but with startup-with-shell enabled, which is the - # default behavior. - -re "stdin/stdout redirected.*exec: non-existing-program: not found\r\nDuring startup program exited with code 127\.\r\nExiting\r\n" { + # default behavior. Each shell words the error its own way, for + # example "exec: non-existing-program: not found" or "command not + # found: non-existing-program", over one line or more. + -re "stdin/stdout redirected.*non-existing-program\[^\r\n\]*\r\n.*During startup program exited with code 127\.\r\nExiting\r\n" { set saw_exiting 1 exp_continue } -- 2.56.0