summaryrefslogtreecommitdiffstats
path: root/testsuite
Commit message (Collapse)AuthorAgeFilesLines
...
* Expand @defined to support more casesJosh Stone2010-02-251-0/+13
| | | | | | | | * tapsets.cxx (var_expanding_visitor::visit_defined_op): If no error was raised or replacement made on a target_symbol, then its @defined state is still indeterminate. Some later pass (like @cast) might handle it. * elaborate.cxx (const_folder::visit_defined_op): Squash any escapees. * testsuite/semok/thirtysix.stp: Add more variants.
* PR11326: Make an early check for saved-return-$var validityJosh Stone2010-02-251-10/+0
| | | | | | | | | | We now check validity *before* the entry-probe is generated, so invalid $vars have a chance to be properly optimized without error. * tapsets.cxx (dwarf_var_expanding_visitor::visit_target_symbol_saved_return): Attempt variable expansion immediately, and skip out on failure. * testsuite/semok/thirtysix.stp: unblock the previously broken part.
* Fixed pr 10690 by adding '.maxsize(NNN)' procfs read probe parameter.David Smith2010-02-255-1/+301
| | | | | | | | | | | | | | | | | | | | | | * tapset-procfs.cxx (procfs_derived_probe::procfs_derived_probe): Added 'maxsize_val' initialization. (procfs_derived_probe::join_group): Updated '_stp_procfs_data' definition and added STP_PROCFS_BUFSIZE. (procfs_derived_probe_group::emit_module_decls): Emits structure to contain procfs file buffers. Initializes '.bufsize' structure member. (procfs_var_expanding_visitor::visit_target_symbol): Uses 'bufsize' for maximum buffer size instead of using MAXSTRINGLEN. (procfs_builder::build): Looks for '.maxsize(NNN)' parameter. (register_tapset_procfs): Added '.maxsize(NNN)' parameter binding. * runtime/procfs-probes.c (stap_procfs_probe): Converted 'buffer' to a pointer and added 'bufsize' member. * testsuite/semko/procfs13.stp: New testcase. * testsuite/semko/procfs14.stp: Ditto. * testsuite/semko/procfs15.stp: Ditto. * testsuite/systemtap.base/procfs_maxsize.exp: Ditto. * testsuite/systemtap.base/procfs.exp: Minor fix. * stapprobes.3stap.in: Added '.maxsize(NNN)' documentation. * stap.1.in: Added STP_PROCFS_BUFSIZE documentation.
* PR11224: added test case for module arguments in testsuite/systemtap.baseCharley Wang2010-02-252-0/+35
|
* PR11005: @defined part 2: clarify/standardize internal handling of ↵Frank Ch. Eigler2010-02-252-16/+28
| | | | | | | | | | | | | | | | | unresolvable $variables * staptree.cxx (target_symbol::chain): New function. * staptree.h: Declare it. * (*): Use it instead of hand-chaining to target_symbol->saved_conversion_error. * tapset-mark.cxx (*::visit_target_symbol): Chain resolution error object, do not throw. * tapset-procfs.cxx (*::visit_target_symbol): Ditto. * tapset-utrace.cxx (*::visit_target_symbol): Ditto. * tapsets.cxx (*::visit_target_symbol): Ditto. (*::visit_defined_op): Explain & enforce the above. * testsuite/semok/thirtysix.stp: Expand. * testsuite/systemtap.base/sdt_misc.exp: Bonus fix: make work with blddir != srcdir.
* Permit chained unary operatorsJosh Stone2010-02-241-1/+7
| | | | | | | | The operand of a unary may be yet another unary. This is useful for things like boolean normalization, !!x. * parse.cxx (parser::parse_unary): Recurse the operand. * testsuite/parseok/eleven.stp: Add chained unary operators.
* Merge branch 'master' of ssh://sources.redhat.com/git/systemtapFrank Ch. Eigler2010-02-231-1/+20
|\ | | | | | | | | | | | | | | | | | | | | | | * 'master' of ssh://sources.redhat.com/git/systemtap: PR10719 part 1: Partial constant folding Simplify null_statement construction Fixed PR 11269 by properly handling mmap syscall 'fd' argument. Removed rvalue operator check. PR 10690 (partial fix). Handle '.=' operator in procfs probes. Conflicts: tapsets.h
| * Fixed PR 11269 by properly handling mmap syscall 'fd' argument.David Smith2010-02-231-1/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * testsuite/systemtap.syscall/mmap.c (main): Added mprotect and mremap testing (along with testing of anonymous maps). * tapset/i386/syscalls.stp: In mmap probes, handle the fact that the kernel gets an unsigned long 'fd', but the user-side passes a signed int. * tapset/i386/nd_syscalls.stp: Ditto. * tapset/ia64/syscalls.stp: Ditto. * tapset/powerpc/nd_syscalls.stp: Ditto. * tapset/powerpc/syscalls.stp: Ditto. * tapset/x86_64/nd_syscalls.stp: Ditto. * tapset/x86_64/syscalls.stp: Ditto.
* | PR11005: @defined($tvar) predicate, part 1Frank Ch. Eigler2010-02-231-0/+19
|/ | | | | | | | | | | | | | | | | | * staptree.h (defined_op): New class. * all files: Extend all visitors as appropriate, mostly dummy/pass-through implementation. * parse.cxx (parse_target_symbol): New function, factored out of parse_symbol(). (parse_define_op): New function. * NEWS: Mention it. * parse.h: Corresponding changes. * tapsets.cxx (var_expanding_visitor::visit_defined_op): Implement @defined() semantics. (dwarf_var_expanding_visitor::visit_target_symbol): Adjust. * tapset-utrace.c (visit_target_symbol_arg): Avoid crashes on $argZZZ. * tapsets.cxx (sdt_var_expanding_visitor): Ditto. * semok/thirtysix.stp: New test.
* Prevent accidental global cleanup triggering for syscall test.tcl.Mark Wielaard2010-02-222-34/+34
| | | | | | | | | | | Later tests might trigger a cleanup and might set the global dir variable leading to the syscall test.tcl trying to do an exec rm -rf on whatever dir was set. So rename proc cleanup and global dir in syscall test.tcl to something a bit less likely to clash. * testsuite/systemtap.syscall/test.tcl: Rename proc cleanup to syscall_cleanup and global dir to syscall_dir. * testsuite/systemtap.syscall/test-debug.tcl: Likewise.
* Tweak shared attach sdt test.Stan Cox2010-02-211-40/+70
| | | | * sdt_misc.exp: Make all semaphore references from the .so
* Make unprivilegedok/one.stp compatible with vanilla kernelWenji Huang2010-02-211-1/+1
|
* Add explicit timeout to overflow_error testWenji Huang2010-02-211-0/+1
|
* PR11208: glue adjacent string literals together.Frank Ch. Eigler2010-02-192-0/+12
| | | | | * parse.cxx (lexer::scan): Glue adjacent strings together. * testsuite/parseko/twentyseven.stp, semok/thirtyfive.stp: New tests.
* Allow CONFIG_foo COMPARISON-OP CONFIG_bar in preprocessor conditionals.Mark Wielaard2010-02-191-0/+17
| | | | | | | * parse.cxx (eval_pp_conditional): If rhs and lhs are both CONFIG_... identifiers try to convert them both to numbers or otherwise threat them both as strings for eval_comparison. * testsuite/semok/config_config.stp: New test.
* Allow CONFIG_foo COMPARISON-OP number in preprocessor conditionals.Mark Wielaard2010-02-191-0/+20
| | | | | | * parse.cxx (eval_pp_conditional): Handle r->type == tok_number when l->type == tok_identifier. * testsuite/semok/config_number.stp: New test.
* PR11296: switch to "sys/sdt.h" in test casesFrank Ch. Eigler2010-02-1814-18/+18
|
* PR11277: Use consistent octal in quoted stringsJosh Stone2010-02-162-23/+23
| | | | | | | | | | Previously, our octal escapes used variable lengths, which can lead to ambiguities. Also, 8-bit characters would only output the least digit. * runtime/string.c (_stp_text_str): Always output 3-digit octal escapes, and handle 8-bit chars more gracefully. * testsuite/systemtap.string/text_str.stp: Include an 8-bit character. * testsuite/systemtap.string/text_str.exp: Above + expect 3-digit octal.
* Don't try to parallel install partial build-elfutils build in lib-elfutils.Mark Wielaard2010-02-163-670/+737
| | | | | | | | | | | | | | | | | | | The parallel install into lib-elfutils during the build seems to be fragile, so explicitly install the libs with -j1. * Makefile.am (stamp-elfutils): Add -j1 in for dir loop sub make. * Makefile.in: Regenerated. * aclocal.m4: Likewise. * compile: Likewise. * config.in: Likewise. * configure: Likewise. * doc/Makefile.in: Likewise. * doc/SystemTap_Tapset_Reference/Makefile.in: Likewise. * doc/beginners/Makefile.in: Likewise. * grapher/Makefile.in: Likewise. * testsuite/Makefile.in: Likewise. * testsuite/aclocal.m4: Likewise. * testsuite/configure: Likewise.
* Merge branch 'master' of ssh://sources.redhat.com/git/systemtapDave Brolley2010-02-1511-59/+185
|\
| * Test for sendfile syscall can handle non-socket fds now.Mark Wielaard2010-02-131-4/+4
| | | | | | | | | | | | | | | | Since 2.6.33 sendfile can handle non-socket fds, so make the test handle both success and failure. * testsuite/systemtap.syscall/sendfile.c (main): Make buffer 22 bytes, since 22 == EINVAL, test for 22 bytes send or -22 failure.
| * PR11105 part 2: tighten constraints on stap-server parameters passed to makeFrank Ch. Eigler2010-02-122-36/+37
| | | | | | | | | | | | | | * util.h, util.cxx (assert_match_regexp): New function. * main.cxx (main): Constrain -R, -r, -a, -D, -S, -q, -B flags. * stap-serverd (listen): Harden stap-server-connect with ulimit/loop. * testsuite/systemtap.server/{client,server}_args.exp: Revised.
| * Add simple test for PR10257 (sprint(@hist_linear)).Przemysław Pawełczyk2010-02-112-0/+18
| | | | | | | | | | | | | | | | | | | | Test is simple, because print and sprint uses the same code for handling @hist_* and it is not intended for playing with MAXSTRINGLEN, which is required anyway for bigger histograms (the one generated here consists of only 127 characters). When PR10690 (need way to produce bigger procfs output) will be fixed, then we should add another test for both PRs with normal histogram.
| * Fixed PR 11270 by adding nd_syscall testcase.David Smith2010-02-104-2/+99
| | | | | | | | | | | | | | | | | | | | * testsuite/systemtap.syscall/test.tcl: Now uses global variable 'test_script' to find test script to run. * testsuite/systemtap.syscall/syscall.exp: Sets test_script. * testsuite/systemtap.syscall/nd_sys.stp: New test script. Copy of sys.stp, but uses nd_syscall probes. * testsuite/systemtap.syscall/nd_syscall.exp: New testcase. Copy of syscall.exp, but uses nd_sys.stp test script.
| * Fix tcl.exp initialization bugStan Cox2010-02-091-0/+1
| | | | | | | | tcl.exp: Initialize xok
| * Fixed BZ559643 by doing 'spawn;expect;wait' instead of 'spawn;wait;expect'.David Smith2010-02-081-17/+26
| | | | | | | | | | | | * testsuite/systemtap.base/labels.exp: Corrected order of 'spawn;expect;wait' calls. Added 'wait' calls when needed. Also, doesn't run the "labels exe .label" test if uprobes isn't supported.
* | Rework identification of probes allowed for unprivileged users.Dave Brolley2010-02-1510-4/+59
|/ | | | | | | - Bind unprivileged permission at probe registration time. - Remove check_unprivileged filter from derived_probe_builder and its children. - Add test suites for unprivilegedok and unprivilegedko.
* Define empty function for tcpmib testWenji Huang2010-02-081-0/+8
|
* Fix test case tcpmib-all-probes.stpWenji Huang2010-02-081-6/+1
|
* Added backports required for 2.6.18 kernel for RHEL 5.David J. Wilder2010-02-052-4/+37
| | | | | | | Files changed: tapset/ipmib.stp, tapset.tcpmib.stp, testsuite/systemtap.examples/network/tcpipstat.stp, testsuite/systemtap.examples/network/tcp_trace.stp Signed-of-by: David Wilder <dwilder@us.ibm.com>
* Use SYSTEMTAP_INCLUDES for systemtap.apps tests.Stan Cox2010-02-052-2/+2
| | | | | * mysql.exp: Use SYSTEM_INCLUDES. * postgres.exp: Likewise.
* PR11256: harden --unprivileged modeFrank Ch. Eigler2010-02-051-0/+4
| | | | | | | | * tapsets-mark.cxx, tapsets.cxx: Don't even publish probe point families that are inappropriate for use in --unprivileged mode. (dwarf_derived_probe_*unprivileged*): Remove, to default to blanket no-permission rather than emit_process_owner_permission mode. * testsuite/semko/fortyeight.stp: New test.
* pfiles.stp sample: begin tcp option dumpingFrank Ch. Eigler2010-02-051-15/+18
|
* Revert "PR11234: Ensure __get_argv doesn't overflow"Josh Stone2010-02-042-67/+0
| | | | This reverts commit f75409719f120a3dbee66d761cf23a64092d1414.
* new sample: pfilesEugene Teo2010-02-046-25/+651
|
* Merge branch 'master' of ssh://sources.redhat.com/git/systemtapDave Brolley2010-02-0410-2/+197
|\
| * Fix procfs_write.exp so that it will pass under RHELl5.David Smith2010-02-022-2/+6
| | | | | | | | | | | | | | * testsuite/systemtap.base/procfs_write.exp: Small changes for RHEL5 support. * testsuite/lib/stap_run.exp (stap_run): Increase maximum number of characters to match against.
| * Add nfs_func_log example.William Cohen2010-02-024-0/+24
| |
| * Add nfs_func_users example.William Cohen2010-02-026-0/+70
| |
| * Add iodevstats.stp exampleWilliam Cohen2010-02-026-0/+97
| |
* | Compile server logging and robustness.Dave Brolley2010-02-021-2/+3
|/ | | | | | Log certificate location and status when starting server. Additional care in handling arguments in stap-serverd. New test case discovered by fuzzing added and fixed.
* Merge branch 'master' of ssh://sources.redhat.com/git/systemtapDave Brolley2010-02-0218-15/+339
|\
| * buildok test doesn't need /usr/bin/envMark Wielaard2010-02-021-1/+1
| | | | | | | | * testsuite/buildok/hwbkpt.stp: Just use stap directly after #!.
| * Make sure cfa_ops are always retrieved through dwfl global address.Mark Wielaard2010-02-024-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dwflpp::translate_location() works on the dw address space, but get_cfa_ops() starts out with dwfl calls (only dwarf_cfi_addrframe() needs to be adjusted for bias). * dwflpp.cxx (translate_location): Pass pc plus module bias through to get_cfa_ops. (get_cfa_ops): Adjust for bias when calling dwarf_cfi_addrframe(), add frame start/end address when found if verbose logging. * testsuite/systemtap.exelib/lib.stp: Add $foo and $bar variables to process.function probes. * testsuite/systemtap.exelib/libmarkunamestack.stp: Likewise. * testsuite/systemtap.exelib/lib.tcl: Expect correct values for process.function probe variables. * testsuite/systemtap.exelib/libmarkunamestack.tcl: Likewise.
| * regen sample indexesFrank Ch. Eigler2010-02-014-0/+24
| |
| * new sample for sandeen@redhat.com: fntimes.stpFrank Ch. Eigler2010-02-012-0/+36
| |
| * Make hwbkpt.stp compitable with old kernel and exectuableWenji Huang2010-02-011-3/+13
| | | | | | | | | | * testsuite/buildok/hwbkpt.stp: Switch by CONFIG_* and be executable.
| * Fix uninitialization error on gcc 4.1.xWenji Huang2010-02-011-1/+1
| | | | | | | | * testsuite/systemtap.base/overflow-get_argv.stp: Initialize var.
| * Hardware Breakpoints for x86 / x86_64, based on mainline kernelPrerna Saxena2010-01-291-0/+4
| |
| * PR11234: Ensure __get_argv doesn't overflowJosh Stone2010-01-282-0/+67
| | | | | | | | | | | | | | That function was calling strlcpy as if the return value was the number of bytes copied, but strlcpy actually returns the length of the input string. We now use min() to handle the case when it's bigger than the buffer length, and drop out of the loop when that happens.