Project

General

Profile

Actions

Bug #901

open

Some liblttng-ctl don't return LTTNG_OK on success

Added by Jérémie Galarneau almost 8 years ago. Updated about 7 years ago.

Status:
Confirmed
Priority:
Normal
Target version:
Start date:
08/05/2015
Due date:
% Done:

0%

Estimated time:

Description

It appears that some liblttng-ctl functions, such as lttng_create_session_snapshot() have conflicting return code conventions.

In this specific case, the header under lttng/session.h asserts that the function will

/*
 [...]
 * Return 0 on success else a negative LTTng error code.
 */

while the header in lttng-ctl.c affirms that it

/*
 [...]
 * Returns LTTNG_OK on success or a negative error code.
 */

and the function actually returns

ret = lttng_ctl_ask_sessiond_varlen(&lsm, uris, ...

which, itself will

/*
 [...]
 Return size of data (only payload, not header) or a negative error code.
 */

This pattern is used in multiple places which breaks code which checks for "ret == LTTNG_OK" instead of "ret < 0".

Actions #1

Updated by Jérémie Galarneau almost 8 years ago

lttng_create_session_live(...)

has the same problem.

Actions #2

Updated by Jérémie Galarneau almost 8 years ago

  • Target version set to 22
Actions #3

Updated by Jérémie Galarneau almost 8 years ago

  • Status changed from New to Confirmed
Actions #4

Updated by Jérémie Galarneau almost 8 years ago

  • Target version changed from 22 to 2.8
Actions #5

Updated by Jérémie Galarneau over 7 years ago

  • Assignee set to Jérémie Galarneau
Actions #6

Updated by Jérémie Galarneau about 7 years ago

  • Target version changed from 2.8 to 2.9
Actions

Also available in: Atom PDF