projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Tests: introduce WaitTraceTestApplicationGroup
[lttng-tools.git]
/
tests
/
regression
/
tools
/
notification
/
sessiond_testpoints.cpp
diff --git
a/tests/regression/tools/notification/sessiond_testpoints.cpp
b/tests/regression/tools/notification/sessiond_testpoints.cpp
index f0517ed14b911f9e62fc2bbf2ccd2d2e0036f76e..44e6b6e7b7a2ffee9d721aeaaa1e6ac4124b985a 100644
(file)
--- a/
tests/regression/tools/notification/sessiond_testpoints.cpp
+++ b/
tests/regression/tools/notification/sessiond_testpoints.cpp
@@
-8,34
+8,35
@@
#include <common/compat/getenv.hpp>
#include <common/consumer/consumer.hpp>
#include <common/compat/getenv.hpp>
#include <common/consumer/consumer.hpp>
-#include <common/pipe.hpp>
#include <common/error.hpp>
#include <common/error.hpp>
-#include <
unistd.h
>
-#include <stdbool.h>
+#include <
common/pipe.hpp
>
+
#include <lttng/constant.h>
#include <lttng/lttng-export.h>
#include <lttng/constant.h>
#include <lttng/lttng-export.h>
-#include <fcntl.h>
+
#include <dlfcn.h>
#include <dlfcn.h>
+#include <fcntl.h>
+#include <stdbool.h>
#include <stdio.h>
#include <stdio.h>
+#include <unistd.h>
static char *pause_pipe_path;
static struct lttng_pipe *pause_pipe;
static char *pause_pipe_path;
static struct lttng_pipe *pause_pipe;
-static int *notifier_notif_consumption_state;;
+static int *notifier_notif_consumption_state;
+;
int lttng_opt_verbose;
int lttng_opt_mi;
int lttng_opt_quiet;
int lttng_opt_verbose;
int lttng_opt_mi;
int lttng_opt_quiet;
-static
-void __attribute__((destructor)) pause_pipe_fini(void)
+static void __attribute__((destructor)) pause_pipe_fini()
{
int ret;
if (pause_pipe_path) {
ret = unlink(pause_pipe_path);
if (ret) {
{
int ret;
if (pause_pipe_path) {
ret = unlink(pause_pipe_path);
if (ret) {
- PERROR("Failed to unlink pause pipe: path = %s",
- pause_pipe_path);
+ PERROR("Failed to unlink pause pipe: path = %s", pause_pipe_path);
}
}
}
}
@@
-49,14
+50,13
@@
int __testpoint_sessiond_thread_notification(void)
int ret = 0;
const char *pause_pipe_path_prefix;
int ret = 0;
const char *pause_pipe_path_prefix;
- pause_pipe_path_prefix = lttng_secure_getenv(
- "NOTIFIER_PAUSE_PIPE_PATH");
+ pause_pipe_path_prefix = lttng_secure_getenv("NOTIFIER_PAUSE_PIPE_PATH");
if (!pause_pipe_path_prefix) {
ret = -1;
goto end;
}
if (!pause_pipe_path_prefix) {
ret = -1;
goto end;
}
- notifier_notif_consumption_state = (int *) dlsym(
NULL
, "notifier_consumption_paused");
+ notifier_notif_consumption_state = (int *) dlsym(
nullptr
, "notifier_consumption_paused");
LTTNG_ASSERT(notifier_notif_consumption_state);
ret = asprintf(&pause_pipe_path, "%s", pause_pipe_path_prefix);
LTTNG_ASSERT(notifier_notif_consumption_state);
ret = asprintf(&pause_pipe_path, "%s", pause_pipe_path_prefix);
@@
-66,8
+66,8
@@
int __testpoint_sessiond_thread_notification(void)
}
DBG("Creating pause pipe at %s", pause_pipe_path);
}
DBG("Creating pause pipe at %s", pause_pipe_path);
- pause_pipe = lttng_pipe_named_open(
pause_pipe_path,
-
S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP, O_NONBLOCK);
+ pause_pipe = lttng_pipe_named_open(
+
pause_pipe_path,
S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP, O_NONBLOCK);
if (!pause_pipe) {
ERR("Failed to create pause pipe at %s", pause_pipe_path);
ret = -1;
if (!pause_pipe) {
ERR("Failed to create pause pipe at %s", pause_pipe_path);
ret = -1;
@@
-105,7
+105,7
@@
int __testpoint_sessiond_handle_notifier_event_pipe(void)
if (value_read) {
*notifier_notif_consumption_state = !!value;
DBG("Message received on pause pipe: %s data consumption",
if (value_read) {
*notifier_notif_consumption_state = !!value;
DBG("Message received on pause pipe: %s data consumption",
-
*notifier_notif_consumption_state ? "paused" : "resumed");
+ *notifier_notif_consumption_state ? "paused" : "resumed");
}
end:
return ret;
}
end:
return ret;
This page took
0.024322 seconds
and
4
git commands to generate.