lttng-ctl: use the parsed URI instead of raw string for override
authorJonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Tue, 26 Apr 2022 18:33:52 +0000 (14:33 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 8 Dec 2022 14:05:33 +0000 (09:05 -0500)
Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: I0439c1ecdc935011036e3772e59f0caba017de34

src/lib/lttng-ctl/load.cpp
tests/regression/tools/save-load/test_load

index 02e2a6ff901a1e4d2fba83f426e644767cae41f8..eaab9905e78f5e1c5a6cc60bca19847d61db06c5 100644 (file)
@@ -485,7 +485,7 @@ int lttng_load_session_attr_set_override_url(
                        goto end;
                }
 
-               path_str = lttng_strndup(raw_path_str, PATH_MAX);
+               path_str = lttng_strndup(uri[0].dst.path, PATH_MAX);
                if (!path_str) {
                        ret = -LTTNG_ERR_NOMEM;
                        goto end;
index f149acd08e6c17bb430a988dd403fe95d6726165..e073e6071aabad107dc5d05c90d4348795bf9ccf 100755 (executable)
@@ -168,7 +168,7 @@ function test_override_url_normal()
 {
        local local_url_override="file:///tmp/override/to/here"
        local local_path_override="/tmp/override/to/here"
-       local local_path_compare_value="/tmp/override/to/here/"
+       local local_path_compare_value="/tmp/override/to/here"
        local stream_url_override="net://127.0.0.1:8172:9817"
        local stream_url_compare="tcp4://127.0.0.1:8172/ [data: 9817]"
 
@@ -216,7 +216,7 @@ function test_override_url_snapshot()
 {
        local url_override="file:///tmp/override/to/here"
        local path_override="/tmp/override/to/here"
-       local path_compare_value="/tmp/override/to/here/"
+       local path_compare_value="/tmp/override/to/here"
        local stream_url_override="net://127.0.0.1:8172:9817"
        local stream_url_compare_ctrl="tcp4://127.0.0.1:8172/"
        local stream_url_compare_data="tcp4://127.0.0.1:9817/"
@@ -271,7 +271,7 @@ function test_override_url_live()
 {
        local url_override="file:///tmp/override/to/here"
        local path_override="/tmp/override/to/here"
-       local path_compare_value="/tmp/override/to/here/"
+       local path_compare_value="/tmp/override/to/here"
        local stream_url_override="net://127.0.0.1:8172:9817"
        local stream_url_compare="tcp4://127.0.0.1:8172/ [data: 9817]"
        local local_session_name="${SESSION_NAME}-live"
This page took 0.026872 seconds and 4 git commands to generate.