Fix: enable event with different loglevel error
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 14 Jun 2012 14:43:04 +0000 (10:43 -0400)
committerDavid Goulet <dgoulet@efficios.com>
Thu, 14 Jun 2012 17:46:43 +0000 (13:46 -0400)
This following example was NOT returning a correct error message.
"event1" is set with a loglevel "TRACE_CRIT". The normal behavior here
is that once enabled, you can not change the loglevel of the enable
event on the tracer side with a second command. It now returns a new
error message like so:

$ lttng enable-event event1 --loglevel-only TRACE-CRIT -u
$ lttng enable-event event1 --loglevel-only TRACE-WARNING -u
[...] Event already enabled with different loglevel

This commit makes the session daemon verify if _both_ the name and
loglevel are the same when enabling an event or else an error is
returned.

Also, the session daemon will continue enabling events and not return an
error is the loglevel does not match event for ust app on the tracer
which returns an EPERM at that stage. This is to address the case where
two applications have the same event name but with different loglevel.

Reported-by: Tan Dung Le Tran <tan.dung.le.tran@ericsson.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>

No differences found
This page took 0.025497 seconds and 4 git commands to generate.