summaryrefslogtreecommitdiffstats
path: root/testsuite/semko
Commit message (Collapse)AuthorAgeFilesLines
* PR9958: Test that the guru notation is workingJosh Stone2010-04-011-0/+4
| | | | | * testsuite/semko/gurufunc.stp: Test rejection without -g. * testsuite/semok/gurufunc.stp: Test acceptance with -g.
* PR11399: Allow '**' to match tapsets across '.'Josh Stone2010-03-251-0/+3
| | | | | | | | | | | | | | 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.
* Move semko/nineteen.stp to semokJosh Stone2010-03-061-8/+0
| | | | | | | | | 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.
* PR11004: try / catch error-handling script syntaxFrank Ch. Eigler2010-03-031-0/+3
| | | | | | | | | | | | | | | * 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.
* PR11075: -W option to turn warnings into errorsFrank Ch. Eigler2010-02-251-0/+6
| | | | | | | | * session.h * NEWS: Discuss it. * main.cxx: Parse it. * session.h (num_errors): Provide it. * semok/fortyeight.stp, semok/thirtyseven.stp: Test it.
* Fixed pr 10690 by adding '.maxsize(NNN)' procfs read probe parameter.David Smith2010-02-253-0/+12
| | | | | | | | | | | | | | | | | | | | | | * 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.
* Rework identification of probes allowed for unprivileged users.Dave Brolley2010-02-151-4/+0
| | | | | | | - 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.
* 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.
* Faulty conditionals are parse errors, not semantical errors.Mark Wielaard2010-01-131-5/+0
| | | | | | | | | The test was correct, the given construct should fail. But it fails because it is a parse error, not because it is a semantical error. So move into the right pass1-4 sub-directory. * testsuite/semko/conditional.stp: Moved to... * testsuite/parseko/conditional.stp: ... here.
* PR10747: check invalid preprocessor constructWenji Huang2010-01-121-0/+5
| | | | | * parse.cxx (scan_pp): Match '%(' and '%?'. * testsuite/semko/conditional.stp: New test.
* Let semko/utrace.stp fail even with CONFIG_UTRACE=yJosh Stone2009-10-131-1/+1
|
* PR10746: improve error message on utrace-less kernelsFrank Ch. Eigler2009-10-081-0/+3
| | | | | | | * tapset-itrace.exp (itrace_derived_probe ctor): Fail if !CONFIG_UTRACE. * tapset-utrace.exp (utrace_derived_probe ctor): Fail if !CONFIG_UTRACE. * tapsets.cxx (dwarf_builder::build): Fail process.* if !CONFIG_UTRACE. * testsuite/semko/utrace.stp: New test.
* testsuite: reduce verbosity of (deprecated?) nodwf07.stp testFrank Ch. Eigler2009-09-081-1/+1
| | | | | * testsuite/semko/nodwf07.stp: Add >/dev/null at end, since stap -p2 for this script generates turbomucho text.
* PR5930: Address-op for $target and @cast membersJosh Stone2009-07-153-0/+18
| | | | | | | | | | | | | | | | 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
* PR10007: Avoid probing syscall entry points in the testsuite.Ananth N Mavinakayanahalli2009-04-308-9/+9
| | | | While there, fix minor issues with the s390x syscall tapset.
* Updated utrace tests.David Smith2009-04-219-31/+3
| | | | | | | | | | | | | | | | 2009-04-21 David Smith <dsmith@redhat.com> * testsuite/semok/utrace01.stp: New test. * testsuite/parseko/utrace01.stp: Updated test. * testsuite/semko/utrace03.stp: Ditto. * testsuite/semko/utrace04.stp: Ditto. * testsuite/semko/utrace01.stp: Deleted unneeded test. * testsuite/semko/utrace08.stp: Ditto. * testsuite/semko/utrace09.stp: Ditto. * testsuite/semko/utrace10.stp: Ditto. * testsuite/semko/utrace11.stp: Ditto. * testsuite/semko/utrace12.stp: Ditto. * testsuite/semko/utrace13.stp: Ditto.
* Adding test case for PR9719 fixRajan Arora2009-02-181-0/+8
|
* Added tests for utrace-syscall probe context variables.Masami Hiramatsu2008-09-098-0/+32
|
* PR 6445 (partial). Implemented system-wide utrace probes.David Smith2008-08-121-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | 2008-08-12 David Smith <dsmith@redhat.com> PR 6445 (partial) * tapsets.cxx (utrace_builder::build): Validates pid and allows probing of "*" to mean all threads. * stapprobes.5.in: Added note about a process path of "*" means to probe all threads. 2008-08-12 David Smith <dsmith@redhat.com> PR 6445 (partial) * task_finder.c (stap_register_task_finder_target): Handles probing all threads. (__stp_utrace_attach_match_filename): Ditto. (stap_start_task_finder): Ditto. 2008-08-12 David Smith <dsmith@redhat.com> PR 6445 (partial) * systemtap.base/utrace_p4.exp: Added test that probes all threads. * semko/utrace14.stp: New test.
* PR5049: fix overbroad effects of naive "*" prefixing; instead use optional ↵Frank Ch. Eigler2008-08-111-0/+5
| | | | "*/" only.
* Merge commit 'origin/dwarfless'Jim Keniston2008-05-129-0/+127
|\ | | | | | | PR 4311 - Function boundary tracing without debuginfo: Phases 1 and 2
| * * testsuite/{semok,semko}/nodwf*.stpJim Keniston2008-04-189-0/+127
| | | | | | | | Shows what we currently can and can't do.
* | PR6466: broad side-effect free statement elisionFrank Ch. Eigler2008-04-291-2/+2
| |
* | Renamed semko/utrace02.stp to parseko/utrace01.stp.David Smith2008-04-221-4/+0
| | | | | | | | | | | | | | 2008-04-21 David Smith <dsmith@redhat.com> * parseko/utrace01.stp: Renamed from semko/utrace02.stp (since it received a parse error, not a semantic error).
* | Added new utrace tests.David Smith2008-04-1713-0/+52
|/ | | | | | | | | | | | | | | | | | | | | 2008-04-17 David Smith <dsmith@redhat.com> * buildok/utrace01.stp: New test. * buildok/utrace02.stp: Ditto. * buildok/utrace03.stp: Ditto. * semko/utrace01.stp: Ditto. * semko/utrace02.stp: Ditto. * semko/utrace03.stp: Ditto. * semko/utrace04.stp: Ditto. * semko/utrace05.stp: Ditto. * semko/utrace06.stp: Ditto. * semko/utrace07.stp: Ditto. * semko/utrace08.stp: Ditto. * semko/utrace09.stp: Ditto. * semko/utrace10.stp: Ditto. * semko/utrace11.stp: Ditto. * semko/utrace12.stp: Ditto. * semko/utrace13.stp: Ditto.
* 2008-03-20 Frank Ch. Eigler <fche@elastic.org>fche2008-03-201-0/+3
| | | | | | | | PR 5956. * null.stp: New file, defining global NULL=0. PR 5956. * semko/fortyfive.stp: New test.
* 2008-02-22 Frank Ch. Eigler <fche@elastic.org>fche2008-02-231-1/+1
| | | | | * semko/fortyfive.stp: Add ".call" to exclude false (?) positives from inlined instances defined in header files.
* PR5766: back to regexp-based blacklistingfche2008-02-191-0/+3
| | | | | | | | | | | | | | 2008-02-19 Frank Ch. Eigler <fche@elastic.org> PR 5766. * tapsets.cxx (build_blacklist): Switch (back) to regexp-based blacklist construction ... (blacklist_p): ... and querying. 2008-02-19 Frank Ch. Eigler <fche@elastic.org> PR5766. * semko/fortyfive.stp: New test.
* PR5771: adapt to earlier error checkingfche2008-02-191-0/+6
| | | | | * transko/one.stp: Remove, or rather, move to this ... * semko/zero.stp: new file.
* 2008-02-13 Dave Brolley <brolley@redhat.com>brolley2008-02-132-0/+9
| | | | | | | | | | | | | | | | | PR5609 * staptree.h (probe::collect_derivation_chain): Now takes vector<probe*>. (probe::get_alias): New virtual method. * elaborate.h (derived_probe::collect_derivation_chain): Now takes vector<probe*>. * staptree.cxx (probe::collect_derivation_chain): Now takes vector<probe*>. Don't cast 'this' to (derived_probe*). * elaborate.cxx (derived_probe::collect_derivation_chain): Now takes vector<probe*>. (alias_derived_probe::get_alias): New virtual method. (alias_derived_probe::alias): New member. (alias_expansion_builder::build): Call checkForRecursiveExpansion and emit a diagnostic if recursion is detected. Pass alias to constructor of alias_derived_probe. (alias_expansion_builder::checkForRecursiveExpansion): New method. * coveragedb.cxx: Pass vector<probe*> on all calls to collect_derivation_chain.
* perms2fche2008-01-282-0/+0
|
* PR5673: reduce total size of generated .ko's from wildly wildcarded scriptsfche2008-01-262-0/+10
| | | | | | | | | | | | | | | 2008-01-26 Frank Ch. Eigler <fche@elastic.org> PR 5673. * tapsets.cxx (dwarf_derived_probe_group): Split stap_dwarf_probes[] into bss-carried kprobes structs. Tune embedded strings for minimizing relocation-vs-fixed-buffer wastage. * tapsets.cxx (dwarf_derived_probe): Impose .maxactive() limits. 2008-01-26 Frank Ch. Eigler <fche@elastic.org> PR 5673. * testsuite/parseko/maxactive{04,05}.stp: New tests.
* PR 4936: probe pont conditions part 2; reorg in prep for full rewritingfche2008-01-183-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2008-01-17 Frank Ch. Eigler <fche@elastic.org> PR 4935. Reorganize probe condition implementation. * elaborate.cxx (add_condition): New function. (derived_probe): Remove condition member. (derived_probe ctors): Assert non-null incoming probe/location ptrs. (insert_condition_statement): Remove; turn into ... (semantic_pass_conditions): New pass-2 subpass. (semantic_pass_symbols, visit_symbol, visit_functioncall, find_var): Detect some condition-related error cases. (match_key): Change type to exp_type from tok_type. Update callers. (alias_expansion_builder): Propagate probe conditions. * staptree.cxx (probe): Remove condition field and related functions. * tapsets.cxx (dwarf_derived_probe ctor): Compute replacement wildcard-expanded probe_point preserving more of the original location. (mark_derived_probe ctor): Make similar to others - take location rather than condition parameters. * translate.cxx (emit_common_header): Tweak ordering of tmpcounter traversal and hashkey expression generation. * elaborate.h: Corresponding changes. 2008-01-17 Frank Ch. Eigler <fche@elastic.org> PR 4935. * semko/forty.stp, fortyone.stp, fortytwo.stp: New tests. * semok/twentynine.stp: Weaken test since condition expressions have become more tightly constrained.
* 2008-01-17 David Smith <dsmith@redhat.com>dsmith2008-01-172-0/+8
| | | | | | * semko/procfs11.stp: Added test for invalid use of procfs probe '$value' target variable. * semko/procfs12.stp: Ditto.
* 2007-12-05 Masami Hiramatsu <mhiramat@redhat.com>hiramatu2007-12-051-0/+3
| | | | | | | | | | | | | | | | | | PR 4935 * tapsets.cxx (dwarf_derived_probe::dwarf_derived_probe): Allow user to access kernel variables in the condition of probe points. * stapprobes.5.in : Document the conditional probe point. * NEWS : Ditto. * parseok/five.stp: Add an example of conditional probe point. * parseko/probepoint04.stp: New test for conditional probe point. * parseko/probepoint05.stp: Ditto. * parseko/probepoint06.stp: Ditto. * parseko/probepoint07.stp: Ditto. * parseko/probepoint08.stp: Ditto. * parseko/probepoint09.stp: Ditto. * semok/twentynine.stp: Ditto. * semko/thirtynine.stp: Ditto. * systemtap.base/onoffprobe.*: Ditto.
* 2007-09-17 David Smith <dsmith@redhat.com>dsmith2007-09-175-0/+25
| | | | | | | | * semko/procfs06.stp: New test case. * semko/procfs07.stp: Ditto. * semko/procfs08.stp: Ditto. * semko/procfs09.stp: Ditto. * semko/procfs10.stp: Ditto.
* 2007-09-14 David Smith <dsmith@redhat.com>dsmith2007-09-145-0/+22
| | | | | | | | | | PR 1154 * buildok/procfs01.stp: New test case. * semko/procfs01.stp: Ditto. * semko/procfs02.stp: Ditto. * semko/procfs03.stp: Ditto. * semko/procfs04.stp: Ditto. * semko/procfs05.stp: Ditto.
* 2007-08-24 Frank Ch. Eigler <fche@redhat.com>fche2007-08-241-5/+0
| | | | | | PR 4899 * semko/thirtynine.stp: Removed test, now that bug #1305 has become mooted/undone.
* 2007-05-06 Frank Ch. Eigler <fche@elastic.org>fche2007-05-063-2/+7
| | | | | | | | | | | | PR 1305. * tapsets.cxx (iterate_over_srcfile_lines): Exclude approximate file:lineno matches optimistically returned by dwarf_getsrc_file. (query_srcfile_line): Use Dwarf_Line line number for constructing derived_probe location string. 2007-05-06 Frank Ch. Eigler <fche@elastic.org> * semko/thirtynine.stp: New test.
* 2007-04-02 Frank Ch. Eigler <fche@elastic.org>fche2007-04-021-3/+3
| | | | | | | | | | | | * tapsets.cxx (query_dwarf_func): Skip non-inlined functions for .function().inline case. 2007-04-02 Frank Ch. Eigler <fche@elastic.org> * socket-trace.stp, small_demos/prof.stp, top.stp: Adapt to .inline -> .function change. * semko/twentyone.stp: Ditto.
* 2007-03-30 Frank Ch. Eigler <fche@redhat.com>fche2007-03-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | PR 1570 * NEWS: Document probe handler language change re. inline functions. * stapprobes.5.in: Likewise. * tapsets.cxx: Many changes to simplify caches and implement new handling of inline functions, removed of stubs for future probes. * elaborate.cxx (derived_probe printsig_nested): New function. * elaborate.h: Declare it. * main.cxx (usage): Clarify "-r" meaning. (main): Tweak related "-p 4" message. 2007-03-30 Frank Ch. Eigler <fche@elastic.org> PR 1570. * memory.stp, scheduler.stp, signal.stp, LKET/signal.stp: Adapt to .inline -> .function change. 2007-03-30 Frank Ch. Eigler <fche@elastic.org> PR 1570 * */*.stp: Adapt to .inline -> .function change. * lib/stap_run.exp, stap_run2.exp, stap_run_binary.exp: Shorten pass/fail dejagnu log lines. * systemtap.syscall/sys.stp, test.tcl: Make slightly more compatible and failure more verbose.
* 2007-03-22 Frank Ch. Eigler <fche@elastic.org>fche2007-03-222-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | PR 4224. * staptree.h (probe): Add privileged field. * elaborate.cxx, parse.cxx: Pass privileged flag to probes. * tapsets.cxx (dwarf_query): Add has_absolute field. (dwarf_derived_probe ctor): Tolerate it. (register_patterns): Expose it. (dwarf_builder::build): Implement it with no dwfl whatsoever. * NEWS: Document kernel.statement().absolute. * stapprobes.5.in: Ditto. 2007-03-22 Frank Ch. Eigler <fche@elastic.org> PR 4224. * systemtap.base/probefunc.exp: Use kernel.statement().absolute instead with grep-found schedule_tick address. * semko/thirtyseven.stp, thirtyeight.stp: New tests. * buildok/twentyeight.stp: New test. 2007-03-22 Frank Ch. Eigler <fche@elastic.org> * sym.c (_stp_module_relocate): Tolerate empty section string.
* 2007-03-13 Frank Ch. Eigler <fche@redhat.com>fche2007-03-143-3/+3
| | | | | | | | | | | | | | | | | | | | PR 4171. * Makefile.am (check, installcheck): Pass build-tree pointers in environment variables. * configure.ac: Run separate configury for testsuite/. * configure, Makefile.in: Regenerated. 2007-03-14 Frank Ch. Eigler <fche@redhat.com> PR 4171. * configure.ac, configure, aclocal.m4: New files to permit testsuite-only build tree. * Makefile.am (RUNTEST): Arrange a crazy concoction of environment/make variable for runtest. * Makefile.in: Regenerated. * */*.stp: Switch test cases from "./stap" to "stap" throughout. * lib/systemtap.exp: Assume/trace environment variables. (stap_run_batch): Add "#! stap"-handling hack.
* 2006-11-28 David Smith <dsmith@redhat.com>dsmith2006-11-281-0/+7
| | | | | | | * semko/thirtyfour.stp: Checks for writing to target variable in .return probe. * semok/twentyfour.stp: Tests read access to target variable in .return probe.
* 2006-11-17 Frank Ch. Eigler <fche@redhat.com>fche2006-11-171-0/+7
| | | | | | | | | | | | | * tapsets.cxx (d_v_e_c_v::visit_target_symbol): Restore lost exception-saving functionality that improves error messages for incorrect $target expressions. (translate_components): Systematize error messages somewhat. * translate.cxx (emit_function, emit_probe): Clarify "array locals" error message. 2006-11-17 Frank Ch. Eigler <fche@redhat.com> * semko/thirtysix.stp, transko/three.stp: New tests.
* 2006-11-10 David Smith <dsmith@redhat.com>dsmith2006-11-101-1/+1
| | | | | | | | | | | * semko/maxactive03.stp: Stop on pass2 instead of on pass1. * lib/stap_run.exp: As a side-effect, stap_run() sets global 'probe_errors' and 'skipped_probes' to the number of probe errors and skipped probes seen while running the probe. * systemtap.base/maxactive.exp: Uses extended stap_run() to find number of skipped probes instead of using private stap_run() variant.
* 2006-11-09 David Smith <dsmith@redhat.com>dsmith2006-11-093-0/+21
| | | | | | | | | | | | | * buildok/maxactive01.stp: Added test for "maxactive(N)" return probe processing. * parseko/maxactive01.stp: Ditto. * parseko/maxactive02.stp: Ditto. * parseko/maxactive03.stp: Ditto. * parseko/maxactive04.stp: Ditto. * semko/maxactive01.stp: Ditto. * semko/maxactive02.stp: Ditto. * semko/maxactive03.stp: Ditto. * systemtap.base/maxactive.exp: Ditto.
* 2006-11-06 David Smith <dsmith@redhat.com>dsmith2006-11-062-0/+29
| | | | | | | | | * parseko/foreachstmt06.stp: Added new test for foreach "limit" keyword. * parseko/foreachstmt07.stp: Ditto. * parseok/foreachstmt01.stp: Ditto. * semko/foreachstmt01.stp: Ditto. * semko/foreachstmt02.stp: Ditto.
* 2006-06-05 David Smith <dsmith@redhat.com>dsmith2006-06-052-0/+14
| | | | | | | | | | | | | | | | | | | | | * tapsets.cxx (dwflpp::express_as_string): New function. Extracted from dwflpp::literal_stmt_for_local() so that dwflpp::literal_stmt_for_return() could also call it. (dwflpp::literal_stmt_for_local): Portion extracted to create dwflpp::express_as_string(). (dwflpp::literal_stmt_for_return): New function. Adds support for new symbolic access ("$return") to return value in .return probes. Fixes PR 1132. (target_variable_flavour_calculating_visitor::visit_target_symbol): Calls dwflpp::literal_stmt_for_return() when in a return probe and the variable name is "$return". (dwarf_var_expanding_copy_visitor::visit_target_symbol): Ditto. * stapfuncs.5.in: Noted that the retval() function is deprecated. * stapprobes.5.in: Corrected the name of the return value variable. * tapset/return.stp: Marked the retval() function as deprecated. * testsuite/semko/return01.stp: Added new test. * testsuite/semko/return02.stp: Ditto.
* 2006-06-02 Frank Ch. Eigler <fche@elastic.org>fche2006-06-021-0/+4
| | | | | | | | | | | PR 2645 cont'd. * elaborate.cxx (find_and_build): Support optional wildcards too. (derive_probes): Change last argument to indicate optionalness of parent probe point (alias reference). (alias_expansion_builder): Shrink epilogue-mode alias body copying. Pass along alias reference optionality. * elaborate.h: Corresponding changes. * testsuite/semko/thirtyfive.stp, semok/twentytwo.stp: New tests.