summaryrefslogtreecommitdiffstats
path: root/testsuite
Commit message (Collapse)AuthorAgeFilesLines
* PR11343: backward compatibility option/conditionalFrank Ch. Eigler2010-04-082-0/+6
| | | | | | | | * main.cxx: Add "--compatible=VERSION" option. * session.h (compatible): Store it. * parse.cxx (eval_pp_conditional): Look at it as %( systemtap_v CMP VALUE ... %) * stap.1.in: Document it. * testsuite/parseko/preprocess17.stp, parseok/twenty.stp: Test it.
* Added kernel_pointer()/set_kernel_pointer() tapset functions.David Smith2010-04-074-1/+6
| | | | | | | | | | | * tapset/conversions.stp (kernel_pointer): New function. * tapset/conversions-guru.stp (set_kernel_pointer): Ditto. * testsuite/buildok/conversions-embedded.stp: Added kernel_pointer() test. * testsuite/buildok/conversions.stp: Ditto. * testsuite/buildok/set_kernel.stp: Added set_kernel_pointer() test. * tapset/nfs.stp: Removed __d_loff_t() function. Uses new kernel_pointer() function instead. * testsuite/buildok/nfs-embedded.stp: Removed __d_loff_t() test.
* Added atomic_read() embedded-C function and tests.David Smith2010-04-063-13/+79
| | | | | | | | * tapset/atomic.stp: Added atomic_read(). * testsuite/buildok/atomic.stp: Added atomic_read() compile test. * testsuite/systemtap.base/atomic.exp: Added atomic_read() tests. * testsuite/lib/stap_run_error.exp (stap_run_error): Logs stap command and tries to ensure inferior process is killed.
* Add set_kernel_* bad-address testsJosh Stone2010-04-011-0/+30
| | | | * testsuite/systemtap.base/set_kernel.stp: try/catch addresses of -1.
* Test that all of the set_kernel_* functions workJosh Stone2010-04-013-0/+107
| | | | | * testsuite/buildok/set_kernel.stp: Test that all can build. * testsuite/systemtap.base/set_kernel.stp: Test that values are all set.
* PR9958: Test that the guru notation is workingJosh Stone2010-04-012-0/+8
| | | | | * testsuite/semko/gurufunc.stp: Test rejection without -g. * testsuite/semok/gurufunc.stp: Test acceptance with -g.
* Make sure that the testsuite can find its serverJosh Stone2010-03-311-0/+7
| | | | | * testsuite/lib/systemtap.exp (setup_server): Use stap-find-servers to check that the firewall is letting us through to the server.
* Use a different PATH approach for pfilesJosh Stone2010-03-311-5/+2
| | | | | | | //bin/true && exec stap -g $0 ${1+"$@"} This keeps it as an entirely valid stap script, so manual stap invocation still works (as in pfiles.meta).
* testsuite: convert pfiles.stp to $PATH-based stap invocation formFrank Ch. Eigler2010-03-301-1/+7
|
* testsuite: use #! /usr/bin/env stap instead of /usr/bin/stapFrank Ch. Eigler2010-03-302-2/+2
|
* PR11399: Allow '**' to match tapsets across '.'Josh Stone2010-03-252-0/+9
| | | | | | | | | | | | | | Normally wildcards are constrained to matching a single probe point component between the '.' separator. This patch enables '**' to match across the separator. Probe point parameters are still absolute separators though, as there's not really a meaningful semantic we could use to cross them with '**'. * elaborate.cxx (isdoubleglob): Check for '**'. (match_node::find_and_build): Recurse '**' to cross separators. * testsuite/semok/doubleglob.stp: New test of broad wildcards. * testsuite/semko/doubleglob.stp: New negative test.
* Small cleanup of context.exp.David Smith2010-03-241-15/+18
| | | | | * testsuite/systemtap.context/context.exp: Used "make -C $build_dir" to avoid using 'cd'. Added error handling.
* Improved atomic.exp testcase by removing the need for an external module.David Smith2010-03-244-118/+26
| | | | | | | | * testsuite/systemtap.base/atomic.exp: Removed the need for the external module by putting the atomic_long_t inside the stap module. * testsuite/systemtap.base/atomic_module.c: Removed. * testsuite/systemtap.base/atomic_module.makefile: Ditto. * testsuite/lib/stap_run_error.exp (stap_run_error): Better error handling.
* releng: bump to version 1.2Frank Ch. Eigler2010-03-222-11/+11
|
* Support signalfd4 in syscalls2.stp tapset.Mark Wielaard2010-03-211-0/+35
| | | | | | | * tapset/aux_syscalls.stp (_signalfd4_flags_str): New utility function. * tapset/syscalls2.stp (syscall.signalfd[.return]): Handle signalfd4 variant when available. * testsuite/systemtap.syscall/signalfd.c: New test.
* Add inotify_init1() and inotify_add_watch() mask string support.Mark Wielaard2010-03-211-0/+28
| | | | | | | | * tapset/aux_syscalls.stp (_inotify_watch_mask_str): New helper function. (_inotify_init1_flag_str): Likewise. * tapset/syscalls.stp (inotify_add_watch): Stringify watch mask. (syscall.inotify_init[.return]): Add inotify_init1() support. * testsuite/systemtap.syscall/inotify.c: New test.
* Add support for eventfd2 to syscall.stp tapset.Mark Wielaard2010-03-211-0/+21
| | | | | | | * tapset/aux_syscalls.stp (_eventfd2_flag_str): New utility function. * tapset/syscalls.stp (syscall.eventfd[.return]): Add alternatives to handle eventfd2. * testsuite/systemtap.syscall/eventfd.c: New test.
* Explicitly test first kernel version in utimensat syscall test.Mark Wielaard2010-03-211-1/+2
| | | | | * testsuite/systemtap.syscall/futimes.c: utimensat was only available since 2.6.22, but libc headers might already define __NR_utimensat.
* Add support for dup3 to syscall.stp tapset.Mark Wielaard2010-03-211-0/+43
| | | | | | * tapset/aux_syscalls.stp (_dup3_flag_str): New helper function. * tapset/syscalls.stp (syscall.dup2): Add alternatives to handle dup3 also. * testsuite/systemtap.syscall/dup.c: New testcase.
* Support epoll_create1 syscall.Mark Wielaard2010-03-211-0/+5
| | | | | | * tapset/aux_syscalls.stp (_epoll_create1_flag_str): New helper function. * tapset/syscalls.stp (syscall.epoll_create[.return]): Match epoll_creat1 if available.
* PR11405: Warn and continue for parsing errors in tapsetsJosh Stone2010-03-204-0/+19
| | | | | | | | | | | | When we start seeing tapsets provided by third parties, any errors in their files should not be fatal to us. Since we don't really know which tapsets are our own, this leniency applies to all. * main.cxx (main): Warn on tapset errors, but continue unless -W. * testsuite/parseko/bad_tapset/foo.stp: New bogus tapset. * testsuite/parseko/bad_tapset.stp: Check that "-W -I bad_tapset" fails. * testsuite/parseok/bad_tapset.stp: Check that "-I bad_tapset" succeeds. * testsuite/parseok/all_tapsets.stp: Check -W with the default tapsets.
* Bump the sample indexesJosh Stone2010-03-194-10/+10
|
* Add ia64 pipe result support. Relax pipe syscall test a little.Mark Wielaard2010-03-191-3/+3
| | | | | | * tapset/syscalls2.stp (syscall.pipe.return): ia64 provides pipe0, pipe1 results through (user) registers. * testsuite/systemtap.syscall/pipe.c: Only expect zero as input fildes.
* PR909: add a baby test caseFrank Ch. Eigler2010-03-192-20/+15
| | | | | | * testsuite/systemtap.examples/profiling/thread-times.stp: Prefer perf.sw.cpu_clock to timer.profile. Prettify output by including comm string.
* Add testcase for syscall.pipe.Mark Wielaard2010-03-191-0/+27
|
* PR11346: Move the skip-badvars logic into const-foldingJosh Stone2010-03-181-0/+7
| | | | | | | | | | | | | | | The const_folder is where we prune constant expressions, like conditionals based on a @defined($foo), so we want to give this a chance to work before skip-badvars comes in and throws a warning. As an added bonus, this makes skip-badvars more generic, so it will work even for non-dwarf $target variables. * elaborate.cxx (const_folder::visit_target_symbol): Enact skip-badvars. * tapsets.cxx (dwarf_var_expanding_visitor::visit_target_symbol): Don't worry about badvars here anymore. Save the error now, clean up later. * testsuite/semok/badvar_undefined.stp: Test that @defined with skip-badvars doesn't throw any warnings.
* testuite: modargs.exp shouldn't execute things without installcheckFrank Ch. Eigler2010-03-181-2/+5
|
* Fixed PR 11372 by removing (most) embedded-C from proc_mem.stp.David Smith2010-03-164-0/+184
| | | | | | | | | * tapset/proc_mem.stp: Tried to remove as much embedded-C as possible. * tapset/atomic.stp: New file. * testsuite/buildok/atomic.stp: New file. * testsuite/systemtap.base/atomic.exp: Ditto. * testsuite/systemtap.base/atomic_module.c: Ditto. * testsuite/systemtap.base/atomic_module.makefile: Ditto.
* Fixed regexp typo in stap_run_error.exp.David Smith2010-03-161-1/+1
| | | | * testsuite/lib/stap_run_error.exp: Fixed regexp typo.
* Move common code from {maxmemory.exp,overload.exp} into stap_run_error.exp.David Smith2010-03-164-113/+70
| | | | | | | | * testsuite/lib/stap_run_error.exp: New file. * testsuite/config/unix.exp: Loads stap_run_error.exp. * testsuite/systemtap.base/maxmemory.exp: Uses stap_run_error function instead of local code. * testsuite/systemtap.base/overload.exp: Ditto.
* Update the nfsd buildok test suite probesSteve Dickson2010-03-161-1/+0
| | | | | | | The __get_fh() is no longer exists due to the use of the @cast defines, so its removed Signed-off-by: Steve Dickson <steved@redhat.com>
* Get d_path's root natively with @castJosh Stone2010-03-121-0/+8
| | | | | | | | | | | As mjw's aborted commit 5ab0b1b6 attempted, we can use a @cast to get the filesystem root for the current task instead of embedded-C. I've left it using the kernel debuginfo instead of headers for now, because all of the neighboring @casts are doing the same. * tapset/dentry.stp (d_path): Use @cast to get the root. (__dentry_get_current_root): Remove, no longer needed. * testsuite/buildok/dentry.stp: Test that dentry's functions all build.
* PR11373 kludge: clean up testsuite/stap_*.ko upon 'make clean'Frank Ch. Eigler2010-03-122-0/+8
|
* Fix the edge-case of MAXTRYLOCK=0Josh Stone2010-03-111-1/+7
| | | | | | | | | | | | | | | | | We didn't really have good semantics for what is meant by MAXTRYLOCK=0, so when skipped.exp tried it, we ended up locking the variable and then reporting a skip without ever unlocking it. This is now cleaning up the semantics such that MAXTRYLOCK defines how many times we should loop if the lock is busy. Thus MAXTRYLOCK=0 means we try only once and fail immediately. The testcase was accidentally creating contention due to the broken unlock behavior. We now have to try a bit harder to create real contention, so some lengthy delays are inserted to hoard the lock. * runtime/probe_lock.h (stp_probe_lock): Fix the skip behavior. * testsuite/systemtap.base/skipped.exp: Add a big udelay.
* PR11370: Add multi-header @castsJosh Stone2010-03-101-0/+3
| | | | | | | | | | Sometimes you need multiple headers to fully describe a type, so we now permit them to be listed together, e.g. "kernel<foo.h><bar.h>". * buildrun.cxx (make_typequery): Split the input string into a vector. (make_typequery_kmod, make_typequery_umod): Use the vector of headers. * testsuite/semok/cast.stp: Add a multi-header case. * stap.1.in, NEWS: Document it.
* Removed unneeded '-u' switch from 3 tests.David Smith2010-03-103-3/+3
| | | | | | | * testsuite/buildok/scheduler-test-tracepoints.stp: Removed unneeded '-u' option. * testsuite/buildok/vm.tracepoints.kmalloc.stp: Ditto. * testsuite/buildok/vm.tracepoints.stp: Ditto.
* PR11360: Make @defined and -L play niceJosh Stone2010-03-091-0/+18
| | | | | | | | | | | | | The constant-folding is now enabled for s.listing_mode_vars, despite all other optimizations being disabled. This is needed so we can prune any invalid branches that are gated by @defined. * elaborate.cxx (semantic_pass): Leave the optimization decision to the optimization passes themselves. (semantic_pass_optimize1): Predicate most optimizations, but enable the constant-folding for listing_mode_vars too. (semantic_pass_optimize2): Predicate all (1) optimizations. * testsuite/semok/defined_list_vars.stp: New test.
* Update tests to check for uprobes instead of utrace.David Smith2010-03-093-16/+17
| | | | | | | * testsuite/systemtap.context/uprobe_stmt_num.exp: Change utrace test to uprobes test. * testsuite/systemtap.context/uprobe_uaddr.exp: Ditto. * testsuite/systemtap.base/bz5274.exp: Ditto.
* PR 11338 (partial): Used '@defined()' in tty, scheduler, and vfs tapsets.David Smith2010-03-081-1/+1
| | | | | | | | | | * tapset/tty.stp: Used '@defined()' to remove kernel version checks. * tapset/scheduler.stp: Ditto. * tapset/vfs.stp: Used '@defined()' to remove kernel version checks. Also made several probe points optional instead of using kernel version checks to know when to include them. * testsuite/buildok/vfs_testcase.stp: Removed stap '-u' (unoptimized mode) switch, since '@defined()' doesn't work in unoptimized mode.
* new sample: varwatchFrank Ch. Eigler2010-03-077-48/+77
|
* Move semko/nineteen.stp to semokJosh Stone2010-03-061-2/+1
| | | | | | | | | The *ko tests are for things that SHOULD fail, but semko/nineteen is a test that should pass but often doesn't (due to inline var trouble). It should be in semok to set the expectation properly. It does pass on F12 now, but if we want to silence the error for older gcc, setup_kfail is the right approach.
* Update example indices.William Cohen2010-03-054-0/+24
|
* Add cmdline argument fetching for current process to context.stp tapset.Mark Wielaard2010-03-041-0/+4
| | | | | * tapset/context.stp: Add cmdline_str, cmdline_arg and cmdline_args. * testsuite/buildok/context_test.stp: Add tests for new functions.
* Filter the path of stap as called by the client and server.Dave Brolley2010-03-041-8/+13
|
* Add task_stime_tid(), task_utime_tid() and task_time_string_tid() support.Mark Wielaard2010-03-031-0/+5
| | | | | | * tapset/task_time.stp: New functions task_stime_tid(), task_utime_tid() and task_time_string_tid(). * testsuite/buildok/task_test.stp: Add tests.
* Add documentation and tests for proc_mem_*_pid functions.Mark Wielaard2010-03-031-0/+9
|
* PR11004: try / catch error-handling script syntaxFrank Ch. Eigler2010-03-033-0/+81
| | | | | | | | | | | | | | | * parse.h (try_block): New class. Update basic visitors. * staptree.cxx: Implement basic visitors. * parse.cxx (expect_kw): Fix to actually look for keywords. (parse_try_block): New function. (lexer ctor): Designate 'try' and 'catch' as keywords. * elaborate.cxx (dead_assignment_remover, dead_statmtexpr_remover): Optimize. (other visitors): Implement. * translate.cxx (c_unparser): Implement via super-handy __local__ labels. (emit_probe, emit_function): Make outer out: label also __local__. * testsuite/buildok/fortyone.stp, semko/fortynine.stp, systemtap.base/trycatch.exp: Test it. * NEWS, doc/langref.txt, stap.1.in: Document it.
* Squash elision warnings on synthetic functionsJosh Stone2010-02-261-0/+10
| | | | | | | | | | | | | | * staptree.h (functiondecl): Add a synthetic flag. * elaborate.cxx (semantic_pass_opt1): Don't warn about synthetic funcs. * tapsets.cxx (dwarf_var_expanding_visitor::visit_target_symbol): Mark the new function as synthetic. (dwarf_cast_expanding_visitor::visit_cast_op): Ditto. (tracepoint_var_expanding_visitor::visit_target_symbol_arg): Ditto. * tapset-perfmon.cxx (perfmon_var_expanding_visitor::visit_target_symbol): Ditto. * tapset-procfs.cxx (procfs_var_expanding_visitor::visit_target_symbol): Ditto. * testsuite/semok/thirtyeight.stp: New check with -W and @defined.
* PR11075: -W option to turn warnings into errorsFrank Ch. Eigler2010-02-252-0/+12
| | | | | | | | * session.h * NEWS: Discuss it. * main.cxx: Parse it. * session.h (num_errors): Provide it. * semok/fortyeight.stp, semok/thirtyseven.stp: Test it.
* Ensure that @defined()==1 goes the right wayJosh Stone2010-02-251-10/+10
| | | | | | | We need to poison the false case of valid "@defined(x)?x:y", so we know that the @defined is correctly leading to the true case only. * testsuite/semok/thirtysix.stp: poison false in valid cases.