Unverified Commit 00f224bb by Christian Brauner Committed by GitHub

Merge pull request #3794 from evverx/gh3791

tests: stop cutting off right square brackets in share_ns
parents d5ec7f1e 11ead2c4
...@@ -137,7 +137,7 @@ __noreturn static void *ns_sharing_wrapper(void *data) ...@@ -137,7 +137,7 @@ __noreturn static void *ns_sharing_wrapper(void *data)
lxc_error("Failed to retrieve ipc namespace for container \"%s\"\n", name); lxc_error("Failed to retrieve ipc namespace for container \"%s\"\n", name);
goto out; goto out;
} }
ns_buf[ret == 0 ? ret : ret - 1] = '\0'; ns_buf[ret] = '\0';
if (strcmp(args->inherited_ipc_ns, ns_buf) != 0) { if (strcmp(args->inherited_ipc_ns, ns_buf) != 0) {
lxc_error("Failed to inherit ipc namespace from container \"owning-ns\": %s != %s\n", args->inherited_ipc_ns, ns_buf); lxc_error("Failed to inherit ipc namespace from container \"owning-ns\": %s != %s\n", args->inherited_ipc_ns, ns_buf);
...@@ -157,7 +157,7 @@ __noreturn static void *ns_sharing_wrapper(void *data) ...@@ -157,7 +157,7 @@ __noreturn static void *ns_sharing_wrapper(void *data)
lxc_error("Failed to retrieve ipc namespace for container \"%s\"\n", name); lxc_error("Failed to retrieve ipc namespace for container \"%s\"\n", name);
goto out; goto out;
} }
ns_buf[ret == 0 ? ret : ret - 1] = '\0'; ns_buf[ret] = '\0';
if (strcmp(args->inherited_net_ns, ns_buf) != 0) { if (strcmp(args->inherited_net_ns, ns_buf) != 0) {
lxc_error("Failed to inherit net namespace from container \"owning-ns\": %s != %s\n", args->inherited_net_ns, ns_buf); lxc_error("Failed to inherit net namespace from container \"owning-ns\": %s != %s\n", args->inherited_net_ns, ns_buf);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment