diff options
author | Eugene Syromyatnikov <evgsyr@gmail.com> | 2016-09-06 05:08:24 +0300 |
---|---|---|
committer | Dmitry V. Levin <ldv@altlinux.org> | 2016-09-08 01:37:18 +0000 |
commit | 6d995ae68b974b389a499bd1d0dfe3e0de92905a (patch) | |
tree | d95529bd808ded04ea8e28ecda92a1994493d3b7 /tests/tests.h | |
parent | ee7d47f4d64cb48dd45ba7e03f5e875fe7f8154d (diff) | |
download | strace-6d995ae68b974b389a499bd1d0dfe3e0de92905a.tar.gz |
tests: add sprintrc_grep function to libtests
New sprintrc_grep function is sprintrc function equivalent suitable for
tests where grep-base pattern matching is employed.
* tests/tests.h (sprintrc_grep): New prototype.
* tests/sprintrc.c (enum sprintrc_fmt): New sprintrc format enumeration.
(sprintrc_ex): New function, renamed from sprintrc and updated to
support different formats.
(sprintrc): Change to use sprintrc_ex with SPRINTRC_FMT_RAW.
(sprintrc_grep): New function, calls sprintrc_ex with SPRINTRC_FMT_GREP.
Diffstat (limited to 'tests/tests.h')
-rw-r--r-- | tests/tests.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/tests.h b/tests/tests.h index 3043f97c4..2599120c5 100644 --- a/tests/tests.h +++ b/tests/tests.h @@ -101,6 +101,8 @@ const char *signal2name(int); /* Print return code and, in case return code is -1, errno information. */ const char *sprintrc(long rc); +/* sprintrc variant suitable for usage as part of grep pattern. */ +const char *sprintrc_grep(long rc); struct xlat; |