From patchwork Mon May 21 11:06:50 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philippe Waroquiers X-Patchwork-Id: 27349 Received: (qmail 86593 invoked by alias); 21 May 2018 11:07:19 -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 86495 invoked by uid 89); 21 May 2018 11:07:18 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-27.6 required=5.0 tests=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: mailsec110.isp.belgacom.be Received: from mailsec110.isp.belgacom.be (HELO mailsec110.isp.belgacom.be) (195.238.20.106) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 21 May 2018 11:07:16 +0000 IronPort-PHdr: =?us-ascii?q?9a23=3AfXTh2Bz696cJdPfXCy+O+j09IxM/srCxBDY+r6Qd?= =?us-ascii?q?2+4eIJqq85mqBkHD//Il1AaPAd2Araocw8Pt8InYEVQa5piAtH1QOLdtbDQizf?= =?us-ascii?q?ssogo7HcSeAlf6JvO5JwYzHcBFSUM3tyrjaRsdF8nxfUDdrWOv5jAOBBr/KRB1?= =?us-ascii?q?JuPoEYLOksi7ze+/94HdbglSmDaxfa55IQmrownWqsQYm5ZpJLwryhvOrHtIeu?= =?us-ascii?q?BWyn1tKFmOgRvy5dq+8YB6/ShItP0v68BPUaPhf6QlVrNYFygpM3o05MLwqxbO?= =?us-ascii?q?SxaE62YGXWUXlhpIBBXF7A3/U5zsvCb2qvZx1S+HNsDwULs6Wymt771zRRHoli?= =?us-ascii?q?kJKjA3/mLQhMNygqJWuw6tqwBlzoLIeoyZKOZyc6XAdt0aX2pBWcNRWjRbDIO8?= =?us-ascii?q?bosPC+sBPf5Ar4bjulABrQGxBROrBOP21z9Ih2H53bch0+88FgzGxAwgH9MKsH?= =?us-ascii?q?TVtNX1LLkdXfq7zabS1zXDaOpW2Sr86IfWaBAhuuqBXalzccvRz0kgCR/Fgk+L?= =?us-ascii?q?poP7Jj6Y0PkGvWuD7+d4SO6jl2oqpxtsrjWh2ssgkJTFipwUx1ze6yl0zpg5KN?= =?us-ascii?q?ulQ0Bhe9GkCoFftySCOotzRcMtXn9ntT4hyr0DpZ67ZC8KyIk7xxLHa/yIbYyI?= =?us-ascii?q?4hX7WeaUPDh0nnJleLW6hxms6USgy+v8Wdeo0FtSsyZJjt3BumoQ2xHd9sSLUO?= =?us-ascii?q?Zx8lmg1DqVyQze5P9ILVgxlaXBKp4hxrAwloAUsUTGBiL2gEX2jK6SdkUl4uio?= =?us-ascii?q?8/robq/op5CGLY90jRj+MrkvmsOhG+Q4KRMDX3OY+eW80r3s41H5TK9RgfIoiq?= =?us-ascii?q?XZqozVJdwHpq6lBA9Yyokj5AukADu/yNQXh2UHI05FeB2ZlIjkIErOIPflDfel?= =?us-ascii?q?n1ujjjlqyOrcPrL/GJnNKWLDkLj5d7Zn90Fc0BYzzcxY559MErEBIPPzWkvwtN?= =?us-ascii?q?zAFh82LRa4wuj9B9Vn0YMeQH+PAq6HP6PIql+F/fkvI+qMZY8Tpjn9N+Ip6OXw?= =?us-ascii?q?gixxpVhIcqWjmIMedHu4E+9OOEKEe3Hhnd4bHCENpAVtYvbtjQi6UT9XZm6qUu?= =?us-ascii?q?oD7ys8EZ+nAJ3YDtS1gL2F3T+jE9tJb3pBE02NHG3zX56HSvEBdGSYL5kywXQ/?= =?us-ascii?q?SbG9Rtp5hlmVvwjgxu8/Iw=3D=3D?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A2DiBwBwpwJb/+h+gm1cHgEGDINDgV6NA?= =?us-ascii?q?IwTAYIpAV2VLgsrAYRAAoIVIjgUAQIBAQEBAQECAWsogjUiglIGViMQPxI5HoM?= =?us-ascii?q?7ggWocoRYg2aCD4oJP4NmggCDdIUIAphMBwKBZ4xlC4x9kHeBJTMhgVJtgxeQT?= =?us-ascii?q?z2BKAEaAY8fAQE?= X-IPAS-Result: =?us-ascii?q?A2DiBwBwpwJb/+h+gm1cHgEGDINDgV6NAIwTAYIpAV2VLgs?= =?us-ascii?q?rAYRAAoIVIjgUAQIBAQEBAQECAWsogjUiglIGViMQPxI5HoM7ggWocoRYg2aCD?= =?us-ascii?q?4oJP4NmggCDdIUIAphMBwKBZ4xlC4x9kHeBJTMhgVJtgxeQTz2BKAEaAY8fAQE?= Received: from 232.126-130-109.adsl-dyn.isp.belgacom.be (HELO md.home) ([109.130.126.232]) by relay.skynet.be with ESMTP/TLS/DHE-RSA-AES128-GCM-SHA256; 21 May 2018 13:07:00 +0200 From: Philippe Waroquiers To: gdb-patches@sourceware.org Cc: Philippe Waroquiers Subject: [RFA 7/8] Modify gdb.threads/threads.exp to test FLAGS vqcs for thread apply Date: Mon, 21 May 2018 13:06:50 +0200 Message-Id: <20180521110651.13842-8-philippe.waroquiers@skynet.be> In-Reply-To: <20180521110651.13842-1-philippe.waroquiers@skynet.be> References: <20180521110651.13842-1-philippe.waroquiers@skynet.be> X-IsSubscribed: yes --- 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..5e05716117 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 -sq 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 -sq frame apply all -sqq 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 -cs 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 } }