File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed 
tools/testing/selftests/bpf/prog_tests Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -41,9 +41,11 @@ static void test_dummy_init_ret_value(void)
4141
4242	fd  =  bpf_program__fd (skel -> progs .test_1 );
4343	err  =  bpf_prog_test_run_opts (fd , & attr );
44- 	ASSERT_OK (err , "test_run" );
44+ 	if  (!ASSERT_OK (err , "test_run" ))
45+ 		goto out ;
4546	ASSERT_EQ (attr .retval , 0xf2f3f4f5 , "test_ret" );
4647
48+ out :
4749	dummy_st_ops_success__destroy (skel );
4850}
4951
@@ -115,13 +117,15 @@ static void test_dummy_multiple_args(void)
115117
116118	fd  =  bpf_program__fd (skel -> progs .test_2 );
117119	err  =  bpf_prog_test_run_opts (fd , & attr );
118- 	ASSERT_OK (err , "test_run" );
120+ 	if  (!ASSERT_OK (err , "test_run" ))
121+ 		goto out ;
119122	args [0 ] =  7 ;
120123	for  (i  =  0 ; i  <  ARRAY_SIZE (args ); i ++ ) {
121124		snprintf (name , sizeof (name ), "arg %zu" , i );
122125		ASSERT_EQ (skel -> bss -> test_2_args [i ], args [i ], name );
123126	}
124127
128+ out :
125129	dummy_st_ops_success__destroy (skel );
126130}
127131
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments