From patchwork Thu Feb 29 15:49:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Aktemur, Tankut Baris" X-Patchwork-Id: 86596 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 ABEE43858416 for ; Thu, 29 Feb 2024 15:49:46 +0000 (GMT) X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.18]) by sourceware.org (Postfix) with ESMTPS id EAE793858C52 for ; Thu, 29 Feb 2024 15:49:18 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org EAE793858C52 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=intel.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org EAE793858C52 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=198.175.65.18 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1709221763; cv=none; b=xoVchTVJJeOrW7tvFTitUtD9Fph+hTdRFn2NX8jwqnYCf2oGcjifFtZaVGzfr3uaongR0x95vpSzvESpD/YyNkfrmgnDf+lSkxlJFP+CwsNB79cypKbcBqYBccoDLMcQLqehLcZ3KdxiSTCBe0KxAz3VrAyH3cWm4gK1hr+fH0c= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1709221763; c=relaxed/simple; bh=TXN5lJUMv3KTKPz9PfDSoAa8GyVQ/dF/CIIla0clxW8=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=Tf/LN3ERJ29rfvS69slehAx1RYJEH4djmh+E0YNsCJU0XaMKIQJ1X7gizKVENPeORbEOEGUlCTkf24NGAPilNF6n4y+E5N2QnaiRa6jguuHNE2s8a8XugPsL+j7cHpZAXt9kSmZ59QGBm5bK6zdAnKykQCawmhDjHv3SmZRuNdA= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1709221759; x=1740757759; h=from:to:subject:date:message-id:mime-version: content-transfer-encoding; bh=TXN5lJUMv3KTKPz9PfDSoAa8GyVQ/dF/CIIla0clxW8=; b=RCj+BHJM4Ez+oJgne/6dAkVSjDa7K12NKSIcZFT3U04O7FW8vbUAGUlV aae9I6U5r0Hx0lwaqrHR4jkvOMZnpavDQpK8HUtCJjkmphR5OLo4KjCaq hSwdY8TLDHAo/MOEgIHQCfq9YyaS/a89ZYULPO5WHdHor3bavPok/i6HM D0uoIby3Pig29Lmb47vrPkwAO30OVIADRWB3gjZV8C75W0CnUy1u3V3y2 /EmxpFj5DfT5Eg1BfN23cFndVXic+4V6HqepFV9GK3pwJ3TUSrGCkhWW1 k7IZtaZrXw4yhrmv4j+DymTX6f1jYGXjHzD2vPX0ofPYIWAUNE5XWy1Ox g==; X-IronPort-AV: E=McAfee;i="6600,9927,10999"; a="3819302" X-IronPort-AV: E=Sophos;i="6.06,194,1705392000"; d="scan'208";a="3819302" Received: from orviesa009.jf.intel.com ([10.64.159.149]) by orvoesa110.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Feb 2024 07:49:17 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.06,194,1705392000"; d="scan'208";a="7902900" Received: from gkldtt-dev-004.igk.intel.com (HELO localhost) ([10.123.221.202]) by orviesa009-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Feb 2024 07:49:17 -0800 From: Tankut Baris Aktemur To: gdb-patches@sourceware.org Subject: [PATCH v2 1/2] testsuite, mi: fix indentation in get_mi_thread_list Date: Thu, 29 Feb 2024 16:49:05 +0100 Message-Id: <20240229154906.3354860-1-tankut.baris.aktemur@intel.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Spam-Status: No, score=-9.3 required=5.0 tests=AC_FROM_MANY_DOTS, BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE 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.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces+patchwork=sourceware.org@sourceware.org The `get_mi_thread_list` procedure's body is incorrectly indented. Fix it. One line is still too long, but we don't care to break it. The next patch will change it. --- gdb/testsuite/lib/mi-support.exp | 58 ++++++++++++++++---------------- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/gdb/testsuite/lib/mi-support.exp b/gdb/testsuite/lib/mi-support.exp index b3a27efb155..33a3a71b396 100644 --- a/gdb/testsuite/lib/mi-support.exp +++ b/gdb/testsuite/lib/mi-support.exp @@ -1953,40 +1953,40 @@ proc mi_run_inline_test { testcase } { } proc get_mi_thread_list {name} { - global expect_out + global expect_out - # MI will return a list of thread ids: - # - # -thread-list-ids - # ^done,thread-ids=[thread-id="1",thread-id="2",...],number-of-threads="N" - # (gdb) - mi_gdb_test "-thread-list-ids" \ - {.*\^done,thread-ids={(thread-id="[0-9]+"(,)?)+},current-thread-id="[0-9]+",number-of-threads="[0-9]+"} \ - "-thread_list_ids ($name)" + # MI will return a list of thread ids: + # + # -thread-list-ids + # ^done,thread-ids=[thread-id="1",thread-id="2",...],number-of-threads="N" + # (gdb) + mi_gdb_test "-thread-list-ids" \ + {.*\^done,thread-ids={(thread-id="[0-9]+"(,)?)+},current-thread-id="[0-9]+",number-of-threads="[0-9]+"} \ + "-thread_list_ids ($name)" - set output {} - if {[info exists expect_out(buffer)]} { - set output $expect_out(buffer) - } + set output {} + if {[info exists expect_out(buffer)]} { + set output $expect_out(buffer) + } - set thread_list {} - if {![regexp {thread-ids=\{(thread-id="[0-9]+"(,)?)*\}} $output threads]} { - fail "finding threads in MI output ($name)" - } else { - pass "finding threads in MI output ($name)" - - # Make list of console threads - set start [expr {[string first \{ $threads] + 1}] - set end [expr {[string first \} $threads] - 1}] - set threads [string range $threads $start $end] - foreach thread [split $threads ,] { - if {[scan $thread {thread-id="%d"} num]} { - lappend thread_list $num - } + set thread_list {} + if {![regexp {thread-ids=\{(thread-id="[0-9]+"(,)?)*\}} $output threads]} { + fail "finding threads in MI output ($name)" + } else { + pass "finding threads in MI output ($name)" + + # Make list of console threads + set start [expr {[string first \{ $threads] + 1}] + set end [expr {[string first \} $threads] - 1}] + set threads [string range $threads $start $end] + foreach thread [split $threads ,] { + if {[scan $thread {thread-id="%d"} num]} { + lappend thread_list $num + } + } } - } - return $thread_list + return $thread_list } # Check that MI and the console know of the same threads.