summaryrefslogtreecommitdiffstats
path: root/testsuite/buildok/context_test.stp
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* Test all context related functions in one test.Mark Wielaard2009-09-191-0/+10
| | | | | | | | | Saves a couple of seconds per individual test by doing them all in one. * testsuite/buildok/context_test.stp: Incorporate: modname.stp, probefunc.stp, probemod.stp, symdata.stp, symname.stp, uaddr.stp, ustack.stp, usymdata.stp, usymname.stp. Delete individual tests.
* Add pgrp() context tapset function. Describe sid().Przemyslaw Pawelczyk2009-06-151-0/+1
| | | | | | | | * tapset/context.stp: Add pgrp() function. * testsuite/buildok/context_test.stp: Add pgrp() call. * stapfuncs.3stap.in: Describe pgrp() and sid(). Signed-off-by: Josh Stone <jistone@redhat.com>
* Simplify buildok/context_test.stpJosh Stone2009-05-081-20/+1
| | | | | | | | | | The test was using optional probes on uptime_read_proc, which doesn't exist anymore on 2.6.30. The problem is that when those optional probes are skipped, the test doesn't really do anything. For a buildok test of the context functions, the actual probe point doesn't matter, so I've changed it to just a begin probe that calls all of the functions.
* context tapset: sid() function to return task session leader pidMalte Nuhn2009-05-081-0/+1
|
* Correct ioblock and scsi tapset for 2.6.28.Wenji Huang2008-10-281-2/+2
|
* 2007-11-12 Martin Hunt <hunt@redhat.com>hunt2007-11-121-10/+10
| | | | | | | | * systemtap.base/*.stp: Replace log() calls with println() (or printf() if formatting would help.) * systemtap.maps/*.stp: Ditto. * systemtap.samples/*.stp: Ditto. * systemtap.stress/*.stp: Ditto.
* 2006-05-16 David Smith <dsmith@redhat.com>dsmith2006-05-161-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * parse.cxx (parser::parser): Added initializer for 'context' member variable. (tt2str): Added support for new tok_keyword type. (operator <<): Ignores keyword content when outputting error message. (lexer::scan): Recognizes keywords, such as 'probe', 'global', 'function', etc. and classifies them as type 'tok_keyword'. This causes keywords to become reserved so they cannot be used for function names, variable names, etc. (parser::parse): Changed tok_identifier to tok_keyword when looking for "probe", "global", or "function". Also sets context member variable which remembers if we're in probe, global, function, or embedded context. (parser::parse_probe, parser::parse_statement) (parser::parse_global, parser::parse_functiondecl) (parser::parse_if_statement, parser::parse_delete_statement) (parser::parse_break_statement, parser::parse_continue_statement) (parser::parse_for_loop, parser::parse_while_loop) (parser::parse_foreach_loop, parser::parse_array_in): Looks for tok_keyword instead of tok_identifier. (parser::parse_probe_point): Allows keywords as part of a probe name, since "return" and "function" are keywords. (parser::parse_return_statement): Looks for tok_keyword instead of tok_identifier. Make sure we're in function context. (parser::parse_next_statement): Looks for tok_keyword instead of tok_identifier. Make sure we're in probe context. * parse.h: Added parse_context enum. Added 'tok_keyword' to token_type enum. Added parse_context 'context' member variable to parser class. * stap.1.in: Because the string() function has been removed, the 'string()' function reference has been changed to a 'sprint()' function reference. * stapex.5.in: Ditto. * stapfuncs.5.in: The description of the string() and hexstring() functions has been removed. * testsuite/buildok/context_test.stp: Calls to the string() function were converted to sprint() function calls. * testsuite/buildok/fifteen.stp: Ditto. * testsuite/buildok/nineteen.stp: Ditto. * testsuite/buildok/process_test.stp: Ditto. * testsuite/buildok/task_test.stp: Ditto. * testsuite/buildok/timestamp.stp: Ditto. * testsuite/buildok/twentyone.stp: Ditto. * testsuite/semok/args.stp: Ditto. * testsuite/semok/seven.stp: Ditto. * testsuite/buildok/fourteen.stp: Calls to log()/string() were converted to a call to printf(). * testsuite/buildok/sixteen.stp: Ditto. * testsuite/buildok/thirteen.stp: Ditto. * testsuite/buildok/twentythree.stp: Ditto. * testsuite/buildok/twentytwo.stp: Ditto. * testsuite/buildok/seven.stp: Calls to the string() function were converted to sprint() calls. Calls to the hexstring() function were converted to sprintf() calls. * testsuite/semok/eleven.stp: Ditto. * testsuite/buildok/seventeen.stp: Calls to log()/hexstring() were converted to a call to printf(). * testsuite/semko/nineteen.stp: Ditto. * testsuite/parseok/three.stp: Because keywords are reserved, a variable named 'string' was renamed to 'str'. * testsuite/parseok/two.stp: Because keywords are reserved, a variable named 'global' was renamed to 'gbl'. * testsuite/transko/two.stp: Because the parser now checks for 'next' and 'return' statement context, a 'next' statement was removed from a function and a 'return' statement was removed from a probe.
* 2005-11-09 Frank Ch. Eigler <fche@elastic.org>fche2005-11-091-0/+1
| | | | | | Reported by Guang Lei Li <liguangl@cn.ibm.com>: * tapset/context.stp (pid,ppid,tid): Correctly pick tgid vs pid. * testsuite/buildok/context_test.stp: Print out tid() too.
* 2005-09-05 Frank Ch. Eigler <fche@elastic.org>fche2005-09-051-19/+11
| | | | | | | | | | | | | | | | | PR 1172. * staptree.h, staptree.cxx: Make all ::print*(), operator<< functions take const staptree objects. (literal_string::print): \-prefix double-quotes. * translate.cxx (emit_common_header): Add context probe_point field. Switch to atomic_t busy flags. (emit_module_exit): Use atomic operations for busy flag. (visit_*): Use lex_cast_qstring for last_stmt strings. * tapsets.cxx (lex_cast_quoted): \-prefix double-quotes too. (*::emit_probe_entries): Populate probe_point. Use atomic operations for busy flag. * tapset/context.stp (pp): New function. * stapfuncs.5.in: Document it. * testsuite/buildok/context_test.stp: Test it.
* 2005-09-04 Martin Hunt <hunt@redhat.com>hunt2005-09-041-0/+47
* testsuite/buildok/context_test.stp: New test. * tapset/logging.stp (log): Call _stp_printf(). * stapfuncs.5.in: Add contextinfo funcs. * tapset/context.stp: Minor cleanup.