From: Gabriel Krisman Bertazi <gabriel@krisman.be>
To: gdb-patches@sourceware.org
Cc: palves@redhat.com, sergiodj@redhat.com, dje@google.com,
Gabriel Krisman Bertazi <gabriel@krisman.be>
Subject: [PATCH v6 3/5] Add tests for catching groups of syscalls on supported architectures.
Date: Fri, 20 May 2016 02:56:00 -0000 [thread overview]
Message-ID: <1463712948-9068-3-git-send-email-gabriel@krisman.be> (raw)
In-Reply-To: <1463712948-9068-1-git-send-email-gabriel@krisman.be>
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.11
next prev parent reply other threads:[~2016-05-20 2:56 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-17 17:28 [PATCH v5 4/5] Include group information to xml syscall files Doug Evans
2016-05-20 2:30 ` Gabriel Krisman Bertazi
2016-05-20 2:56 ` [PATCH v6 1/5] Implemement support for groups of syscalls in the xml-syscall interface Gabriel Krisman Bertazi
2016-05-20 2:56 ` [PATCH v6 2/5] Add support to catch groups of syscalls Gabriel Krisman Bertazi
2016-05-26 18:17 ` Sergio Durigan Junior
2016-05-20 2:56 ` Gabriel Krisman Bertazi [this message]
2016-05-26 18:18 ` [PATCH v6 3/5] Add tests for catching groups of syscalls on supported architectures Sergio Durigan Junior
2016-05-20 2:56 ` [PATCH v6 5/5] Update documentation on catching a group of related syscalls Gabriel Krisman Bertazi
2016-05-20 5:48 ` Eli Zaretskii
2016-05-26 18:22 ` [PATCH v6 1/5] Implemement support for groups of syscalls in the xml-syscall interface Sergio Durigan Junior
2016-05-20 3:10 ` [RESEND PATCH v6 4/5] Include group information to xml syscall files Gabriel Krisman Bertazi
2016-05-26 18:14 ` Sergio Durigan Junior
2016-05-27 10:18 ` Pedro Alves
2016-06-19 20:37 ` Gabriel Krisman Bertazi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1463712948-9068-3-git-send-email-gabriel@krisman.be \
--to=gabriel@krisman.be \
--cc=dje@google.com \
--cc=gdb-patches@sourceware.org \
--cc=palves@redhat.com \
--cc=sergiodj@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox