From patchwork Thu Feb 1 10:08:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Burgess X-Patchwork-Id: 85121 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 4139D385840A for ; Thu, 1 Feb 2024 10:08:59 +0000 (GMT) X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 472993858C62 for ; Thu, 1 Feb 2024 10:08:31 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 472993858C62 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 472993858C62 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1706782113; cv=none; b=xOAYqe/GQaZmkc5XXjAdLoRLyzy1SadXgZVbT1F9CoCa9NY1M4zELv7XVsJLAokP9TTrxqy1S1cRRGILjrc9w5vkxFSIzdNdN/pxuArIPubofjKaqjksJ0pCheC+DKGItFoO9ykkBE0w5QmMhcM73JSDevKJTP+4jeYIKy/xYYE= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1706782113; c=relaxed/simple; bh=5o9Va524akokdMevboksB9Pom9WfMnlNQoyEZ/hMvxc=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=kkgvUGEzJ4fVGGIIMbwdnqQ/K6yXyu9GZKWZ5y7yeGj/QtuWO6eNrz4olZ4gMx9Igpc13w8r2p1PvLPjFaoXNuSMEtFd7Ieib42UVWrbuBHHspBpEbOiOTkjU0MUH61CJZpYrH3x9pM9bUOplb6RZeyL8chs7FDkC3KVNuGF3bA= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1706782110; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XL52t3NC/1nAmV9wkjGtYNZdyzlva+h4iKFK5SI44gE=; b=Uop/jlJhMAUIbrfd2hsA2jfuTG3A5ZUtRlc0dOSqlkKIoSmeMGAK97/td38ct7hnOYaqfK g8zE4mkuyVN/D7qgz1TeLy4DIXUf0zn5if+cOEPeN2FKXuSjjiRub3rTf+1M2TQa8CQYP+ jF0NaYZkM8aIHhm9C4mZ6f0atEF254Y= Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-227-CSCy6eKFPq2ILJ_ko0iH3A-1; Thu, 01 Feb 2024 05:08:29 -0500 X-MC-Unique: CSCy6eKFPq2ILJ_ko0iH3A-1 Received: by mail-wm1-f70.google.com with SMTP id 5b1f17b1804b1-40fb3b64751so4224465e9.1 for ; Thu, 01 Feb 2024 02:08:29 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706782108; x=1707386908; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=XL52t3NC/1nAmV9wkjGtYNZdyzlva+h4iKFK5SI44gE=; b=wzR4RHhRSg6i8ov5QrCj4IQzY2qgHFW2rG9mR/P2fPAxbC0y1gJjCQ9171fd2Mme6e 9KELqDoaDjKj/vCkFJaqER5gs05TFU3AE2woPgRBIeu7PcX+WHrcqm/9ZawKw6vgUAT8 T7sw8eZ0CnXA8MxFwDIALxzUq9mj5zgv/FQmZmtHqk1n5uikG3tvjd84Z4R7GuylX3wV ODhOoEvxptmptFbrl2S+yVs8yR9iRscKS43zaw9Jfxzs6pVFxm2htPOj36AYJJW7bwZM sgYvuzt+dKh+BSyVQxEs7ZmxyFdc512roKSB7z+ybce7Tto9c8IeoURQzVEPPFESsQlg bOHA== X-Gm-Message-State: AOJu0YzoVGjnPNE0IP0F41NZbDV2J/+Uwpwyl5Nab1DXIwQ3q4rBwqfF r/3nIJhtd7/7XhdG6EWaM6eTpI2Xrk8TtxU1iGIabjf5Q62n0pm4B25s2UwG5+qyAuT9B4sm19z 9HY/MGfgg/C2oN/UKgYe9Q0VwLmh1DSZv6pqg+DLEuTmccPFCihFLuk3lbgzMKaav17LAqrzO7J M/OZ9GL61TGkcUFEtV3/RPAebrJRens1c93vm2KFy9CIY= X-Received: by 2002:a5d:6d04:0:b0:33b:17c5:f25c with SMTP id e4-20020a5d6d04000000b0033b17c5f25cmr751149wrq.44.1706782107990; Thu, 01 Feb 2024 02:08:27 -0800 (PST) X-Google-Smtp-Source: AGHT+IGzi/mA3pD7DVLvdTf7M4OyyBO+NvYJ3kO1qWwWV8jZ5hBj4w4jdk2Spoyv+OPsE2j9x471ZQ== X-Received: by 2002:a5d:6d04:0:b0:33b:17c5:f25c with SMTP id e4-20020a5d6d04000000b0033b17c5f25cmr751119wrq.44.1706782107501; Thu, 01 Feb 2024 02:08:27 -0800 (PST) Received: from localhost (185.223.159.143.dyn.plus.net. [143.159.223.185]) by smtp.gmail.com with ESMTPSA id r15-20020adfda4f000000b00337d9a717bcsm15638676wrl.52.2024.02.01.02.08.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Feb 2024 02:08:27 -0800 (PST) From: Andrew Burgess To: gdb-patches@sourceware.org Cc: Andrew Burgess Subject: [PUSHED] gdb/testsuite: fix duplicate test names in gdb.base/cond-eval-mode.exp Date: Thu, 1 Feb 2024 10:08:23 +0000 Message-Id: <025f70c8614ecd7293940dcf03b2691adf586031.1706782072.git.aburgess@redhat.com> X-Mailer: git-send-email 2.25.4 MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-12.7 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, 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 Fix some duplicate test names in gdb.base/cond-eval-mode.exp when running with native-gdbserver or native-extended-gdbserver board files. I've just added some 'with_test_prefix' blocks to make the test names unique, there should be no change in what is tested after this commit. --- gdb/testsuite/gdb.base/cond-eval-mode.exp | 104 ++++++++++++---------- 1 file changed, 56 insertions(+), 48 deletions(-) base-commit: 49346fa79442ba6f0be832c2c5af4360e52f070a diff --git a/gdb/testsuite/gdb.base/cond-eval-mode.exp b/gdb/testsuite/gdb.base/cond-eval-mode.exp index 52f73ba13b5..cd1b78bf2ab 100644 --- a/gdb/testsuite/gdb.base/cond-eval-mode.exp +++ b/gdb/testsuite/gdb.base/cond-eval-mode.exp @@ -83,39 +83,43 @@ proc test_break { break_command } { with_test_prefix "$break_command" { delete_breakpoints - gdb_test "$break_command foo" "reakpoint.* at .*" - - # A condition that evals true. - gdb_test "condition \$bpnum cond_global==0" ".*" - - set can_do_cmd 0 - - set test "continue" - gdb_test_multiple $test $test { - -re "You may have requested too many.*$gdb_prompt $" { - pass $test + with_test_prefix "true condition" { + gdb_test "$break_command foo" "reakpoint.* at .*" + + # A condition that evals true. + gdb_test "condition \$bpnum cond_global==0" ".*" + + set can_do_cmd 0 + + set test "continue" + gdb_test_multiple $test $test { + -re "You may have requested too many.*$gdb_prompt $" { + pass $test + } + -re "Breakpoint .*, foo .*$gdb_prompt $" { + pass $test + set can_do_cmd 1 + } } - -re "Breakpoint .*, foo .*$gdb_prompt $" { - pass $test - set can_do_cmd 1 - } - } - if { !$can_do_cmd } { - unsupported "no target support" - return + if { !$can_do_cmd } { + unsupported "no target support" + return + } } - delete_breakpoints + with_test_prefix "false condition" { + delete_breakpoints - gdb_test "$break_command foo" ".*reakpoint .* at .*" + gdb_test "$break_command foo" ".*reakpoint .* at .*" - # A condition that evals false. - gdb_test "condition \$bpnum cond_global==1" ".*" + # A condition that evals false. + gdb_test "condition \$bpnum cond_global==1" ".*" - gdb_test "b bar" "Breakpoint .* at .*" + gdb_test "b bar" "Breakpoint .* at .*" - gdb_test "continue" "Breakpoint .*, bar .*" + gdb_test "continue" "Breakpoint .*, bar .*" + } } } @@ -132,41 +136,45 @@ proc test_watch { watch_command } { return } - delete_breakpoints + with_test_prefix "true condition" { + delete_breakpoints - gdb_test "$watch_command global" ".*atchpoint .*: global.*" + gdb_test "$watch_command global" ".*atchpoint .*: global.*" - # A condition that evals true. - gdb_test "condition \$bpnum cond_global==0" ".*" + # A condition that evals true. + gdb_test "condition \$bpnum cond_global==0" ".*" - set can_do_cmd 0 + set can_do_cmd 0 - set test "continue" - gdb_test_multiple $test $test { - -re "You may have requested too many.*$gdb_prompt $" { - pass $test - } - -re "atchpoint .*: global.*$gdb_prompt $" { - pass $test - set can_do_cmd 1 + set test "continue" + gdb_test_multiple $test $test { + -re "You may have requested too many.*$gdb_prompt $" { + pass $test + } + -re "atchpoint .*: global.*$gdb_prompt $" { + pass $test + set can_do_cmd 1 + } } - } - if { !$can_do_cmd } { - unsupported "no target support" - return + if { !$can_do_cmd } { + unsupported "no target support" + return + } } - delete_breakpoints + with_test_prefix "false condition" { + delete_breakpoints - gdb_test "$watch_command global" ".*atchpoint .*: global.*" + gdb_test "$watch_command global" ".*atchpoint .*: global.*" - # A condition that evals false. - gdb_test "condition \$bpnum cond_global==1" ".*" + # A condition that evals false. + gdb_test "condition \$bpnum cond_global==1" ".*" - gdb_test "b bar" "Breakpoint .* at .*" + gdb_test "b bar" "Breakpoint .* at .*" - gdb_test "continue" "Breakpoint .*, bar .*" + gdb_test "continue" "Breakpoint .*, bar .*" + } } }