File tree Expand file tree Collapse file tree 1 file changed +18
-5
lines changed Expand file tree Collapse file tree 1 file changed +18
-5
lines changed Original file line number Diff line number Diff line change @@ -942,7 +942,7 @@ static __init int test_graph_storage_multi(void)
942
942
{
943
943
struct fgraph_fixture * fixture ;
944
944
bool printed = false;
945
- int i , ret ;
945
+ int i , j , ret ;
946
946
947
947
pr_cont ("PASSED\n" );
948
948
pr_info ("Testing multiple fgraph storage on a function: " );
@@ -953,22 +953,35 @@ static __init int test_graph_storage_multi(void)
953
953
if (ret && ret != - ENODEV ) {
954
954
pr_cont ("*Could not set filter* " );
955
955
printed = true;
956
- goto out ;
956
+ goto out2 ;
957
957
}
958
+ }
958
959
960
+ for (j = 0 ; j < ARRAY_SIZE (store_bytes ); j ++ ) {
961
+ fixture = & store_bytes [j ];
959
962
ret = register_ftrace_graph (& fixture -> gops );
960
963
if (ret ) {
961
964
pr_warn ("Failed to init store_bytes fgraph tracing\n" );
962
965
printed = true;
963
- goto out ;
966
+ goto out1 ;
964
967
}
965
968
}
966
969
967
970
DYN_FTRACE_TEST_NAME ();
968
- out :
971
+ out1 :
972
+ while (-- j >= 0 ) {
973
+ fixture = & store_bytes [j ];
974
+ unregister_ftrace_graph (& fixture -> gops );
975
+
976
+ if (fixture -> error_str && !printed ) {
977
+ pr_cont ("*** %s ***" , fixture -> error_str );
978
+ printed = true;
979
+ }
980
+ }
981
+ out2 :
969
982
while (-- i >= 0 ) {
970
983
fixture = & store_bytes [i ];
971
- unregister_ftrace_graph (& fixture -> gops );
984
+ ftrace_free_filter (& fixture -> gops . ops );
972
985
973
986
if (fixture -> error_str && !printed ) {
974
987
pr_cont ("*** %s ***" , fixture -> error_str );
You can’t perform that action at this time.
0 commit comments