@@ -106,51 +106,6 @@ fn normalize_timers_json(output: &str) -> String {
106106 result
107107}
108108
109- #[ cfg( test) ]
110- #[ ctor:: ctor]
111- fn setup ( ) {
112- println ! ( "setup network namespace and interfaces for tests" ) ;
113-
114- // Create network namespace (delete first if it exists)
115- let netns_list = exec_cmd ( & [ "ip" , "netns" , "list" ] ) ;
116- if netns_list. contains ( TEST_NETNS ) {
117- exec_cmd ( & [ "ip" , "netns" , "del" , TEST_NETNS ] ) ;
118- }
119- exec_cmd ( & [ "ip" , "netns" , "add" , TEST_NETNS ] ) ;
120-
121- // Add vlan over dummy interface
122- exec_in_netns ( & [ "ip" , "link" , "add" , "dummy0" , "type" , "dummy" ] ) ;
123- exec_in_netns ( & [
124- "ip" ,
125- "link" ,
126- "property" ,
127- "add" ,
128- "dev" ,
129- "dummy0" ,
130- "altname" ,
131- "dmmy-zero" ,
132- ] ) ;
133- exec_in_netns ( & [ "ip" , "link" , "add" , "br0" , "type" , "bridge" ] ) ;
134- exec_in_netns ( & [
135- "ip" , "link" , "add" , "link" , "dummy0" , "name" , "dummy0.1" , "type" ,
136- "vlan" , "id" , "1" ,
137- ] ) ;
138- exec_in_netns ( & [ "ip" , "link" , "set" , "dev" , "dummy0.1" , "master" , "br0" ] ) ;
139-
140- exec_in_netns ( & [ "ip" , "link" , "set" , "dummy0" , "up" ] ) ;
141- exec_in_netns ( & [ "ip" , "link" , "set" , "dummy0.1" , "up" ] ) ;
142- exec_in_netns ( & [ "ip" , "link" , "set" , "br0" , "up" ] ) ;
143- }
144-
145- #[ cfg( test) ]
146- #[ ctor:: dtor]
147- fn teardown ( ) {
148- println ! ( "teardown network namespace for tests" ) ;
149-
150- // Delete network namespace
151- exec_cmd ( & [ "ip" , "netns" , "del" , TEST_NETNS ] ) ;
152- }
153-
154109#[ test]
155110fn test_link_show ( ) {
156111 let cli_path = get_ip_cli_path ( ) ;
0 commit comments