lttng-tools.git
11 years agoUpdate version to v2.2.0-rc1 v2.2.0-rc1
David Goulet [Thu, 28 Mar 2013 20:32:03 +0000 (16:32 -0400)] 
Update version to v2.2.0-rc1

Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoFix: Add missing header for make dist
David Goulet [Thu, 28 Mar 2013 20:21:00 +0000 (16:21 -0400)] 
Fix: Add missing header for make dist

Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoFix: add missing declaration for disable-lttng-ust
David Goulet [Thu, 28 Mar 2013 20:06:02 +0000 (16:06 -0400)] 
Fix: add missing declaration for disable-lttng-ust

Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoFix: don't keep vpid, procname, nor patchlevel environment for per-uid buffers
Mathieu Desnoyers [Thu, 28 Mar 2013 19:54:12 +0000 (15:54 -0400)] 
Fix: don't keep vpid, procname, nor patchlevel environment for per-uid buffers

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoRelayd add_stream command handle tracefile rotation
Julien Desfossez [Thu, 28 Mar 2013 17:25:08 +0000 (13:25 -0400)] 
Relayd add_stream command handle tracefile rotation

Extend the relayd_add_stream structure to pass the tracefile_size and
tracefile_count parameters required to handle the tracefile rotation.

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoMove stream file rotation functions to utils
Julien Desfossez [Thu, 28 Mar 2013 15:48:02 +0000 (11:48 -0400)] 
Move stream file rotation functions to utils

These functions are now in libcommon which can be used by the relayd and
consumer.

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoIntroduce the relayd socket object
Julien Desfossez [Thu, 28 Mar 2013 04:09:48 +0000 (00:09 -0400)] 
Introduce the relayd socket object

Used to store the version that the relayd socket supports so we can
adapt the communication to the lowest version between the session daemon
and relayd.

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoAdjust the relayd protocol on version check
Julien Desfossez [Wed, 27 Mar 2013 17:59:08 +0000 (13:59 -0400)] 
Adjust the relayd protocol on version check

If the relayd and sessiond are compatible (same major number), we store
in the session the protocol version to use for the rest of the
communication (the lowest minor number).

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
11 years agoOn-disk multiple tracefiles circular buffer
Julien Desfossez [Wed, 27 Mar 2013 17:27:55 +0000 (13:27 -0400)] 
On-disk multiple tracefiles circular buffer

This patch introduces the tracefile_size and tracefile_count parameters
to the enable-channel command and the API.

This allows to split a stream into multiple tracefiles and limit the
amount of trace data to keep on disk. The tracefiles are readable
independently or with the others as long as the metadata file is
present.

For now only local traces are handled, relayd modifications coming soon.

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agotests: implement context filtering tests
Mathieu Desnoyers [Wed, 27 Mar 2013 19:28:01 +0000 (15:28 -0400)] 
tests: implement context filtering tests

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoDocumentation: filter $ctx manpage and --help
Mathieu Desnoyers [Wed, 27 Mar 2013 16:10:44 +0000 (12:10 -0400)] 
Documentation: filter $ctx manpage and --help

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoImplement per-context filtering
Mathieu Desnoyers [Tue, 26 Mar 2013 02:33:57 +0000 (22:33 -0400)] 
Implement per-context filtering

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
11 years agoTests: Add periodical flush fast regression test
David Goulet [Wed, 27 Mar 2013 16:25:35 +0000 (12:25 -0400)] 
Tests: Add periodical flush fast regression test

Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoUST periodical metadata flush
Julien Desfossez [Tue, 26 Mar 2013 02:27:05 +0000 (22:27 -0400)] 
UST periodical metadata flush

Add a socket between the sessiond and the ust-consumer to allow
periodical flush of the metadata channel.

If enabled (by specifying the --switch-timer option on the metadata
channel), a new timer thread in the consumer asks the session daemon for
new metadata for a specific session.

All the metadata collected is written into a metadata cache in the
consumer, this mechanism is useful for synchronisation (to avoid race
conditions between two metadata updates) and will also be useful when we
implement the snapshots.

Acked-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoTests: Fix nprocesses applications shutdown
David Goulet [Wed, 27 Mar 2013 14:21:54 +0000 (10:21 -0400)] 
Tests: Fix nprocesses applications shutdown

The nprocesses test is using the SIGPIPE signal to shutdown the spawned
child applications. This is done in order to silence the shell message
such as this one:

"nprocesses/test_nprocesses: line 79: 26458 Terminated"

This mechanism is broken on systems where the SIGPIPE default handler is
overriden (thus no application shutdown occurs) in the executing
environment. This could lead to stale applications polluting the system
and causing heratic behavior in subsequent tests.

This commit add a loop and check that all the spawned applications have
been successfully killed.

Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoFix: Add test scripts and lists to the distribution package
Jérémie Galarneau [Wed, 27 Mar 2013 05:38:35 +0000 (01:38 -0400)] 
Fix: Add test scripts and lists to the distribution package

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoFix: Run tests requiring the python bindings only when they are enabled
Jérémie Galarneau [Wed, 27 Mar 2013 03:23:03 +0000 (23:23 -0400)] 
Fix: Run tests requiring the python bindings only when they are enabled

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoAdd optional Python >= 3.0 dependency to README
Jérémie Galarneau [Tue, 26 Mar 2013 00:28:36 +0000 (20:28 -0400)] 
Add optional Python >= 3.0 dependency to README

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoTests: Add "libc-wrapper" ust regression test
Jérémie Galarneau [Tue, 26 Mar 2013 00:28:35 +0000 (20:28 -0400)] 
Tests: Add "libc-wrapper" ust regression test

Based on the "test-libustinstr-malloc" test formerly part of lttng-ust.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoTests: Add "fork" ust regression test
Jérémie Galarneau [Tue, 26 Mar 2013 00:28:34 +0000 (20:28 -0400)] 
Tests: Add "fork" ust regression test

Based on the "fork" test formerly part of lttng-ust.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoTests: Add "exit-fast" ust regression test
Jérémie Galarneau [Tue, 26 Mar 2013 00:28:33 +0000 (20:28 -0400)] 
Tests: Add "exit-fast" ust regression test

Based on the "exit-fast" test formerly part of lttng-ust.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoTests: Add "daemon" ust regression test
Jérémie Galarneau [Tue, 26 Mar 2013 00:28:32 +0000 (20:28 -0400)] 
Tests: Add "daemon" ust regression test

Based on the "daemon" test formerly part of lttng-ust.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoTests: Add "linking" ust regression test
Jérémie Galarneau [Tue, 26 Mar 2013 00:28:31 +0000 (20:28 -0400)] 
Tests: Add "linking" ust regression test

Based on the "demo" test formerly part of lttng-ust. Tests userspace
tracing with directly, statically and dynamically linked providers. Also
meant as an exemple of building and tracing an application with all
types of provider linking.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoTests: Add Python test_utils module
Jérémie Galarneau [Tue, 26 Mar 2013 00:28:30 +0000 (20:28 -0400)] 
Tests: Add Python test_utils module

Basic Python test framework based on the lttng-tools Python bindings
that facilitates the creation of a tracing session saving its trace in
a temporary location, the activation of events in the UST domain and
clean teardown of the test session.

Also provides basic TAP output facilities.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoFix: UST context activation
Mathieu Desnoyers [Tue, 26 Mar 2013 02:35:46 +0000 (22:35 -0400)] 
Fix: UST context activation

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoFix: lttng create default name check
David Goulet [Mon, 25 Mar 2013 20:30:12 +0000 (16:30 -0400)] 
Fix: lttng create default name check

Fixes #449

Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoFix: add missing error output
David Goulet [Mon, 25 Mar 2013 20:15:37 +0000 (16:15 -0400)] 
Fix: add missing error output

Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoFix: minor errors in lttng.1 man page
David Goulet [Mon, 25 Mar 2013 19:58:38 +0000 (15:58 -0400)] 
Fix: minor errors in lttng.1 man page

Fixes #448

Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoFix: kernel function event was listed as probe
David Goulet [Mon, 25 Mar 2013 19:30:08 +0000 (15:30 -0400)] 
Fix: kernel function event was listed as probe

Fixes #442

Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoAdd unsupported error code to lttng cmd line
David Goulet [Mon, 25 Mar 2013 19:07:30 +0000 (15:07 -0400)] 
Add unsupported error code to lttng cmd line

Fixes #438

Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoFix: typo in the create command help and man page
David Goulet [Mon, 25 Mar 2013 18:44:41 +0000 (14:44 -0400)] 
Fix: typo in the create command help and man page

Fixes #436

Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoFix: session name max length was not handled correctly
David Goulet [Mon, 25 Mar 2013 18:41:22 +0000 (14:41 -0400)] 
Fix: session name max length was not handled correctly

Fixes #435

Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoFix: lttng UI failed to report error 19
David Goulet [Mon, 25 Mar 2013 17:31:51 +0000 (13:31 -0400)] 
Fix: lttng UI failed to report error 19

Fixes #437

Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoFix: validate expanded path NULL ptr in relayd
David Goulet [Mon, 25 Mar 2013 15:03:12 +0000 (11:03 -0400)] 
Fix: validate expanded path NULL ptr in relayd

Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoAdd missing files for make dist
David Goulet [Mon, 25 Mar 2013 14:36:37 +0000 (10:36 -0400)] 
Add missing files for make dist

Fixes #480

Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoAdd optional Perl dependency requirement to README
Christian Babeux [Fri, 22 Mar 2013 19:49:19 +0000 (15:49 -0400)] 
Add optional Perl dependency requirement to README

Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoTests: remove unused run script
David Goulet [Mon, 25 Mar 2013 14:16:01 +0000 (10:16 -0400)] 
Tests: remove unused run script

Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoAdd missing buffers-uid folder in test Makefile
Jérémie Galarneau [Mon, 25 Mar 2013 14:13:26 +0000 (10:13 -0400)] 
Add missing buffers-uid folder in test Makefile

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoTests: Do not exit when a failure occurs in test_buffers_uid
Christian Babeux [Thu, 21 Mar 2013 19:56:47 +0000 (15:56 -0400)] 
Tests: Do not exit when a failure occurs in test_buffers_uid

Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoTests: Cleanup tests runner that are no longer required
Christian Babeux [Thu, 21 Mar 2013 19:56:46 +0000 (15:56 -0400)] 
Tests: Cleanup tests runner that are no longer required

Test runners have been superseeded by testlists and the prove utility.

Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoTests: Use Perl prove as the testsuite runner
Christian Babeux [Thu, 21 Mar 2013 19:56:45 +0000 (15:56 -0400)] 
Tests: Use Perl prove as the testsuite runner

Currently the regression and unit testsuites are runned via a custom
runner script. By using the Perl prove utility, we can run the
testsuites and also gain additionnal features such as: parallel jobs,
separate testlists, etc.

This commit modify the make check target to run Perl prove as the
testsuite runner.

Testlist:

tests/unit_tests      : unit tests.
tests/fast_regression : a fast regression testsuite.
tests/long_regression : a long regression testsuite (includes slow tests such
                        as test_low_throughput and others).
tests/root_regression : a testsuite for tests that need root access
        (mostly tests using lttng-modules and bandwith limits).

Running a testsuite:

$ cd lttng-tools/tests
$ ./run.sh <testsuite>

One can also run tests manually using prove:

$ prove --exec '' path/to/test

  OR

$ prove --exec '' - < testlist

Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoTests: Fix first line of output to follow TAP guidelines
Christian Babeux [Thu, 21 Mar 2013 19:56:44 +0000 (15:56 -0400)] 
Tests: Fix first line of output to follow TAP guidelines

From the Test::Harness::TAP documentation [1]:

The plan tells how many tests will be run, or how many tests have
run.  It's a check that the test file hasn't stopped prematurely.
It must appear once, whether at the beginning or end of the output.

The TAP plan *must* be the first line of output of any tests. Currently,
most of the tests output their description and then the TAP plan. This
can cause issues while parsing the test output for "strict" TAP parser
such as the one used in the prove tool.

This commit ensure that the first line outputted by any tests is the TAP
plan.

Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoTests: Fix missing TAP output in overlap test
Christian Babeux [Thu, 21 Mar 2013 19:56:43 +0000 (15:56 -0400)] 
Tests: Fix missing TAP output in overlap test

The start and stop tracing shell functions are currently redirected to
/dev/null. This has the unfortunate side-effect of silencing the TAP
output thus producing an incomplete test output.

This commit remove the /dev/null redirection of those commands.

Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoTests: Fix number of tests in thread stall test
Christian Babeux [Thu, 21 Mar 2013 19:56:42 +0000 (15:56 -0400)] 
Tests: Fix number of tests in thread stall test

Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoFix: change expected number of event for test uid
David Goulet [Thu, 21 Mar 2013 19:40:54 +0000 (15:40 -0400)] 
Fix: change expected number of event for test uid

With UST commit d970f72ef97cd5f1e5e0152ce48a4c6b28eccfb2, enabling the
same events in two different channels make write them two times instead
of once.

This commit changes the number of expected events in one test for per
UID buffers.

Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoFix: handle error if metadata fails to be created
David Goulet [Thu, 21 Mar 2013 19:21:56 +0000 (15:21 -0400)] 
Fix: handle error if metadata fails to be created

Reported-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoAllow enable-channel to work with metadata channel
David Goulet [Thu, 21 Mar 2013 18:27:16 +0000 (14:27 -0400)] 
Allow enable-channel to work with metadata channel

This makes the enable-channel command to support setting the metadata
channel attributes. Now, with the lttng UI and API, the metadata
attributes can be set.

$ lttng enable-channel metadata -u ...

Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoAdd with-sessiond-bin configure option
Simon Marchi [Thu, 28 Feb 2013 23:42:17 +0000 (18:42 -0500)] 
Add with-sessiond-bin configure option

I also cleaned up the little check_sessiond function. The check using
access(2) was only done for the command line option, but I think it is a
good idea to do it wherever the path comes from.

Closes #441

Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoFix: Use after free on spawn_sessiond error path in check_sessiond
Christian Babeux [Thu, 28 Feb 2013 20:48:30 +0000 (15:48 -0500)] 
Fix: Use after free on spawn_sessiond error path in check_sessiond

Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoFix: Memory leak when zmalloc fail on kernel channel allocation
Christian Babeux [Thu, 28 Feb 2013 20:48:29 +0000 (15:48 -0500)] 
Fix: Memory leak when zmalloc fail on kernel channel allocation

Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoFix: Memory leaks when calling get_cmdline_by_pid
Christian Babeux [Thu, 28 Feb 2013 20:48:28 +0000 (15:48 -0500)] 
Fix: Memory leaks when calling get_cmdline_by_pid

Callers of get_cmdline_by_pid must free(3) the returned string.

Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoFix: Memory leaks on unknown hashtable type error handling
Christian Babeux [Thu, 28 Feb 2013 20:48:27 +0000 (15:48 -0500)] 
Fix: Memory leaks on unknown hashtable type error handling

Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoFix: Memory leaks on error paths when exporting consumerd libdir in env
Christian Babeux [Thu, 28 Feb 2013 20:48:26 +0000 (15:48 -0500)] 
Fix: Memory leaks on error paths when exporting consumerd libdir in env

Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoFix: Memory leaks on error paths in config_read_session_name
Christian Babeux [Thu, 28 Feb 2013 20:48:25 +0000 (15:48 -0500)] 
Fix: Memory leaks on error paths in config_read_session_name

Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoFix: Memory leak on error paths of relay_add_stream
Christian Babeux [Thu, 28 Feb 2013 20:48:24 +0000 (15:48 -0500)] 
Fix: Memory leak on error paths of relay_add_stream

On error paths the memory allocated for stream is never freed.

Also, fix undefined behavior on asprintf alloc failure. According to
asprintf(3), the content of the pointer passed to it is undefined if an
alloc failure occurs, so we could end up freeing a pointer in an
undefined state. Force its value to NULL.

Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoFix: wrong header path when compiling without UST support
David Goulet [Thu, 21 Mar 2013 17:12:23 +0000 (13:12 -0400)] 
Fix: wrong header path when compiling without UST support

Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoSupport per UID buffers
David Goulet [Thu, 7 Mar 2013 20:39:10 +0000 (15:39 -0500)] 
Support per UID buffers

This is a rather large commit. It adds the support for per UID buffers
for the user space tracer.

The --buffers-uid option is added to the lttng enable-channel command
which will set the session to use per UID buffers. So, all other channel
in that session MUST be set with the same buffer type or else an error
will be returned. For instance, here is an invalid use case:

$ lttng create
$ lttng enable-channel -u --buffers-uid chan1
$ lttng enable-channel -u chan2

The default is per PID (--buffers-pid). With no buffer type option, the
per PID is used for the UST tracer and global buffers for the kernel
being the only supported type for it (--buffers-global).

The tracing directory path are also changed to support this. For per UID
buffers, the path is now:

~/lttng-traces/ust/uid/1000/64-bit/*

For per PID buffers:

~/lttng-traces/<session_name>-<date>-<time>/ust/pid/ \
<app-name>-<pid>-<date>-<time>/

So basically, for UID, traces are stored per UID/ABI and for PID is
simply stored with the app name and pid. The kernel traces are untouched
and are still in kernel/.

Tests are also added for per UID buffers.

Acked-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoMove ust channel registry inside session registry
David Goulet [Thu, 7 Mar 2013 17:05:35 +0000 (12:05 -0500)] 
Move ust channel registry inside session registry

This is more logical with the way we do locking where a channel can not
exist without a session so accessing a channel implies the session lock.

Also, this patch makes the session registry a pointer that we allocate
and free on destroy.

Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoFix: function definition and declaration mismatch
David Goulet [Thu, 21 Mar 2013 14:20:47 +0000 (10:20 -0400)] 
Fix: function definition and declaration mismatch

Fixes #476

Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoFix: remove uri switch test from cbab merge commit
David Goulet [Mon, 11 Mar 2013 17:19:28 +0000 (13:19 -0400)] 
Fix: remove uri switch test from cbab merge commit

Also add a file to .gitignore.

Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoMerge remote-tracking branch 'cbab-github/tests-cleanup' into cbab
David Goulet [Mon, 11 Mar 2013 17:00:33 +0000 (13:00 -0400)] 
Merge remote-tracking branch 'cbab-github/tests-cleanup' into cbab

Conflicts:
tests/regression/tools/streaming/test_high_throughput_limits
tests/unit/test_kernel_data.c
tests/unit/test_ust_data.c

11 years agoFix: mark generated python bindings files as nodist
Jérémie Galarneau [Sat, 16 Feb 2013 01:46:45 +0000 (20:46 -0500)] 
Fix: mark generated python bindings files as nodist

make dist would fail if ./configure had not been invoked with
the --enable-python-bindings switch.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoFix: change default channel values in unit test
David Goulet [Mon, 11 Mar 2013 14:51:03 +0000 (10:51 -0400)] 
Fix: change default channel values in unit test

Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoFix: default read timer values
Mathieu Desnoyers [Mon, 11 Mar 2013 14:09:44 +0000 (10:09 -0400)] 
Fix: default read timer values

Kernel read timer value should be 200ms (200000us), not 200us.

UST default read timer value should be 0 (use write() system call from
applications).

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoImplement channel fd monitoring thread for UST
Mathieu Desnoyers [Sat, 9 Mar 2013 16:58:42 +0000 (11:58 -0500)] 
Implement channel fd monitoring thread for UST

This new thread uses a new hash table containing channels and monitors
their wait_fd. On hang up, the channel streams are closed but *not*
deleted so the teardown process of channel and streams are untouched.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoAdd channel wakeup fd to monitor close
Mathieu Desnoyers [Wed, 6 Mar 2013 21:12:57 +0000 (16:12 -0500)] 
Add channel wakeup fd to monitor close

Add channel wakeup fd, so consumer can keep its handle on the stream
wakeup_fd (for periodic timer flush), and yet still discover that an
application has closed a channel or exited.

Requires to be updated in locked-step with lttng-ust
"Add channel wakeup fd to monitor close"

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoFix: remove enable consumer from test
David Goulet [Fri, 1 Mar 2013 17:58:08 +0000 (12:58 -0500)] 
Fix: remove enable consumer from test

Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoMove metadata creation into lttng-sessiond and lttng-consumed
David Goulet [Tue, 26 Feb 2013 17:46:09 +0000 (12:46 -0500)] 
Move metadata creation into lttng-sessiond and lttng-consumed

The metadata is completely generated in the session daemon and pushed to
the consumer which writes the full string to a ustctl channel object. On
each event/channel notification from the tracer, the metadata is
generated on the spot and kept in the UST registry of the session
daemon.

On stop and destroy command, the metadata is pushed to the consumer. On
application unregistration as well, the metadata is handled.

Needs to be use in locked-step with LTTng-UST:
"Move metadata creation into lttng-sessiond and lttng-consumed"

Acked-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoMove UST registry into sessiond and implement notifiers
David Goulet [Tue, 19 Feb 2013 20:17:09 +0000 (15:17 -0500)] 
Move UST registry into sessiond and implement notifiers

Notify now comes from the UST tracer to register event in a new registry
in the session daemon storing UST channel and events. This registry is
used to send back event and channel IDs to the tracer and the session
UUID. It will also be used later on to generate metadata which will
completely remove metadata generation from the application.

This introduces a new thread in the session daemon being the thread
managing application notification using a new socket (notify socket).
This thread is in ust-thread.c/.h and spawned at startup.

Needs to be use in locked-step with LTTng-UST commit:
"Move UST registry into sessiond and implement notifiers"

Acked-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoTests: Add runner script for tests
Christian Babeux [Fri, 22 Feb 2013 04:32:39 +0000 (23:32 -0500)] 
Tests: Add runner script for tests

Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
11 years agoTests: Add runner script for regression testsuite
Christian Babeux [Fri, 22 Feb 2013 04:29:02 +0000 (23:29 -0500)] 
Tests: Add runner script for regression testsuite

Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
11 years agoTests: Add runner script for tools regression tests
Christian Babeux [Fri, 22 Feb 2013 04:26:52 +0000 (23:26 -0500)] 
Tests: Add runner script for tools regression tests

Also remove old the old runner scripts.

Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
11 years agoTests: Convert the tools streaming tests output to TAP
Christian Babeux [Fri, 22 Feb 2013 04:19:17 +0000 (23:19 -0500)] 
Tests: Convert the tools streaming tests output to TAP

Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
11 years agoTests: Convert the tools health tests output to TAP
Christian Babeux [Fri, 22 Feb 2013 04:17:34 +0000 (23:17 -0500)] 
Tests: Convert the tools health tests output to TAP

Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
11 years agoTests: Convert the tools filtering tests output to TAP
Christian Babeux [Fri, 22 Feb 2013 04:15:25 +0000 (23:15 -0500)] 
Tests: Convert the tools filtering tests output to TAP

Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
11 years agoTests: Rename the tools tests runners to test_<test name>
Christian Babeux [Fri, 22 Feb 2013 04:11:53 +0000 (23:11 -0500)] 
Tests: Rename the tools tests runners to test_<test name>

Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
11 years agoTests: Add runner script for UST regression tests
Christian Babeux [Fri, 22 Feb 2013 03:57:15 +0000 (22:57 -0500)] 
Tests: Add runner script for UST regression tests

Also remove the old runners scripts.

Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
11 years agoTests: Convert the UST overlap test output to TAP
Christian Babeux [Fri, 22 Feb 2013 03:53:40 +0000 (22:53 -0500)] 
Tests: Convert the UST overlap test output to TAP

Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
11 years agoTests: Convert the UST nprocesses test output to TAP
Christian Babeux [Fri, 22 Feb 2013 03:48:19 +0000 (22:48 -0500)] 
Tests: Convert the UST nprocesses test output to TAP

Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
11 years agoTests: Convert the UST multi-session test output to TAP
Christian Babeux [Fri, 22 Feb 2013 03:46:23 +0000 (22:46 -0500)] 
Tests: Convert the UST multi-session test output to TAP

Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
11 years agoTests: Convert the UST low-throughput test output to TAP
Christian Babeux [Fri, 22 Feb 2013 03:45:42 +0000 (22:45 -0500)] 
Tests: Convert the UST low-throughput test output to TAP

Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
11 years agoTests: Convert the UST high-throughput test output to TAP
Christian Babeux [Fri, 22 Feb 2013 03:39:01 +0000 (22:39 -0500)] 
Tests: Convert the UST high-throughput test output to TAP

Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
11 years agoTests: Convert the UST before-after test output to TAP
Christian Babeux [Fri, 22 Feb 2013 03:38:09 +0000 (22:38 -0500)] 
Tests: Convert the UST before-after test output to TAP

Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
11 years agoTests: Rename the UST tests runners to test_<test name>
Christian Babeux [Fri, 22 Feb 2013 03:26:41 +0000 (22:26 -0500)] 
Tests: Rename the UST tests runners to test_<test name>

Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
11 years agoTests: Convert the ust_global_event_wildcard test to an equivalent shell test
Christian Babeux [Fri, 22 Feb 2013 03:10:54 +0000 (22:10 -0500)] 
Tests: Convert the ust_global_event_wildcard test to an equivalent shell test

The test_event_wildcard shell script test has the same behavior has the
ust_global_event_wildcard test. In addition, the test output format has been
converted to TAP.

Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
11 years agoTests: Convert the ust_global_event_basic test to an equivalent shell test
Christian Babeux [Fri, 22 Feb 2013 03:05:12 +0000 (22:05 -0500)] 
Tests: Convert the ust_global_event_basic test to an equivalent shell test

The test_event_basic shell script test has the same behavior has the
ust_global_event_basic test. In addition, the test output format has been
converted to TAP.

Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
11 years agoTests: Add runner script for kernel regression tests
Christian Babeux [Fri, 22 Feb 2013 02:52:04 +0000 (21:52 -0500)] 
Tests: Add runner script for kernel regression tests

Also remove the old runner scripts.

Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
11 years agoTests: Convert the kernel_event_basic test to an equivalent shell test
Christian Babeux [Fri, 22 Feb 2013 02:49:14 +0000 (21:49 -0500)] 
Tests: Convert the kernel_event_basic test to an equivalent shell test

The test_event_basic shell script test has the same behavior has the
kernel_event_basic test. In addition, the resulting trace produced
by the test is now verified for correctness. Finally, the test output
format has been converted to TAP.

Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
11 years agoTests: Convert the kernel_all_events_basic test to an equivalent shell test
Christian Babeux [Fri, 22 Feb 2013 02:08:56 +0000 (21:08 -0500)] 
Tests: Convert the kernel_all_events_basic test to an equivalent shell test

The test_all_events shell script test has the same behavior has the
kernel_all_events_basic test. In addition, the resulting trace produced
by the test is now verified for correctness. Finally, the test output
format has been converted to TAP.

Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
11 years agoTests: Add runner script for unit tests
Christian Babeux [Thu, 21 Feb 2013 22:57:15 +0000 (17:57 -0500)] 
Tests: Add runner script for unit tests

Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
11 years agoTests: Convert the URI unit test output to TAP
Christian Babeux [Thu, 21 Feb 2013 22:35:25 +0000 (17:35 -0500)] 
Tests: Convert the URI unit test output to TAP

Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
11 years agoTests: Convert the UST data structures unit test output to TAP
Christian Babeux [Thu, 21 Feb 2013 22:28:09 +0000 (17:28 -0500)] 
Tests: Convert the UST data structures unit test output to TAP

Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
11 years agoTests: Convert the kernel data structures unit test output to TAP
Christian Babeux [Thu, 21 Feb 2013 22:24:27 +0000 (17:24 -0500)] 
Tests: Convert the kernel data structures unit test output to TAP

Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
11 years agoTests: Convert the session unit test output to TAP
Christian Babeux [Thu, 21 Feb 2013 22:17:38 +0000 (17:17 -0500)] 
Tests: Convert the session unit test output to TAP

Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
11 years agoTests: Convert functions in utils.sh to output in the TAP format
Christian Babeux [Thu, 21 Feb 2013 23:09:57 +0000 (18:09 -0500)] 
Tests: Convert functions in utils.sh to output in the TAP format

Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
11 years agoTests: Add the runner.sh tests runner utility
Christian Babeux [Thu, 21 Feb 2013 20:14:48 +0000 (15:14 -0500)] 
Tests: Add the runner.sh tests runner utility

This script contains the run_tests function to ease the run of a testsuite.

Usage example:

source $TESTDIR/utils/runner.sh

tests=( some_test
        some_other_test )

opts=("$@")
run_tests tests[@] opts[@]

Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
11 years agoTests: Add TAP helpers in tests/utils/tap
Christian Babeux [Thu, 21 Feb 2013 21:31:16 +0000 (16:31 -0500)] 
Tests: Add TAP helpers in tests/utils/tap

tests/utils/tap/tap.{h,c}:
For use in C tests. You can link against libtap with the usual automake
mechanisms.

tests/utils/tap/tap.sh:
For use in shell scripts tests. Source the script
(e.g. source "tests/utils/tap/tap.sh") to use the relevants TAP functions.

Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
11 years agoTests: Move unit tests to tests/unit
Christian Babeux [Thu, 21 Feb 2013 21:29:47 +0000 (16:29 -0500)] 
Tests: Move unit tests to tests/unit

The regression/tools/{test_kernel_data_trace,test_sessions,test_ust_data_trace}.c
and regression/tools/streaming/unit_tests.c tests files are really unit tests.

In order to have a clear separation between unit tests and integration/system tests,
move them to their own folder.

Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
11 years agoTests: Move tests to tests/regression
Christian Babeux [Thu, 21 Feb 2013 19:20:25 +0000 (14:20 -0500)] 
Tests: Move tests to tests/regression

Also move the utils.sh and utils.h helper files under tests/utils.

Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
11 years agoDeprecate enable/disable-consumer
David Goulet [Fri, 15 Feb 2013 22:09:09 +0000 (17:09 -0500)] 
Deprecate enable/disable-consumer

The concept of consumer should change to the fact that a user can
enable/disable outputs such as file or network for streaming. We
envision that multiple outputs can be attached to a channel in the
future.

We want to minimise the amount of puzzlement for users. Having an error
message from the consumer daemon when --no-consumer has been specified
can be considered puzzling.

This calls for "add output" semantic, so we can support this "tee"
use-case seemlessly. We plan on allowing add/del output while tracing is
active, which is not currently permitted by enable-consumer.

Everything enable-consumer does can be done by lttng create options
Therefore, it seems easier for development of upcoming features and for
the sake of simplicity of interfaces to deprecate the current
enable/disable consumer.

This applies for both to the lttng UI commands and API calls. The
documentation has been removed from the man page and the help of the
lttng command. So, it exists but is simply not documented.

Signed-off-by: David Goulet <dgoulet@efficios.com>
This page took 0.04225 seconds and 4 git commands to generate.