From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 120607 invoked by alias); 26 May 2016 18:18:07 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 120597 invoked by uid 89); 26 May 2016 18:18:07 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.3 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=sk:INTERNA X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Thu, 26 May 2016 18:18:02 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 393EA7F6A6; Thu, 26 May 2016 18:18:01 +0000 (UTC) Received: from localhost (unused-10-15-17-51.yyz.redhat.com [10.15.17.51]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u4QII0wr012059 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 26 May 2016 14:18:01 -0400 From: Sergio Durigan Junior To: Gabriel Krisman Bertazi Cc: gdb-patches@sourceware.org, palves@redhat.com, dje@google.com Subject: Re: [PATCH v6 3/5] Add tests for catching groups of syscalls on supported architectures. References: <87shxd1mx2.fsf@oberon.home> <1463712948-9068-1-git-send-email-gabriel@krisman.be> <1463712948-9068-3-git-send-email-gabriel@krisman.be> X-URL: http://blog.sergiodj.net Date: Thu, 26 May 2016 18:18:00 -0000 In-Reply-To: <1463712948-9068-3-git-send-email-gabriel@krisman.be> (Gabriel Krisman Bertazi's message of "Thu, 19 May 2016 23:55:46 -0300") Message-ID: <87iny08yzr.fsf@redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-IsSubscribed: yes X-SW-Source: 2016-05/txt/msg00471.txt.bz2 On Thursday, May 19 2016, Gabriel Krisman Bertazi wrote: > gdb/testsuite/ > > * gdb.base/catch-syscall.exp (do_syscall_tests): Add call > to test_catch_syscall_group. > (test_catch_syscall_group): New. Thanks for the patch. > --- > gdb/testsuite/gdb.base/catch-syscall.exp | 39 ++++++++++++++++++++++++++++++++ > 1 file changed, 39 insertions(+) > > diff --git a/gdb/testsuite/gdb.base/catch-syscall.exp b/gdb/testsuite/gdb.base/catch-syscall.exp > index 5679000..e55bd70 100644 > --- a/gdb/testsuite/gdb.base/catch-syscall.exp > +++ b/gdb/testsuite/gdb.base/catch-syscall.exp > @@ -370,6 +370,42 @@ proc test_catch_syscall_fail_nodatadir {} { > } > } > > +proc test_catch_syscall_group {} { > + global decimal > + > + set sysnum "\\\[${decimal}\\\]" > + > + gdb_test "catch syscall g:process" \ > + "Catchpoint $decimal \\(syscalls (\'(clone|fork|execve|exit)\' $sysnum)+.*" \ > + "set catchpoint on a group of syscalls" > + > + gdb_test "catch syscall group:process read" \ > + "Catchpoint $decimal \\(syscalls (\'(clone|fork|execve|exit)\' $sysnum)+.*read.*\\)" \ > + "set catchpoints on a group of syscalls and on a single syscall" > + > + gdb_test "catch syscall group:" \ > + "Unknown syscall group ''\." \ > + "set catchpoints on an invalid group" > + > + gdb_test "catch syscall g:junk" \ > + "Unknown syscall group 'junk'\." \ > + "set catchpoints on an unknown group." > + > + gdb_test "complete catch syscall g:proc" \ > + "catch syscall g:process" \ > + "complete catch syscall group with 'g:' prefix" > + > + gdb_test "complete catch syscall group:proc" \ > + "catch syscall group:process" \ > + "complete catch syscall group with 'group:' prefix" > + > + gdb_test_sequence "complete catch syscall g" \ > + "complete catch syscall group suggests 'group:' prefix" { > + "group:descriptor" "group:file" "group:ipc" "group:memory" > + "group:network" "group:process" "group:signal" > + } > +} > + > proc do_syscall_tests {} { > # NOTE: We don't have to point gdb at the correct data-directory. > # For the build tree that is handled by INTERNAL_GDBFLAGS. > @@ -420,6 +456,9 @@ proc do_syscall_tests {} { > # Testing if the 'catch syscall' command works when switching to > # different architectures on-the-fly (PR gdb/10737). > if [runto_main] then { test_catch_syscall_multi_arch } > + > + # Testing the 'catch' syscall command for a group of syscalls. > + if [runto_main] then { test_catch_syscall_group } > } > > proc test_catch_syscall_without_args_noxml {} { > -- > 2.4.11 LGTM. -- Sergio GPG key ID: 237A 54B1 0287 28BF 00EF 31F4 D0EB 7628 65FC 5E36 Please send encrypted e-mail if possible http://sergiodj.net/