Changeset 205832b in mainline for kernel/test
- Timestamp:
- 2012-11-05T15:37:39Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- f048658
- Parents:
- 6b99156
- Location:
- kernel/test
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/test/cht/cht1.c
r6b99156 r205832b 97 97 static const char * do_sanity_test(cht_t *h) 98 98 { 99 if (cht_find_lazy(h, 0))99 if (cht_find_lazy(h, (void*)0)) 100 100 return "Found lazy in empty table."; 101 101 102 if (cht_find(h, 0))102 if (cht_find(h, (void*)0)) 103 103 return "Found in empty table."; 104 104 105 if (cht_remove_key(h, 0))105 if (cht_remove_key(h, (void*)0)) 106 106 return "Removed from empty table."; 107 107 108 108 const int val_cnt = 6; 109 val_t *v[6] = { 0};109 val_t *v[6] = { NULL }; 110 110 111 111 for (int i = 0; i < val_cnt; ++i) … … 145 145 146 146 if (cht_find(h, (void*)0)) 147 return " Fantom find.";147 return "Phantom find."; 148 148 149 149 cht_link_t *item = cht_find(h, (void*)v[5]->unique_id); … … 226 226 } 227 227 228 return 0;228 return NULL; 229 229 } 230 230 … … 559 559 return "CHT stress test failed."; 560 560 else 561 return 0;562 } 561 return NULL; 562 } -
kernel/test/smpcall/smpcall1.c
r6b99156 r205832b 85 85 /* Number of received calls that were sent by cpu[i]. */ 86 86 size_t call_cnt[MAX_CPUS] = {0}; 87 thread_t *thread[MAX_CPUS] = { 0};87 thread_t *thread[MAX_CPUS] = { NULL }; 88 88 89 89 unsigned int cpu_count = min(config.cpu_active, MAX_CPUS); -
kernel/test/synch/rcu1.c
r6b99156 r205832b 43 43 44 44 static int one_idx = 0; 45 static thread_t *thread[MAX_THREADS] = { 0};45 static thread_t *thread[MAX_THREADS] = { NULL }; 46 46 47 47 typedef struct { … … 100 100 101 101 for (size_t i = 0; i < thread_cnt; ++i) { 102 run_thread(i, func, 0);102 run_thread(i, func, NULL); 103 103 } 104 104 } … … 123 123 124 124 thread_detach(thread[i]); 125 thread[i] = 0;125 thread[i] = NULL; 126 126 } 127 127 } … … 145 145 thread_join(thread[one_idx]); 146 146 thread_detach(thread[one_idx]); 147 thread[one_idx] = 0;147 thread[one_idx] = NULL; 148 148 } 149 149 } … … 337 337 338 338 TPRINTF("\nRun a single reader that posts one callback.\n"); 339 run_one(one_cb_reader, 0);339 run_one(one_cb_reader, NULL); 340 340 join_one(); 341 341 … … 1015 1015 { 0, do_expedite, "do_expedite" }, 1016 1016 { 1, do_stress, "do_stress" }, 1017 { 0, 0, 0}1017 { 0, NULL, NULL } 1018 1018 }; 1019 1019 … … 1023 1023 uint64_t delta_gps = 0; 1024 1024 1025 for (int i = 0; test_func[i].func != 0; ++i) {1025 for (int i = 0; test_func[i].func; ++i) { 1026 1026 if (!test_func[i].include) { 1027 1027 TPRINTF("\nSubtest %s() skipped.\n", test_func[i].desc); … … 1047 1047 1048 1048 if (success) 1049 return 0;1049 return NULL; 1050 1050 else 1051 1051 return "One of the tests failed."; -
kernel/test/synch/workqueue2.c
r6b99156 r205832b 116 116 test_custom_workq_impl(true, "test-workq-stop"); 117 117 /* Errors are expected. */ 118 return 0;118 return NULL; 119 119 } 120 120 … … 122 122 const char *test_workqueue_all(void) 123 123 { 124 const char *err = 0;124 const char *err = NULL; 125 125 const char *res; 126 126 -
kernel/test/synch/workqueue3.c
r6b99156 r205832b 56 56 static const char *do_test(bool exit_early) 57 57 { 58 const char *err = 0;58 const char *err = NULL; 59 59 TPRINTF("Stress testing system queue.\n"); 60 60 TPRINTF("First run:\n");
Note:
See TracChangeset
for help on using the changeset viewer.