Lukas Berk [Fri, 23 Aug 2013 18:26:54 +0000 (14:26 -0400)]
Tweak spin-rawhide script to stop overwriting the changelog
scripts/spin-rawhide - when merging an upstream diff, sometimes the
changelog can be overwritten, which shouldn't happen
trim the changelog diffs and their context lines
Lukas Berk [Fri, 23 Aug 2013 15:31:48 +0000 (11:31 -0400)]
Testcase and documentation for minidebuginfo
man/warning::debuginfo.7stap - explain basics of minidebuginfo, note
that it requires elfutils 0.156 and add
a pointer to the fedora feature page
testsuite/systemtap.base/ files:
create-minidebuginfo.sh - script to create minidebuginfo
minidebug.c - simple c program with multiple function calls
minidebuginfo.exp - compile minidebug.c and generate minidebuginfo,
test that the functions are still listed with
probefunc()
minidebuginfo.stp - script to probe process.function("*") and list
probefunc()'s
Josh Stone [Thu, 22 Aug 2013 22:39:26 +0000 (15:39 -0700)]
Simplify the testsuite tests for uprobes and utrace
- Searching /proc/kallsyms is now standardized to grep_kallsyms.
- utrace and uprobes tests are broken into separate procs for the
different variants, then a unified proc combines variants.
David Smith [Thu, 22 Aug 2013 20:31:04 +0000 (15:31 -0500)]
Fix PR15881 by fixing unprivileged_myproc.exp failures.
* testsuite/systemtap.unprivileged/unprivileged_myproc.exp: KFAIL
'.absolute' and '.absolute.return' probe tests when using inode uprobes,
since inode uprobes don't support those probe types. For
'library.plt.statement(NUMBER)' probe tests, use the address of the
library function, instead of the address of the main program
function. With the last problem fixed, remove the XFAILS for those probe
tests (an update to PR13373).
* testsuite/systemtap.base/pthread_stacks.exp: Relaxed debuginfo check a
bit, since we only need "native" glibc debuginfo installed on multilib
systems like x86_64.
David Smith [Wed, 21 Aug 2013 18:30:18 +0000 (13:30 -0500)]
Fix PR15875 by making sure 'strace' is on a system before running ptrace.exp.
* testsuite/systemtap.base/ptrace.exp: If 'strace' doesn't exist on the
system, quit early.
* systemtap.spec: Make 'systemtap-testsuite' require 'strace', since
ptrace.exp needs it.
David Smith [Tue, 20 Aug 2013 21:49:20 +0000 (16:49 -0500)]
Fix up 3 XPASS results in the semko.exp testcase.
* testsuite/systemtap.pass1-4/semko.exp: Mark the utrace.stp test as
"untested" when using dyninst, since dyninst contains utrace-like
functionality.
* testsuite/semko/badregex01.stp: Actually add an invalid regexp to the
testcase.
David Smith [Tue, 20 Aug 2013 19:59:20 +0000 (14:59 -0500)]
Fix PR15866 by updating the signal.pending/signal.pending.return probe aliases.
* tapset/linux/signal.stp: Make the 'signal.pending' and
'signal.pending.return' probe aliases use 'sys_rt_sigpending' and
'compat_sys_rt_sigpending' if 'do_sigpending' is an inlined function.
Frank Ch. Eigler [Tue, 20 Aug 2013 10:11:30 +0000 (06:11 -0400)]
strace example: add a note re. PR6762
The reminder was motivated by coming across Jan Kratoch's much more
elaborate strace-in-systemtap prototype, which solves this problem:
http://git.jankratochvil.net/?p=staptrace.git
David Smith [Fri, 16 Aug 2013 16:00:35 +0000 (11:00 -0500)]
Fix PR15805 by allocating map memory with vmalloc() instead of kmalloc().
* runtime/linux/map_runtime.h (_stp_map_del): Call _stp_vfree() to free
all the node memory.
(_stp_map_vzalloc): Renamed from _stp_map_kzalloc() and reworked to use
vmalloc-based allocations instead of kmalloc-based allocations.
(_stp_map_init): Allocate all the node memory in one big chunk using
vmalloc(). Change all other allocations to use vmalloc().
* runtime/map.h: Add 'node_mem' variable to 'map_root' structure
definition.
* runtime/linux/alloc.c (_stp_vzalloc): New function.
(_stp_vzalloc_node): Ditto.
For xen kernels, handle cpufreq_register_notifier() failure.
* runtime/time.c (_stp_kill_time): If cpufreq_register_notifier()
suceeded, unregister the notifier.
(_stp_init_time): On xen kernels, cpufreq_register_notifier() can
fail. Just ignore the error.
David Smith [Tue, 30 Jul 2013 18:41:49 +0000 (13:41 -0500)]
Made systemtap.server/server_locale.exp more robust.
* testsuite/systemtap.server/server_locale.exp: Updated tests for new
warning/error messages. For French tests, made them more permissive - if
we get anything in French, the test passes. This was done because we may
not have a translation of a particular message.
PR15803: netfilter: tolerate absent context when collecting $verdict
It is possible to skip from the prologue epilogue through to the
prologue for reasons such as shortage of available stack space.
In these cases, the context* c; pointer could remain NULL, which
is considered generally inappropriate to dereference.
* tapset-netfilter.cxx (epilogue): Check for NULL c before extracting
$verdict.
David Smith [Mon, 29 Jul 2013 21:59:31 +0000 (16:59 -0500)]
Made systemtap.server/client.exp more robust.
* testsuite/systemtap.server/client.exp: When this test is run right after
another server test, sometimes the server from the previous test hasn't
quite died. So, when getting the initial list of online servers, make
sure we get the same result twice. Simplify code by using new
'array_compare' procedure.
Jonathan Lebon [Fri, 26 Jul 2013 19:31:49 +0000 (15:31 -0400)]
session.cxx: make string params const
And change colorize() to take in a token pointer rather than a ref. This
is more in line with other funcs that take in a token and also ensures
that we don't have undefined behaviour if we're called with a
dereferenced NULL pointer (which coverity complained about).
David Smith [Wed, 24 Jul 2013 16:13:02 +0000 (11:13 -0500)]
Added "buildok" test improvements.
* testsuite/systemtap.pass1-4/buildok.exp: Kfail twentyeightprime.stp if
we're using inode uprobes, since absolute probes don't work there.
* testsuite/buildok/twenty.stp: Also probe 'iterate_dir', since
'vfs_readdir' has been renamed.
Jonathan Lebon [Wed, 24 Jul 2013 12:59:11 +0000 (08:59 -0400)]
PR15375: implement function suggestions
Added dwarf_builder::suggest_functions(), which builds a list of similar
functions from a given function. This is used in dwarf_builder::build()
to suggest functions to the user when the probe point could not be
derived.
Jonathan Lebon [Wed, 24 Jul 2013 12:48:47 +0000 (08:48 -0400)]
PR15375: add visited_modules to dwarf_query struct
The visited_modules member of dwarf_query is used to keep track of all
the modules which have been visited during the query. This information
will be used in the function suggestion feature to know from which
modules to pull functions.
Jonathan Lebon [Wed, 24 Jul 2013 12:42:11 +0000 (08:42 -0400)]
PR15375: add sym_seen to module_info struct
The sym_tab struct only caches non-inlined functions. The sym_seen set
includes all functions, and is also updated during update_symtab. This
will allow us to give better function suggestions.
David Smith [Tue, 23 Jul 2013 19:49:26 +0000 (14:49 -0500)]
Kfail unsupported inode uprobes tests in unprivileged_probes.exp.
* testsuite/lib/systemtap.exp (inode_uprobes_p): New function.
* testsuite/systemtap.base/uprobes_filtering.exp: Use 'inode_uprobes_p',
instead of private code, to know whether to test.
* testsuite/systemtap.unprivileged/unprivileged_probes.exp
(test_unrestricted_probes): Kfail
'process(number).statement(number).absolute*' tests if we're using inode
uprobes, since absolute probes aren't supported.
David Smith [Tue, 23 Jul 2013 17:27:20 +0000 (12:27 -0500)]
Tweak systemtap.examples/process/psig.stp to compile on RHEL6.
* testsuite/systemtap.examples/process/psig.stp (translate_mask): Tweak
function to lower stack usage. This avoids the dreaded "the frame size
of XXX bytes is larger than 256 bytes" error messages.
David Smith [Mon, 22 Jul 2013 17:55:41 +0000 (12:55 -0500)]
Fix testsuite/semok/thirtysix.stp.
* testsuite/semok/thirtysix.stp: Since not all markers in "stap" have a
'$arg' parameter, this test was failing (correctly). To fix this, only
probe the "pass*__*" markers (which all have a '$arg' parameter).
David Smith [Fri, 19 Jul 2013 17:31:23 +0000 (12:31 -0500)]
The testsuite now looks for systemtap java support before java testing.
* testsuite/lib/systemtap.exp (java_p): New function.
(setup_systemtap_environment): Test for systemtap java functionality.
* testsuite/systemtap.apps/java.exp: Mark as untested if no stap java
support.
* testsuite/systemtap.unprivileged/unprivileged_probes.exp
(test_unrestricted_probes): Mark java probe tests as untested if no stap
java support.
David Smith [Wed, 17 Jul 2013 15:55:56 +0000 (10:55 -0500)]
Fix PR15751 by adding support for new 'compat' sigaction structures.
* buildrun.cxx (compile_pass): Added 'compat_sigaction' autoconf test.
* runtime/linux/autoconf-compat_sigaction.c: New file.
* tapset/linux/aux_syscalls.stp (_struct_sigaction32_u): Prefer 'struct
compat_sigaction' when available (over old 'struct sigaction32').
(_struct_old_sigaction32_u) Prefer 'struct compat_old_sigaction' when
available (over old 'struct old_sigaction32').
* testsuite/systemtap.context/usymbols.exp: Update to use
'compat_sigaction' where available.
David Smith [Tue, 16 Jul 2013 14:57:11 +0000 (09:57 -0500)]
Improve stapdyn uprobe error reporting.
* stapdyn/mutatee.cxx (mutatee::instrument_dynprobe_target): Turn off
dyninst error messages and add our own if we can't find the uprobe entry
functions.