projects
/
babeltrace.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix test: remove hardcoded /tmp path
[babeltrace.git]
/
tests
/
lib
/
test_ctf_ir_ref.c
diff --git
a/tests/lib/test_ctf_ir_ref.c
b/tests/lib/test_ctf_ir_ref.c
index bf277b83312bfca2bd4e49f027671563b430885e..e2ee556c80adc53e515c83026c3aea206d7b85ce 100644
(file)
--- a/
tests/lib/test_ctf_ir_ref.c
+++ b/
tests/lib/test_ctf_ir_ref.c
@@
-567,12
+567,13
@@
static void test_example_scenario(void)
static void create_user_full(struct user *user)
{
static void create_user_full(struct user *user)
{
-
char trace_path[] = "/tmp/ctfwriter_XXXXXX"
;
+
gchar *trace_path
;
struct bt_ctf_field_type *ft;
struct bt_ctf_field *field;
struct bt_ctf_clock *clock;
int ret;
struct bt_ctf_field_type *ft;
struct bt_ctf_field *field;
struct bt_ctf_clock *clock;
int ret;
+ trace_path = g_build_filename(g_get_tmp_dir(), "ctfwriter_XXXXXX", NULL);
if (!bt_mkdtemp(trace_path)) {
perror("# perror");
}
if (!bt_mkdtemp(trace_path)) {
perror("# perror");
}
@@
-624,6
+625,7
@@
static void create_user_full(struct user *user)
ret = bt_ctf_stream_append_event(user->stream, user->event);
assert(!ret);
recursive_rmdir(trace_path);
ret = bt_ctf_stream_append_event(user->stream, user->event);
assert(!ret);
recursive_rmdir(trace_path);
+ g_free(trace_path);
}
static void test_put_order_swap(size_t *array, size_t a, size_t b)
}
static void test_put_order_swap(size_t *array, size_t a, size_t b)
This page took
0.024645 seconds
and
4
git commands to generate.