From patchwork Mon Mar 27 11:58:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom de Vries X-Patchwork-Id: 66945 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id E10033858417 for ; Mon, 27 Mar 2023 11:59:56 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E10033858417 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1679918396; bh=nPDHLQOQQ26or7eceGjSdeAEBCfl0giy4/wgWlG6w3Q=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=q9HWgyMjw/mddcqbWm0Fvr5jIpeIq+CGmD4b0zuPtMqZrduRg61gVZCLcBNiMgrXI S8zq9B3bIP4+1MNhVj2xmUS276cQbhJaq8EzHLS9c31dKdoLO+W3kU/4HDYxFunFb0 6DzNcMYsPJqo+OxDrNSxZ0oNb2hiMUWAZYK2z0vI= X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) by sourceware.org (Postfix) with ESMTPS id A37883858C2D for ; Mon, 27 Mar 2023 11:59:00 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A37883858C2D Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id D10501FDC1 for ; Mon, 27 Mar 2023 11:58:59 +0000 (UTC) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id BE36213482 for ; Mon, 27 Mar 2023 11:58:59 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id GGJYLQOFIWTCOgAAMHmgww (envelope-from ) for ; Mon, 27 Mar 2023 11:58:59 +0000 To: gdb-patches@sourceware.org Subject: [pushed 04/10] [gdb/testsuite] Fix quoting issue in gdb.base/index-cache.exp Date: Mon, 27 Mar 2023 13:58:52 +0200 Message-Id: <20230327115858.5950-5-tdevries@suse.de> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20230327115858.5950-1-tdevries@suse.de> References: <20230327115858.5950-1-tdevries@suse.de> MIME-Version: 1.0 X-Spam-Status: No, score=-12.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Tom de Vries via Gdb-patches From: Tom de Vries Reply-To: Tom de Vries Errors-To: gdb-patches-bounces+patchwork=sourceware.org@sourceware.org Sender: "Gdb-patches" For test-case gdb.base/index-cache.exp and remote host, this: ... lassign [remote_exec host sh "-c \"rm $cache_dir/*.gdb-index\""] ret ... gives us: ... Executing on host: sh -c rm /tmp/tmp.m3L7m2AVkL/*.gdb-index (timeout = 300) builtin_spawn -ignore SIGHUP sh -c rm /tmp/tmp.m3L7m2AVkL/*.gdb-index^M rm: missing operand^M Try 'rm --help' for more information.^M FAIL: gdb.dwarf2/per-bfd-sharing.exp: couldn't remove files in temporary cache dir ... Fix this using quote_for_host. Likewise in gdb.dwarf2/per-bfd-sharing.exp. Tested on x86_64-linux. --- gdb/testsuite/gdb.base/index-cache.exp | 2 +- gdb/testsuite/gdb.dwarf2/per-bfd-sharing.exp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gdb/testsuite/gdb.base/index-cache.exp b/gdb/testsuite/gdb.base/index-cache.exp index ec69f0f11ad..9f2f53053cb 100644 --- a/gdb/testsuite/gdb.base/index-cache.exp +++ b/gdb/testsuite/gdb.base/index-cache.exp @@ -245,7 +245,7 @@ test_cache_enabled_hit $cache_dir # Test again with the cache disabled, now that it is populated. test_cache_disabled $cache_dir "after populate" -lassign [remote_exec host sh "-c \"rm $cache_dir/*.gdb-index\""] ret +lassign [remote_exec host "sh -c" [quote_for_host rm $cache_dir/*.gdb-index]] ret if { $ret != 0 && $expecting_index_cache_use } { fail "couldn't remove files in temporary cache dir" return diff --git a/gdb/testsuite/gdb.dwarf2/per-bfd-sharing.exp b/gdb/testsuite/gdb.dwarf2/per-bfd-sharing.exp index 46284c2b775..6574f65df91 100644 --- a/gdb/testsuite/gdb.dwarf2/per-bfd-sharing.exp +++ b/gdb/testsuite/gdb.dwarf2/per-bfd-sharing.exp @@ -96,7 +96,7 @@ foreach_with_prefix first $methods { } } -lassign [remote_exec host sh "-c \"rm $cache_dir/*.gdb-index\""] ret +lassign [remote_exec host "sh -c" [quote_for_host rm $cache_dir/*.gdb-index]] ret if { $ret != 0 && $expecting_index_cache_use } { fail "couldn't remove files in temporary cache dir" return