summaryrefslogtreecommitdiffstats
path: root/testsuite/systemtap.base
Commit message (Collapse)AuthorAgeFilesLines
...
* Don't spawn uprobes tests with sudoJosh Stone2009-08-054-14/+7
| | | | | | | | | | | | | | Using spawn with sudo doesn't work well, because the password prompt won't go to the correct TTY. The only reason that the uprobes tests needed to do this is so uprobes.ko could be built as root. Now instead, I've added a pre-check that will directly call the uprobes make with sudo (via the as_root proc). * testsuite/lib/systemtap.exp (uprobes_p): Check and build uprobes.ko. * testsuite/systemtap.base/uprobes.exp: Use uprobes_p; don't spawn sudo. * testsuite/systemtap.base/bz6850.exp: Ditto. * testsuite/systemtap.base/bz10078.exp: Ditto. * testsuite/systemtap.base/bz6905.exp: sudo isn't needed for -p2.
* Merge branch 'master' of git://sources.redhat.com/git/systemtapDave Brolley2009-08-048-11/+81
|\ | | | | | | | | | | Conflicts: cache.cxx
| * PR2049: support arbitrary $target-array indexingJosh Stone2009-08-031-9/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rather than just numeric literals, we can now support arbitrary expressions for the index value. Note that loc2c won't allow this for noncontiguous arrays, as the access methods need to be statically computed, but for contiguous arrays and pointers-as-arrays it works just fine. * staptree.h (target_symbol::component): Add expression_array_index. * staptree.cxx (target_symbol::visit_components): New helper. (target_symbol::assert_no_components): Recognize new array type. (target_symbol::component::print): Print subexpressions. (traversing_visitor::visit_target_symbol, visit_cast_op): Visit the indexing components too. (varuse_collecting_visitor::visit_target_symbol): Ditto. (update_visitor::visit_target_symbol, visit_cast_op): Ditto. * elaborate.cxx (void_statement_reducer::visit_target_symbol): New. (void_statement_reducer::visit_cast_op): Save indexes too. * parse.cxx (parser::parse_target_symbol_components): Parse expressions. * tapsets.cxx (dwarf_var_expanding_visitor::visit_target_symbol): Pass expression-indexes as parameters (indexN) to the dwarf function. (dwarf_cast_expanding_visitor::visit_cast_op): Ditto. (tracepoint_var_expanding_visitor::visit_target_symbol_arg): Ditto. (sdt_var_expanding_visitor::visit_target_symbol): Visit the new @cast. * dwflpp.cxx (dwflpp::translate_components): Use THIS->indexN. * translate.cxx (c_unparser::visit_target_symbol): Correct error msg. * testsuite/systemtap.base/pointer_array.stp: Use a simple index.
| * Relax the type-matching in the cmd_parse13 testJosh Stone2009-07-301-1/+1
| | | | | | | | | | Dwarf probes are now printing their $target variables in -L, so we need to handle more than just stap types in the regular expression.
| * PR6978: support $$parms for process.syscallWenji Huang2009-07-282-0/+41
| | | | | | | | | | | | * tapset-utrace.cxx (visit_target_symbol_arg): Handle $$parms. * testsuite/systemtap.base/utrace_p4.exp: Add test case. * testsuite/systemtap.base/utrace_p5.exp: Ditto.
| * PR10453: Fix crash.exp not to refer removed fileMasami Hiramatsu2009-07-281-1/+1
| | | | | | | | | | * systemtap.base/crash.exp: Use command-line script instead of removed script file.
| * PR6905: tweak WILDCARD and RANGE line type for process.statementWenji Huang2009-07-273-0/+36
| | | | | | | | | | | | | | | | * dwflpp.cxx (iterate_over_srcfile_lines): Check the line range and tolerate invalid line number for WILDCARD line type. * testsuite/systemtap.base/bz6905.c: Test case. * testsuite/systemtap.base/bz6905.exp: Ditto. * testsuite/systemtap.base/bz6905.stp: Ditto.
* | Merge branch 'master' of git://sources.redhat.com/git/systemtapDave Brolley2009-07-241-0/+17
|\|
| * PR6898: support $$vars and $$parms for markerWenji Huang2009-07-231-0/+17
| | | | | | | | | | * tapset-mark.cxx (visit_target_symbol_context): Add $$vars/$$parms. * testsuite/systemtap.base/marker.exp : Test case.
* | Merge branch 'master' of git://sources.redhat.com/git/systemtapDave Brolley2009-07-231-1/+3
|\|
| * PR10427 Multiple tracepoints OK!Mark Wielaard2009-07-221-1/+3
| | | | | | | | | | * testsuite/systemtap.base/tracepoints.stp: Only print once, when enough hits, or at the begin probe.
* | Merge branch 'master' of git://sources.redhat.com/git/systemtapDave Brolley2009-07-165-2/+41
|\|
| * PR5930: Address-op for $target and @cast membersJosh Stone2009-07-152-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows the '&' operator to get the address of @cast and $target variable expressions. * staptree.h (target_symbol): add addressof field * staptree.cxx (target_symbol::print): print '&' for addressof (cast_op::print): ditto * parse.cxx (parser::parse_value): allow '&' prefix on $target/@cast * dwflpp.cxx (dwflpp::translate_final_fetch_or_store): allow taking the computed address without actually doing a final fetch. * tapset* (*::visit_target_symbol): throw errors for $vars w/o addresses * testsuite/systemtap.base/cast.stp: add &@cast test * testsuite/semok/target_addr.stp: test '&' on different member types * testsuite/semko/target_addr?.stp: test failure on bitfields/registers
| * utrace_syscall_args.stp makes sure open syscall is from target pid.David Smith2009-07-151-1/+1
| | | | | | | | | | * testsuite/systemtap.base/utrace_syscall_args.stp: Makes sure the open syscall is from the target pid.
| * PR4166: Allow array-like indexing on pointersJosh Stone2009-07-142-0/+29
| | | | | | | | | | | | | | * dwflpp.cxx (dwflpp::translate_components): let pointers get treated the same as arrays, and add a final DIE dereference for array access. * loc2c.c (c_translate_array): tolerate pointer types * testsuite/systemtap.base/pointer_array.*: new test
* | Merge branch 'master' of git://sources.redhat.com/git/systemtapDave Brolley2009-07-141-15/+0
|\| | | | | | | | | | | Conflicts: main.cxx
| * Remove -O[0123s] gcc optimization flags for gcc pass 4 speedups again.Mark Wielaard2009-07-141-16/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | We cannot guarantee that (un)optimized code compiles and/or generates fully functional code, so don't tempt the user to try it out. * session.h (struct systemtap_session): Remove gcc_flags string field. * hash.cxx (find_script_hash): Don't add gcc_flags. * main.cxx (usage): Remove -O[0123s] documentation. (main): Don't use gcc_flags. * buildrun.cxx (compile_pass): Don't add gcc_flags to EXTRA_CFLAGS. * stap1.in: Remove -O[0123s] documentation. * testsuite/systemtap.base/cache.exp: Remove tests for -O[0123s].
| * Make kernel opt-level the default again.Mark Wielaard2009-07-141-2/+3
| | | | | | | | | | | | | | * main.cxx (main): Default gcc_flags to kernel opt-level (empty). * buildrun.cxx (compile_pass): Add -freorder-blocks back, document choices. * stap.1.in: Document new default opt-level. * testsuite/systemtap.base/cache.exp: Adjust for new caching results.
* | Merge branch 'master' of git://sources.redhat.com/git/systemtapDave Brolley2009-07-131-3/+17
|\| | | | | | | | | | | Conflicts: main.cxx
| * Add -O[0123s] gcc optimization flags for gcc pass 4 speedup.Mark Wielaard2009-07-111-0/+15
| | | | | | | | | | | | | | | | | | | | * session.h (struct systemtap_session): Add gcc_flags string field. * main.cxx (usage): Document -O[0123s]. (main): Default gcc_flags to -O0. Add O:: to getopt_long. Handle case 'O' to set gcc_flags. * buildrun.cxx (compile_pass): Add gcc_flags to EXTRA_CFLAGS. * stap1.in: Add -O[0123s] documentation. * testsuite/systemtap.base/cache.exp: Add tests for -O[0123s].
| * PR3523 was fixed, enable -t cache test case.Mark Wielaard2009-07-111-3/+2
| | | | | | | | * testsuite/systemtap.base/cache.exp: Enable -t tests.
* | Merge branch 'master' of git://sources.redhat.com/git/systemtapDave Brolley2009-06-291-20/+3
|\|
| * PR10335 systemtap.base/strftime.exp hangs.Mark Wielaard2009-06-261-20/+3
| | | | | | | | | | | | | | | | This only happened if there was a lot of cruft in the testsuite dir since expect wasn't "draining" the output of the spawned ls command for some reason. Work around it by just using tcl file globs to match. * testsuite/systemtap.base/strftime.exp: Test with glob and file exists.
* | Disallow embedded C in tapset functions ifor unprivileged users unless ↵Dave Brolley2009-06-251-1/+1
|/ | | | tagged by /* unprivileged */.
* Bump up the default timeout for target_set testJosh Stone2009-06-221-0/+1
| | | | | | Starting the test with a cold cache can take easily longer than dejagnu's default 10 second timeout. I'm bumping it to 180 seconds, the same as in the stap_run library functions.
* Add test for target_set tapset.Przemyslaw Pawelczyk2009-06-222-0/+83
| | | | Signed-off-by: Josh Stone <jistone@redhat.com>
* Correctly find probes for -m32 executables.Stan Cox2009-06-191-10/+18
| | | | | | | * sdt.h (STAP_PROBE_DATA_): Pad with 0 so final probe entry doesn't pickup a stray word. * sdt_misc.exp (static_user_markers.{c,d}): Add bstruct to test struct type handling
* Rename static_uprobes.exp to sdt_misc.expStan Cox2009-06-191-0/+0
|
* Made testcase handle slower systems.David Smith2009-06-181-1/+3
| | | | * testsuite/systemtap.base/flightrec3.exp: Fixed for slower systems.
* Improved error handling.David Smith2009-06-171-9/+9
| | | | * testsuite/systemtap.base/flightrec3.exp: Improved error handling.
* Support -L for kprobe and utrace static user markers.Stan Cox2009-06-161-11/+2
| | | | tapsets.cxx (dwarf_builder::build): Special case listing mode for kprobe and utrace.
* Add experimental utrace/kprobe sdt supportStan Cox2009-06-153-45/+95
| | | | | | | | | | | | * sdt.h (EXPERIMENTAL_UTRACE_SDT, EXPERIMENTAL_KPROBE_SDT): New probe point macros. * dtrace: Add support for creating type debug info, currently invoked with --types. * tapsets.cxx (probe_table::convert_probe): New. (probe_table::convert_location): New. (dwarf_builder::build): Use it to simplify probe point handling. * sdt.exp (pbtype_flags, pbtype_mssgs): New to also test kprobe and utrace. * static_uprobes.exp (pbtype_flags, pbtype_mssgs): New to also test kprobe and utrace.
* Add exelib uprobes test framework.Mark Wielaard2009-06-128-296/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | Tests uprobes placed in executables and shared libraries on different arches (32-on-64 currently disabled), gcc/g++, optimizations (currently disabled), prelinked libs (currently disabled), seperate libs/exe debuginfo and pie executables. * testsuite/systemtap.base/uprobes_exe.c: Moved to... * testsuite/systemtap.exelib/uprobes_exe.c: From systemtap.base. * testsuite/systemtap.base/uprobes_lib.c: Moved to... * testsuite/systemtap.exelib/uprobes_lib.c: From systemtap.base. * testsuite/systemtap.base/uprobes_lib.exp: Rewritten as... * testsuite/systemtap.exelib/lib.tcl: From uprobes_lib.exp. * testsuite/systemtap.base/uprobes_lib.stp: Rewritten as... * testsuite/systemtap.exelib/lib.stp: From uprobes_lib.stp. * testsuite/systemtap.base/uprobes_uname.exp: Rewritten as... * testsuite/systemtap.exelib/uname.tcl: From uprobes_uname.exp. * testsuite/systemtap.base/uprobes_uname.stp: Rewritten as... * testsuite/systemtap.exelib/uname.stp: From uprobes_uname.stp. * testsuite/systemtap.base/uprobes_ustack.exp: Rewritten as... * testsuite/systemtap.exelib/ustack.tcl: From uprobes_ustack.exp. * testsuite/systemtap.base/uprobes_ustack.stp: Rewritten as... * testsuite/systemtap.exelib/ustack.stp: From uprobes_ustack.stp. * testsuite/systemtap.exelib/exelib.exp: New exelib uprobes framework. * testsuite/systemtap.exelib/cleanup.tcl: New file.
* Fix condition propagation across aliasesJosh Stone2009-06-092-0/+31
| | | | | | | | | | When an instance of an alias has a condition, that condition gets propagated to each of the locations that the alias defines. However, the copy of the location list was not a deep copy, and so all other instances of the alias would also incorrectly receive the condition. This patch makes the location list copy a little deeper, and adds a test case which demonstrates the issue.
* Better sdt.exp test cleanup.David Smith2009-06-011-1/+2
| | | | * testsuite/systemtap.base/sdt.exp: Better cleanup.
* More testsuite tweaks to make it work with SYSCALL_WRAPPERSAnanth N Mavinakayanahalli2009-05-282-3/+3
|
* PR10190: Suppress warnings for optional kprobesJosh Stone2009-05-221-1/+14
| | | | | | When a kernel.function or kprobe.function fails in registration, we usually print a WARNING and move on. With this patch, kprobes that have the optional '?' flag will not print any WARNING.
* PR10177: init/kill time in sleepy context onlyJosh Stone2009-05-201-29/+0
| | | | | | | | | | | | Previously, _stp_init_time and _stp_kill_time were being called from begin/end/error probes, which will run with preemption disabled. The BUG reported on RT kernels showed that cpufreq_unregister_notifier can end up sleeping, which violates our preemption block. This patch moves the init/kill into systemtap_module_init/exit, where it is safe to sleep. The code maintains a new predicate with the define STAP_NEED_GETTIMEOFDAY, so we don't still incur any timer overhead if it's not used.
* PR10091 fixes.David Smith2009-05-181-30/+141
| | | | | | | | * runtime/itrace.c (usr_itrace_report_signal): Add a workaround for ppc-specific problem. * testsuite/systemtap.base/itrace.exp: Improved tests. Improved test completeness. Will also no longer give fails for systems that don't support single or block step (will give xfails instead).
* flightrec3.exp uses cpus as array, so rename skipped.exp cpus var to nr_cpus.Mark Wielaard2009-05-151-3/+3
| | | | | | | Works around a make installcheck issue that resulted in skipped.exp failing because of "ERROR: can't set "cpus": variable is array" * testsuite/systemtap.base/skipped.exp: Renamed cpus variable to nr_cpus.
* Set explicit longer, 60 second, timeout for alternatives.exp.Mark Wielaard2009-05-151-2/+3
| | | | | | | | In an make installcheck run this is the first script that goes through the full kernel debuginfo which might take a bit. * testsuite/systemtap.base/alternatives.exp: Set timeout to 60, verbose log EOF or TIMEOUT when they occur.
* PR 6930: Add additional testcases for flight recorder modeKeiichi KII2009-05-132-0/+84
| | | | | | | | | | | | | | | | | * testsuite/parseko/cmdline17.stp: command line check - bad combination with -D and -L * testsuite/parseko/cmdline18.stp: command line check - bad combination with -D and -d * testsuite/parseko/cmdline19.stp: command line check - bad combination with -D and -c * testsuite/parseko/cmdline20.stp: command line check - need output file with -D * testsuite/parseko/cmdline21.stp: command line check - need output file with -S * testsuite/systemtap.base/flightrec3.exp: New test case for file switching with bulk mode * testsuite/systemtap.base/flightrec3.stp: Test script for file switching per cpu
* fix permissions of some testsuite filesFrank Ch. Eigler2009-05-071-0/+0
| | | | Reported-By: Petr Muller <pmuller@redhat.com>
* PR10102: tolerate the failure related to optional probeWenji Huang2009-05-051-1/+9
| | | | | | | | | This patch will make stap silently accept the failure related to optional probe. It puts try/catch around find_and_build which can cover most probe types. The specific treatment for dwarf_derived_probe in commit ed82b7c902d6a2e26452ec51c9cdb9665dbf9e97 is reverted.
* Revert "Fix kprobes.exp."Ananth N Mavinakayanahalli2009-05-051-6/+1
| | | | This reverts commit 97d1fa6e24d8d4e8ceefc62f0d4a7f93a18e4125.
* Tweak alternatives.expWenji Huang2009-05-041-2/+2
|
* Fix kprobes.exp.Ananth N Mavinakayanahalli2009-05-041-1/+6
| | | | Patch from Prerna Saxena.
* Fix funtion -> function typo in alternatives.exp.Mark Wielaard2009-05-021-1/+1
| | | | * testsuite/systemtap.base/alternatives.exp (local1_script): Fix typo.
* PR10007: Avoid probing syscall entry points in the testsuite.Ananth N Mavinakayanahalli2009-04-306-20/+20
| | | | While there, fix minor issues with the s390x syscall tapset.
* Use sockaddr instead of timeval in @cast testJosh Stone2009-04-292-11/+15
| | | | | | | | Using timeval had problems on big-endian multi-arch platforms (ppc64), because the user tv_sec used in the @cast didn't match the kernel tv_sec used to provide a pointer. Hopefully reading from a sockaddr should be more robust, as that type doesn't appear to need any compat wrappers for multi-archs.