These patches implement new filtering architecture. Currently supported actions: trace, inject, fault, read, write, raw, abbrev, verbose. Currently supported filters: syscall, fd, path. Changes in filtering language: * Delimiter of action arguments is now ';'. * Supported logical operators: and, or, not. Also C-like forms of these operators are supported: &&, ||, !. * Syscall filter accepts syscalls' set, class or regex with old set description syntax.
Changes since v1: * qualify.c is now splitted in separate commit. Changes since v2: * Fixed segmentation fault in inject/fault parsing. * basic_filters.c (run_fd_filter): Changed returns to true/false. Changes since v3: * Fixed invalid accounting of syscalls for inject/fault actions. * Fixed order of filter actions with same priority. * Refactored inject arguments parsing. * Refactored fd filtering. * Refactored tests for syscall set syntax. * Improved diagnostics of filtering errors. * Rewritten algorithms of parsing for new filtering language. Changes since v4: * Fixes in fd and path filtering. * Added tests for fd filtering. * Syscall tests refactoring is now in a separate commit. * Style and readability fixes. Known issues in v4: * Fd filter returns valid results only if negative fds are not filtered. Changes since v5: * Refactored parsing. * Fixes in fd and path filtering. * Improved diagnostics. * Added stacktrace action. * Style fixes. Nikolay Marchuk (9): Split qualify.c into basic_filters.c and filter_qualify.c tests: Refactor syscall syntax testing Introduce new filtering architecture Improve fd filtering Optimize default filtering Implement new filtering language parsing Add path filter tests: check fd filter Add stacktrace filter action Makefile.am | 9 +- basic_actions.c | 147 ++++++++ basic_filters.c | 543 ++++++++++++++++++++++++++++ defs.h | 20 +- filter.c | 147 ++++++++ filter.h | 72 ++++ filter_action.c | 268 ++++++++++++++ filter_expression.c | 432 ++++++++++++++++++++++ filter_parse.c | 188 ++++++++++ filter_qualify.c | 340 ++++++++++++++++++ pathtrace.c | 202 +++++++---- qualify.c | 697 ------------------------------------ strace.c | 19 +- syscall.c | 30 +- tests/.gitignore | 1 + tests/Makefile.am | 5 + tests/filtering_fd-syntax.test | 42 +++ tests/filtering_fd.c | 158 ++++++++ tests/filtering_fd.test | 27 ++ tests/filtering_syscall-syntax.test | 75 ++++ tests/options-syntax.test | 80 +---- tests/qual_fault-syntax.test | 17 +- tests/qual_inject-syntax.test | 18 +- tests/syntax.sh | 81 +++++ unwind.c | 6 + 25 files changed, 2712 insertions(+), 912 deletions(-) create mode 100644 basic_actions.c create mode 100644 basic_filters.c create mode 100644 filter.c create mode 100644 filter.h create mode 100644 filter_action.c create mode 100644 filter_expression.c create mode 100644 filter_parse.c create mode 100644 filter_qualify.c delete mode 100644 qualify.c create mode 100755 tests/filtering_fd-syntax.test create mode 100644 tests/filtering_fd.c create mode 100755 tests/filtering_fd.test create mode 100755 tests/filtering_syscall-syntax.test create mode 100644 tests/syntax.sh -- 2.1.4 ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Strace-devel mailing list Strace-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/strace-devel