]> git.meshlink.io Git - meshlink/blobdiff - test/blackbox/common/network_namespace_framework.c
Add test cases for random port bindings
[meshlink] / test / blackbox / common / network_namespace_framework.c
index 2cac3b2e054b7385d7ac85a5c445cd303c9cd7c5..1c39bcccba7659ff5beadf3ac15df14ee73c9be1 100644 (file)
@@ -170,10 +170,12 @@ void netns_connect_namespaces(netns_state_t *test_state, namespace_t *ns1, names
                        }
 
                        interface->if_name = strdup(if_name);
+
                        assert(interface->if_name);
 
                        // Connect one end of the the veth pair to the namespace's interface
                        assert(sprintf(cmd, "ip link set %s netns %s name %s", eth_pairs[i], ns[i]->name, interface->if_name) >= 0);
+
                        assert(system(cmd) == 0);
                } else {
 
@@ -511,7 +513,7 @@ void netns_destroy_topology(netns_state_t *test_state) {
 
                for(i = 0; i < namespace_handle->pid_nos; i++) {
                        pid = (namespace_handle->pids)[i];
-                       assert(kill(pid, SIGINT) != -1);
+                       kill(pid, SIGINT);
                        pid_ret = waitpid(pid, NULL, WNOHANG);
                        assert(pid_ret != -1);