projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
lib: compile liblttng-ctl as C++
[lttng-tools.git]
/
tests
/
regression
/
tools
/
live
/
live_test.c
diff --git
a/tests/regression/tools/live/live_test.c
b/tests/regression/tools/live/live_test.c
index 4c56deece91321b8d07db210665481acbb46269b..40d0f6270b69a962e6a660841d439723997cfc18 100644
(file)
--- a/
tests/regression/tools/live/live_test.c
+++ b/
tests/regression/tools/live/live_test.c
@@
-5,7
+5,6
@@
*
*/
*
*/
-#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@
-41,6
+40,12
@@
#define NUM_TESTS 11
#define mmap_size 524288
#define NUM_TESTS 11
#define mmap_size 524288
+#ifdef HAVE_LIBLTTNG_UST_CTL
+#include <lttng/lttng-export.h>
+#include <lttng/ust-sigbus.h>
+LTTNG_EXPORT DEFINE_LTTNG_UST_SIGBUS_STATE();
+#endif
+
static int control_sock;
struct live_session *session;
static int control_sock;
struct live_session *session;
@@
-73,7
+78,7
@@
ssize_t lttng_live_recv(int fd, void *buf, size_t len)
do {
ret = recv(fd, buf + copied, to_copy, 0);
if (ret > 0) {
do {
ret = recv(fd, buf + copied, to_copy, 0);
if (ret > 0) {
-
assert
(ret <= to_copy);
+
LTTNG_ASSERT
(ret <= to_copy);
copied += ret;
to_copy -= ret;
}
copied += ret;
to_copy -= ret;
}
@@
-247,7
+252,7
@@
int create_viewer_session(void)
diag("[error] Error sending cmd");
goto error;
}
diag("[error] Error sending cmd");
goto error;
}
-
assert
(ret_len == sizeof(cmd));
+
LTTNG_ASSERT
(ret_len == sizeof(cmd));
ret_len = lttng_live_recv(control_sock, &resp, sizeof(resp));
if (ret_len == 0) {
ret_len = lttng_live_recv(control_sock, &resp, sizeof(resp));
if (ret_len == 0) {
@@
-258,7
+263,7
@@
int create_viewer_session(void)
diag("[error] Error receiving create session reply");
goto error;
}
diag("[error] Error receiving create session reply");
goto error;
}
-
assert
(ret_len == sizeof(resp));
+
LTTNG_ASSERT
(ret_len == sizeof(resp));
if (be32toh(resp.status) != LTTNG_VIEWER_CREATE_SESSION_OK) {
diag("[error] Error creating viewer session");
if (be32toh(resp.status) != LTTNG_VIEWER_CREATE_SESSION_OK) {
diag("[error] Error creating viewer session");
This page took
0.024435 seconds
and
4
git commands to generate.