From patchwork Tue Jun 5 20:49:04 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philippe Waroquiers X-Patchwork-Id: 27648 Received: (qmail 87047 invoked by alias); 5 Jun 2018 20:49:53 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 86908 invoked by uid 89); 5 Jun 2018 20:49:53 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.4 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mailsec118.isp.belgacom.be Received: from mailsec118.isp.belgacom.be (HELO mailsec118.isp.belgacom.be) (195.238.20.114) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 05 Jun 2018 20:49:51 +0000 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A2CPBwBz9hZb/2wz8VFcHQEBBQELAYNDZ?= =?us-ascii?q?2gSKIxbjBABgikBlBuBeAsrAYRAAoIfIjUXAQIBAQEBAQECAWsogjUiglIGViM?= =?us-ascii?q?QPxI5HhmDIoIFqWyEWINqgWiKFj+DZoIAg3SFCAKYdAcCgWeMdguNICuQe4FCA?= =?us-ascii?q?TaBUm2DFpBQPTB4ARoBjjUBAQ?= X-IPAS-Result: =?us-ascii?q?A2CPBwBz9hZb/2wz8VFcHQEBBQELAYNDZ2gSKIxbjBABgik?= =?us-ascii?q?BlBuBeAsrAYRAAoIfIjUXAQIBAQEBAQECAWsogjUiglIGViMQPxI5HhmDIoIFq?= =?us-ascii?q?WyEWINqgWiKFj+DZoIAg3SFCAKYdAcCgWeMdguNICuQe4FCATaBUm2DFpBQPTB?= =?us-ascii?q?4ARoBjjUBAQ?= Received: from 108.51-241-81.adsl-dyn.isp.belgacom.be (HELO md.home) ([81.241.51.108]) by relay.skynet.be with ESMTP/TLS/DHE-RSA-AES128-GCM-SHA256; 05 Jun 2018 22:49:23 +0200 From: Philippe Waroquiers To: gdb-patches@sourceware.org Cc: Philippe Waroquiers Subject: [RFA_v2 7/8] Modify gdb.threads/threads.exp to test FLAGS vqcs for thread apply Date: Tue, 5 Jun 2018 22:49:04 +0200 Message-Id: <20180605204905.30612-8-philippe.waroquiers@skynet.be> In-Reply-To: <20180605204905.30612-1-philippe.waroquiers@skynet.be> References: <20180605204905.30612-1-philippe.waroquiers@skynet.be> X-IsSubscribed: yes gdb/testsuite/ChangeLog 2018-06-05 Philippe Waroquiers * gdb.threads/pthreads.exp: Test vqcs FLAGS. --- gdb/testsuite/gdb.threads/pthreads.exp | 65 ++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) diff --git a/gdb/testsuite/gdb.threads/pthreads.exp b/gdb/testsuite/gdb.threads/pthreads.exp index 830432b833..7ac9476dfc 100644 --- a/gdb/testsuite/gdb.threads/pthreads.exp +++ b/gdb/testsuite/gdb.threads/pthreads.exp @@ -267,6 +267,70 @@ proc check_backtraces {} { } } +proc check_vqcs {} { + set any "\[^\r\n\]*" + set ws "\[ \t\]\+" + set number "\[0-9]\+" + + # check -c (continue) and -s (silently continue) flags + gdb_test "thread apply 2-3 p notfound" \ + [multi_line \ + "" \ + "Thread 2 ${any}" \ + "No symbol \\\"notfound\\\" in current context." \ + ] \ + "Run a failing command that aborts thread apply" + + gdb_test "thread apply 2-3 -c p notfound" \ + [multi_line \ + "" \ + "Thread 2 ${any}" \ + "No symbol \\\"notfound\\\" in current context." \ + "" \ + "Thread 3 ${any}" \ + "No symbol \\\"notfound\\\" in current context." \ + ] \ + "Run a failing command, -c to continue" + + foreach cmd {"thread apply all -s frame apply all -s p i" "tfaas p i" "taas faas p i"} { + gdb_test $cmd \ + [multi_line \ + "" \ + "Thread 3 ${any}" \ + "#${number}${ws}${any} in thread2 ${any}" \ + "\\\$\[0-9]+ = ${number}${any}" \ + "" \ + "Thread 2 ${any}" \ + "#${number}${ws}${any} in thread1 ${any}" \ + "\\\$\[0-9]+ = ${number}${any}" \ + ] \ + "Run a failing command except in one frame of thread 2,3, -s to silently continue" + } + + # Verbosity tests + gdb_test "thread apply all -s -q frame apply all -s p i" \ + [multi_line \ + "#${number}${ws}${any} in thread2 ${any}" \ + "\\\$\[0-9]+ = ${number}${any}" \ + "#${number}${ws}${any} in thread1 ${any}" \ + "\\\$\[0-9]+ = ${number}${any}" \ + ] \ + "Run a failing command except in one frame of thread 2,3, -s to silently continue. Verbosity 0 threads" + + gdb_test "thread apply all -s -q frame apply all -s -q -q p i" \ + [multi_line \ + "\\\$\[0-9]+ = ${number}${any}" \ + "\\\$\[0-9]+ = ${number}${any}" \ + ] \ + "Run a failing command except in one frame of thread 2,3, -s to silently continue. Verbosity 0 threads and frames" + + # check invalid flag combinations + gdb_test "thread apply all -c -s p 1" \ + "thread apply all: flags c and s are mutually exclusive" \ + "Check c and s cannot be used simultaneously" + +} + if [runto_main] then { if [test_startup] then { if [check_control_c] then { @@ -274,5 +338,6 @@ if [runto_main] then { return } check_backtraces + check_vqcs } }