summaryrefslogtreecommitdiffstats
path: root/testsuite/semok
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/+6
| | | | | | | | | | | | | | 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.
* 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.
* 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.
* 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.
* Move semko/nineteen.stp to semokJosh Stone2010-03-061-0/+7
| | | | | | | | | 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.
* 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-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.
* 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.
* 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.
* PR11005: @defined part 2: clarify/standardize internal handling of ↵Frank Ch. Eigler2010-02-251-15/+27
| | | | | | | | | | | | | | | | | 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.
* 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.
* PR11208: glue adjacent string literals together.Frank Ch. Eigler2010-02-191-0/+8
| | | | | * 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.
* PR10746: update test cases related to probe process.*Wenji Huang2009-10-141-1/+1
| | | | | | | | * testsuite/semok/utrace01.stp: Switch by CONFIG_UTRACE. * testsuite/systemtap.base/bz10294.stp: Ditto. * testsuite/systemtap.base/bz6905.stp: Ditto. * testsuite/systemtap.base/statement.exp: Mark untested if non-utrace kernel.
* Add a test for CONFIG_FOO wildcardsJosh Stone2009-10-131-0/+25
|
* bz10475.exp: Use filp_open which has a constant const char argument for test.Mark Wielaard2009-09-071-4/+3
| | | | | | | | | For some reason the do_filp_open const char *pathname argument has changed its name between different kernel versions. Luckily filp_open has a cont char *filename argument that is constant between versions (the test needs a const char* argument to do an array operation on). * testsuite/semok/bz10475.stp: Use filp_open instead of do_filp_open.
* PR10495: allow multiple probe aliases with same nameFrank Ch. Eigler2009-08-181-0/+9
| | | | | | | | * elaborate.cxx (match_node::bind): Change ->end to ->ends[] vector. (find_and_build,build_no_more): Iterate over ends[]. * elaborate.h: Corresponding changes. * testsuite/semok/thirtyfour.stp: New test. * NEWS, doc/langref.tex: Note this.
* PR10475: ensure that loc2c can find its array sizeJosh Stone2009-08-031-0/+10
| | | | * loc2c.c (array_stride): iterate DIEs past typedef/const/volatile
* PR5930: Address-op for $target and @cast membersJosh Stone2009-07-151-0/+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
* More testsuite tweaks to make it work with SYSCALL_WRAPPERSAnanth N Mavinakayanahalli2009-05-282-3/+3
|
* Allow @cast failures to get optimized awayJosh Stone2009-05-081-0/+6
| | | | | | We have the saved_conversion_error field, but I wasn't using it. Now @cast errors are saved in that field, so they're only seen if the optimizer doesn't remove the @cast.
* Refactor anonymous lookups in translate_componentsJosh Stone2009-05-081-1/+5
| | | | | | | | | | | | | | | | | | | The previous code recursed the entirety of translate_components, and it seemed to be restarting the components list every time, so it would only work if the anonymous portion was the first component. Even then, examining the code output by semok/thirtythree revealed that it wasn't fully translating the locations when multiple anonymous pieces were involved. Instead, it now recurses in a separate function, find_struct_member, which does just enough to find the member die and return. It also builds a vector of the locations passed through, so translate_components can output code for the full chain of anonymity. The generated code for semok/thirtythree's $page->mapping now appears to match the offsets from my manual inspection of struct page. I also added a test for $page->first_page->mapping, which works now but would segfault the old code.
* PR10007: Avoid probing syscall entry points in the testsuite.Ananth N Mavinakayanahalli2009-04-302-2/+2
| | | | While there, fix minor issues with the s390x syscall tapset.
* Refine the @cast-with-header syntaxJosh Stone2009-04-211-2/+2
| | | | | | | The special syntax to generate a module for type information is now: - "kernel<path/to/header.h>" to use the kernel's build environment - "<path/to/header.h>" to use no special build environment, and so use gcc's default parameters only (for user mode).
* Updated utrace tests.David Smith2009-04-211-0/+4
| | | | | | | | | | | | | | | | 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.
* Add tests for @cast-generated modulesJosh Stone2009-04-201-0/+4
|
* semok/badvar.stp test: add stap -p2 as for other semok testsFrank Ch. Eigler2009-04-011-1/+3
|
* Add simple testcases for @castJosh Stone2009-03-111-0/+13
|
* PR 7071: Optional $context variables fixRajan Arora2009-03-111-0/+7
| | | | | | | | | | | | | | | | * tapsets.cxx (dwarf_var_expanding_visitor::visit_target_symbol): Substitute erroneous target symbol with literal 0 if session level flag, skip_badvars is set. * session.h (struct systemtap_session): New flag: skip_badvars. * main.cxx: Command line argument --skip-badvars added. * stap.1.in: Entry for new option --skip-badvars. * NEWS: Added blurb for new option now available. * testsuite/semok/badvar.stp: Test case to check added functionality.
* reduce systemtap.log contribution by semok/twenty.stpFrank Ch. Eigler2009-01-301-1/+6
|
* Adjust semok/thirtythree.stp test to pass on older kernels.Mark Wielaard2008-10-011-1/+1
|
* tweak anon-struct test case and news blurbFrank Ch. Eigler2008-09-251-3/+4
|
* Handling members with anonymous structs / unionsPrerna2008-09-251-0/+4
|
* PR5686: correct regression in semok/optimize.stpFrank Ch. Eigler2008-08-281-1/+0
|
* Make nodwf test passed when CONFIG_QUOTACTL unsetWenji Huang2008-08-272-2/+2
|
* PR6836: $$vars extensions, $$returnFrank Ch. Eigler2008-08-151-0/+5
|
* PR5049: prefix with "*" any filenames given in "fn@filename:line" probesFrank Ch. Eigler2008-08-111-0/+5
|
* Fix PR 6588Jim Keniston2008-06-041-0/+4
|
* Merge commit 'origin/dwarfless'Jim Keniston2008-05-127-0/+160
|\ | | | | | | PR 4311 - Function boundary tracing without debuginfo: Phases 1 and 2
| * * testsuite/{semok,semko}/nodwf*.stpJim Keniston2008-04-187-0/+160
| | | | | | | | Shows what we currently can and can't do.
* | PR6466: broad side-effect free statement elisionFrank Ch. Eigler2008-04-292-2/+18
|/
* 2008-02-13 Dave Brolley <brolley@redhat.com>brolley2008-02-131-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-281-0/+0
|
* PR 4936: probe pont conditions part 2; reorg in prep for full rewritingfche2008-01-181-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* 2007-12-05 Masami Hiramatsu <mhiramat@redhat.com>hiramatu2007-12-051-0/+20
| | | | | | | | | | | | | | | | | | 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-11-27 David Smith <dsmith@redhat.com>dsmith2007-11-271-0/+4
| | | | * semok/twentyeight.stp: Tests wildcarded probe points.
* PR 3887: sufficient+optional probe pointsfche2007-11-201-0/+11
| | | | | | | | | | | | | | | | 2007-11-19 Frank Ch. Eigler <fche@elastic.org> PR 3887. * staptree.h (probe_point): Add "sufficient" field. * staptree.cxx: Initialize it, print it. * parse.cxx (parse_probe_point): Parse it. * elaborate.cxx (derive_probes): Implement it. * stapprobes.5.in: Document it. * NEWS: Gloat about it. * parseok/five.stp, semok/twentyseven.stp: Test "!" probe point flag. * iostat-scsi.stp: Adopt "!" probe point flag.