projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Tests: add a recording rule listing test
[lttng-tools.git]
/
tests
/
regression
/
ust
/
clock-override
/
lttng-ust-clock-override-test.c
diff --git
a/tests/regression/ust/clock-override/lttng-ust-clock-override-test.c
b/tests/regression/ust/clock-override/lttng-ust-clock-override-test.c
index b2c20bee3819cddde3ec29af1f82997b34efd4a4..180712ee8dc19c61371673668300d2ad9321cea7 100644
(file)
--- a/
tests/regression/ust/clock-override/lttng-ust-clock-override-test.c
+++ b/
tests/regression/ust/clock-override/lttng-ust-clock-override-test.c
@@
-10,86
+10,83
@@
*
*/
*
*/
+#include <common/compat/time.hpp>
+
+#include <lttng/lttng-export.h>
+#include <lttng/ust-clock.h>
+
+#include <stdio.h>
#include <stdlib.h>
#include <stdlib.h>
-#include <common/compat/time.h>
#include <string.h>
#include <string.h>
-#include <stdio.h>
-#include <lttng/ust-clock.h>
-static
-uint64_t plugin_read64(void)
+static uint64_t plugin_read64(void)
{
/* Freeze time */
return 0;
}
{
/* Freeze time */
return 0;
}
-static
-uint64_t plugin_freq(void)
+static uint64_t plugin_freq(void)
{
{
- return 1000;
/* 1KHz clock (very coarse!) */
+ return 1000; /* 1KHz clock (very coarse!) */
}
}
-static
-int plugin_uuid(char *uuid)
+static int plugin_uuid(char *uuid)
{
const char myuuid[] = "83c63deb-7aa4-48fb-abda-946f400d76e6";
memcpy(uuid, myuuid, LTTNG_UST_UUID_STR_LEN);
return 0;
}
{
const char myuuid[] = "83c63deb-7aa4-48fb-abda-946f400d76e6";
memcpy(uuid, myuuid, LTTNG_UST_UUID_STR_LEN);
return 0;
}
-static
-const char *plugin_name(void)
+static const char *plugin_name(void)
{
return "lttng_test_clock_override";
}
{
return "lttng_test_clock_override";
}
-static
-const char *plugin_description(void)
+static const char *plugin_description(void)
{
return "Freeze time with 1KHz for regression test";
}
{
return "Freeze time with 1KHz for regression test";
}
+LTTNG_EXPORT void lttng_ust_clock_plugin_init(void);
void lttng_ust_clock_plugin_init(void)
{
int ret;
ret = lttng_ust_trace_clock_set_read64_cb(plugin_read64);
if (ret) {
void lttng_ust_clock_plugin_init(void)
{
int ret;
ret = lttng_ust_trace_clock_set_read64_cb(plugin_read64);
if (ret) {
- fprintf(stderr, "Error setting clock override read64 callback: %s\n",
+ fprintf(stderr,
+ "Error setting clock override read64 callback: %s\n",
strerror(-ret));
goto error;
}
ret = lttng_ust_trace_clock_set_freq_cb(plugin_freq);
if (ret) {
strerror(-ret));
goto error;
}
ret = lttng_ust_trace_clock_set_freq_cb(plugin_freq);
if (ret) {
- fprintf(stderr, "Error setting clock override freq callback: %s\n",
- strerror(-ret));
+ fprintf(stderr, "Error setting clock override freq callback: %s\n", strerror(-ret));
goto error;
}
ret = lttng_ust_trace_clock_set_uuid_cb(plugin_uuid);
if (ret) {
goto error;
}
ret = lttng_ust_trace_clock_set_uuid_cb(plugin_uuid);
if (ret) {
- fprintf(stderr, "Error setting clock override uuid callback: %s\n",
- strerror(-ret));
+ fprintf(stderr, "Error setting clock override uuid callback: %s\n", strerror(-ret));
goto error;
}
ret = lttng_ust_trace_clock_set_name_cb(plugin_name);
if (ret) {
goto error;
}
ret = lttng_ust_trace_clock_set_name_cb(plugin_name);
if (ret) {
- fprintf(stderr, "Error setting clock override name callback: %s\n",
- strerror(-ret));
+ fprintf(stderr, "Error setting clock override name callback: %s\n", strerror(-ret));
goto error;
}
ret = lttng_ust_trace_clock_set_description_cb(plugin_description);
if (ret) {
goto error;
}
ret = lttng_ust_trace_clock_set_description_cb(plugin_description);
if (ret) {
- fprintf(stderr, "Error setting clock override description callback: %s\n",
+ fprintf(stderr,
+ "Error setting clock override description callback: %s\n",
strerror(-ret));
goto error;
}
ret = lttng_ust_enable_trace_clock_override();
if (ret) {
strerror(-ret));
goto error;
}
ret = lttng_ust_enable_trace_clock_override();
if (ret) {
- fprintf(stderr, "Error enabling clock override: %s\n",
- strerror(-ret));
+ fprintf(stderr, "Error enabling clock override: %s\n", strerror(-ret));
goto error;
}
goto error;
}
This page took
0.024262 seconds
and
4
git commands to generate.