Lukas Berk [Fri, 13 Sep 2013 19:27:45 +0000 (15:27 -0400)]
Properly check and use minidebuginfo
dwflpp.cxx: add bool has_gnu_debuginfo() to check if section exists
dwflpp.h: declare bool has_gnu_debuginfo()
tapsets.cxx: check for .gnu_debuginfo as condition to query_module_symtab
and listing functions in a process
minidebuginfo.stp: correct the binary to probe
David Smith [Mon, 9 Sep 2013 20:03:31 +0000 (15:03 -0500)]
Make user_string_n_quoted.exp more robust.
* testsuite/systemtap.string/user_string_n_quoted.exp: Several small
changes. If we're not doing install testing, mark the test as
untested. Increase the timeout value, in case we're operating with a
cold cache. If we timeout, try to kill stap. Properly call "close" and
"wait" after "spawn" call.
* testsuite/systemtap.string/user_string_n_quoted.stp: Change
'nd_syscall.write' to 'syscall.write', since the 'syscall' variant has
more support.
Lukas Berk [Fri, 6 Sep 2013 17:41:39 +0000 (13:41 -0400)]
Fix minidebuginfo.exp testcase
The minidebuginfo testcase was based off of an incomplete documenation. We need
to properly fix the creation of the executable to test in a standalone instance.
create-minidebug.sh - properly create standalone testcase, this includes
removing all symbol, relocation and .debug_* sections.
Tweak naming of files with binary. prefix for easier
tracking
minidebuginfo.exp - updated file names to target and cleanup
David Smith [Fri, 30 Aug 2013 18:51:42 +0000 (13:51 -0500)]
Improve the 'num_args' subtest of systemtap.context/context.exp.
* testsuite/systemtap.context/num_args.stp: Improve s390 support by
looking in r2 for the first argument.
* testsuite/systemtap.context/num_args.tcl: Fail if we don't get the
proper string function arguments (instead of silently ignoring the
error).
David Smith [Fri, 30 Aug 2013 16:12:34 +0000 (11:12 -0500)]
Skip the 'utf' tests if we don't have uprobes.
* testsuite/systemtap.base/utf_pretty.exp: Don't run test if we're not
doing install testing or if we don't have uprobes.
* testsuite/systemtap.base/utf_user.exp: Ditto.
* testsuite/systemtap.base/utf_user_trunc.exp: Ditto.
David Smith [Fri, 30 Aug 2013 14:55:52 +0000 (09:55 -0500)]
Improve skipping perf probe tests on unsupported systems.
* testsuite/lib/systemtap.exp (perf_probes_p): New function.
* testsuite/systemtap.stress/conversions.exp: Use new 'perf_probes_p'
function instead of an explicit test.
* testsuite/systemtap.base/perf.exp: If we don't have perf probes, mark
test as untested.
* testsuite/systemtap.base/pt_user_mode.exp: Skip test if we're not doing
an install test. We don't need to check for perf probe support.
* testsuite/systemtap.examples/profiling/perf.tcl: Skip the example if we
don't have perf probes or uprobes.
David Smith [Fri, 30 Aug 2013 13:43:25 +0000 (08:43 -0500)]
Fix minidebuginfo.exp testcase problems.
* testsuite/systemtap.base/minidebuginfo.exp: If the tested system doesn't
have uprobes, mark as untested.
* testsuite/systemtap.base/create-minidebug.sh: Change "/usr/bin/bash" to
"/bin/bash", so older systems can run the script.
David Smith [Thu, 29 Aug 2013 21:28:27 +0000 (16:28 -0500)]
Make systemtap.examples/check.exp look for an example's optional tcl file.
* testsuite/systemtap.examples/check.exp: If the example has an associated
tcl file, run it.
* testsuite/systemtap.examples/README: Mention new tcl file that can be
optionally associated with an example.
* testsuite/systemtap.examples/stapgames/pingpong.meta: Add a
'test_support' tag.
* testsuite/systemtap.examples/virtualization/kvm_service_time.meta: Make
the 'test_support' tag more specific.
* testsuite/systemtap.examples/process/auditbt.tcl: Skip the example if we
don't have uprobes.
* testsuite/systemtap.examples/process/mutex-contention.tcl: Ditto.
* testsuite/systemtap.examples/process/threadstacks.tcl: Ditto.
* testsuite/systemtap.examples/profiling/pf4.tcl: Ditto.
* testsuite/systemtap.examples/process/ltrace.tcl: Skip the example if we
don't have .plt probes.
* testsuite/systemtap.examples/interrupt/scf.tcl: Skip the example if
we're on ia64, which has no dwarf unwinding support.
* testsuite/systemtap.examples/io/io_submit.tcl: Ditto.
* testsuite/systemtap.examples/io/mbrwatch.tcl: Ditto.
* testsuite/systemtap.examples/process/chng_cpu.tcl: Ditto.
* testsuite/systemtap.examples/process/sleepingBeauties.tcl: Ditto.
* testsuite/systemtap.examples/profiling/latencytap.tcl: Ditto.
* testsuite/systemtap.examples/process/strace.tcl: Skip the example if
we're on ia64, which doesn't have nd_syscall support.
* testsuite/systemtap.examples/process/thread-business.tcl: Ditto.
David Smith [Wed, 28 Aug 2013 15:31:57 +0000 (10:31 -0500)]
Update badname.stp example for newer kernels (with inlined may_create()).
* testsuite/systemtap.examples/general/badname.stp: Since may_create() is
now always inlined (and we can't find its arguments), probe
may_create()'s callers instead.
Frank Ch. Eigler [Tue, 27 Aug 2013 18:22:37 +0000 (14:22 -0400)]
PR15900 weaken & simplify server_locale.exp test case
The server_locale.exp test case need only confirm that selected
local-related environment variables are passed to the server. A
smaller & simpler set of tests are sufficient for that.
David Smith [Tue, 27 Aug 2013 14:58:22 +0000 (09:58 -0500)]
Make pr13158.exp test results less random.
* testsuite/systemtap.base/pr13158.exp: Make test result less random, by
making sure the first copy of the module is loaded before trying to load
the second copy.
Lukas Berk [Fri, 23 Aug 2013 19:05:30 +0000 (15:05 -0400)]
Move %changelog pruning into diff check block
If there is no spec diff, then there's no need to even check for a
difference in the %changelog section. Furthermore we should check
that there is even a %changelog section in the diff and only attempt
to prune accordingly
scripts/spin-rawhide - move pruning into file check statements
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).