From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 91658 invoked by alias); 17 May 2016 16:56:19 -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 91648 invoked by uid 89); 17 May 2016 16:56:19 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.4 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 spammy=H*M:sk:bcaec52, H*MI:sk:bcaec52 X-HELO: mail-pf0-f201.google.com Received: from mail-pf0-f201.google.com (HELO mail-pf0-f201.google.com) (209.85.192.201) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Tue, 17 May 2016 16:56:17 +0000 Received: by mail-pf0-f201.google.com with SMTP id c189so1535260pfb.1 for ; Tue, 17 May 2016 09:56:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:message-id:date:subject:from:to:cc; bh=f3JeQKdRfd/WeiKBMgsAaK5JruB357MfOcXOOJIV7Dw=; b=l/D7SjaMrXJ6YWAupaEhaj6p04Q0jqT5BatSYBrNzDyOvOk0NsLooSn1kfcLwUE1RS nEX3fWeLXdBh0tRiYBKhGQ0iGhIi88Mqp6e/CrlGV4tCcYbwtUjgBO9MjvoFl9XaDtos LQY/aI32xCCqDJyI0UmikyI2vu9pcYEzdyFZMXeP6/ms6vQg7BLpeFshbJbOVcVvssRW Z2zQ9JyX94VyrxQpIANumyCpw7Sxx/d0ldF/xpJF1akiE/S/2TByiyfHDTYBtLECsglN aZkyA5NJB1SHGmxgnu5K4gj0a0W8EMBGBDTbqZtSjCVKhiGlc0HeCZ8RuTONvEnpcpRV mPog== X-Gm-Message-State: AOPr4FWvmsFncGIsvJvSpQe6ZjetKEqItnAFIt8e/d7CVty0ytYRH8u3/sIdSrD+nlwgUFyirg== MIME-Version: 1.0 X-Received: by 10.66.26.244 with SMTP id o20mr4334438pag.15.1463504175828; Tue, 17 May 2016 09:56:15 -0700 (PDT) Message-ID: Date: Tue, 17 May 2016 16:56:00 -0000 Subject: Re: [PATCH v5 3/5] Add tests for catching groups of syscalls on supported architectures. From: Doug Evans To: Gabriel Krisman Bertazi Cc: gdb-patches@sourceware.org, palves@redhat.com, sergiodj@redhat.com Content-Type: text/plain; charset=UTF-8; format=flowed; delsp=yes X-IsSubscribed: yes X-SW-Source: 2016-05/txt/msg00263.txt.bz2 Gabriel Krisman Bertazi writes: > gdb/testsuite/ > > * gdb.base/catch-syscall.exp (do_syscall_tests): Add call > to test_catch_syscall_group. > (test_catch_syscall_group): New. > --- > 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.3 > LGTM