Benny Prijono | 5dcb38d | 2005-11-21 01:55:47 +0000 | [diff] [blame] | 1 | /* $Id$ */ |
| 2 | /* |
Benny Prijono | a771a51 | 2007-02-19 01:13:53 +0000 | [diff] [blame] | 3 | * Copyright (C) 2003-2007 Benny Prijono <benny@prijono.org> |
Benny Prijono | 5dcb38d | 2005-11-21 01:55:47 +0000 | [diff] [blame] | 4 | * |
| 5 | * This program is free software; you can redistribute it and/or modify |
| 6 | * it under the terms of the GNU General Public License as published by |
| 7 | * the Free Software Foundation; either version 2 of the License, or |
| 8 | * (at your option) any later version. |
| 9 | * |
| 10 | * This program is distributed in the hope that it will be useful, |
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 | * GNU General Public License for more details. |
| 14 | * |
| 15 | * You should have received a copy of the GNU General Public License |
| 16 | * along with this program; if not, write to the Free Software |
| 17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
| 18 | */ |
| 19 | |
| 20 | |
| 21 | #include "test.h" |
| 22 | #include <pjlib.h> |
Benny Prijono | fa9e5b1 | 2006-10-08 12:39:34 +0000 | [diff] [blame] | 23 | #include <pjlib-util.h> |
Benny Prijono | 40f2f64 | 2006-01-30 18:40:05 +0000 | [diff] [blame] | 24 | #include <pjsip.h> |
Benny Prijono | 5dcb38d | 2005-11-21 01:55:47 +0000 | [diff] [blame] | 25 | |
Benny Prijono | 85598d9 | 2006-01-07 18:44:25 +0000 | [diff] [blame] | 26 | #define THIS_FILE "test.c" |
| 27 | |
Benny Prijono | 5dcb38d | 2005-11-21 01:55:47 +0000 | [diff] [blame] | 28 | #define DO_TEST(test) do { \ |
Benny Prijono | 85598d9 | 2006-01-07 18:44:25 +0000 | [diff] [blame] | 29 | PJ_LOG(3, (THIS_FILE, "Running %s...", #test)); \ |
Benny Prijono | 5dcb38d | 2005-11-21 01:55:47 +0000 | [diff] [blame] | 30 | rc = test; \ |
Benny Prijono | 85598d9 | 2006-01-07 18:44:25 +0000 | [diff] [blame] | 31 | PJ_LOG(3, (THIS_FILE, \ |
Benny Prijono | 5dcb38d | 2005-11-21 01:55:47 +0000 | [diff] [blame] | 32 | "%s(%d)", \ |
| 33 | (rc ? "..ERROR" : "..success"), rc)); \ |
| 34 | if (rc!=0) goto on_return; \ |
| 35 | } while (0) |
| 36 | |
Benny Prijono | e93e287 | 2006-06-28 16:46:49 +0000 | [diff] [blame] | 37 | #define DO_TSX_TEST(test, param) \ |
| 38 | do { \ |
| 39 | PJ_LOG(3, (THIS_FILE, "Running %s(%s)...", #test, (param)->tp_type)); \ |
| 40 | rc = test(param); \ |
| 41 | PJ_LOG(3, (THIS_FILE, \ |
| 42 | "%s(%d)", \ |
| 43 | (rc ? "..ERROR" : "..success"), rc)); \ |
| 44 | if (rc!=0) goto on_return; \ |
| 45 | } while (0) |
Benny Prijono | 5dcb38d | 2005-11-21 01:55:47 +0000 | [diff] [blame] | 46 | |
| 47 | |
| 48 | pjsip_endpoint *endpt; |
Benny Prijono | 733c67a | 2006-06-23 01:03:52 +0000 | [diff] [blame] | 49 | int log_level = 3; |
Benny Prijono | 5dcb38d | 2005-11-21 01:55:47 +0000 | [diff] [blame] | 50 | |
Benny Prijono | e93e287 | 2006-06-28 16:46:49 +0000 | [diff] [blame] | 51 | static pj_oshandle_t fd_report; |
| 52 | const char *system_name = "Unknown"; |
| 53 | static char buf[1024]; |
| 54 | |
Benny Prijono | 5dcb38d | 2005-11-21 01:55:47 +0000 | [diff] [blame] | 55 | void app_perror(const char *msg, pj_status_t rc) |
| 56 | { |
| 57 | char errbuf[256]; |
| 58 | |
| 59 | PJ_CHECK_STACK(); |
| 60 | |
Benny Prijono | 733c67a | 2006-06-23 01:03:52 +0000 | [diff] [blame] | 61 | pj_strerror(rc, errbuf, sizeof(errbuf)); |
Benny Prijono | 85598d9 | 2006-01-07 18:44:25 +0000 | [diff] [blame] | 62 | PJ_LOG(3,(THIS_FILE, "%s: [pj_status_t=%d] %s", msg, rc, errbuf)); |
Benny Prijono | 5dcb38d | 2005-11-21 01:55:47 +0000 | [diff] [blame] | 63 | |
| 64 | } |
| 65 | |
Benny Prijono | 85598d9 | 2006-01-07 18:44:25 +0000 | [diff] [blame] | 66 | void flush_events(unsigned duration) |
| 67 | { |
| 68 | pj_time_val stop_time; |
| 69 | |
| 70 | pj_gettimeofday(&stop_time); |
| 71 | stop_time.msec += duration; |
| 72 | pj_time_val_normalize(&stop_time); |
| 73 | |
| 74 | /* Process all events for the specified duration. */ |
| 75 | for (;;) { |
| 76 | pj_time_val timeout = {0, 1}, now; |
| 77 | |
| 78 | pjsip_endpt_handle_events(endpt, &timeout); |
| 79 | |
| 80 | pj_gettimeofday(&now); |
| 81 | if (PJ_TIME_VAL_GTE(now, stop_time)) |
| 82 | break; |
| 83 | } |
| 84 | } |
| 85 | |
Benny Prijono | 5dcb38d | 2005-11-21 01:55:47 +0000 | [diff] [blame] | 86 | pj_status_t register_static_modules(pj_size_t *count, pjsip_module **modules) |
| 87 | { |
| 88 | *count = 0; |
| 89 | return PJ_SUCCESS; |
| 90 | } |
| 91 | |
Benny Prijono | e93e287 | 2006-06-28 16:46:49 +0000 | [diff] [blame] | 92 | static pj_status_t init_report(void) |
| 93 | { |
| 94 | char tmp[80]; |
| 95 | pj_time_val timestamp; |
| 96 | pj_parsed_time date_time; |
| 97 | pj_ssize_t len; |
| 98 | pj_status_t status; |
| 99 | |
| 100 | pj_ansi_sprintf(tmp, "pjsip-static-bench-%s-%s.htm", PJ_OS_NAME, PJ_CC_NAME); |
| 101 | |
| 102 | status = pj_file_open(NULL, tmp, PJ_O_WRONLY, &fd_report); |
| 103 | if (status != PJ_SUCCESS) |
| 104 | return status; |
| 105 | |
| 106 | /* Title */ |
| 107 | len = pj_ansi_sprintf(buf, "<HTML>\n" |
| 108 | " <HEAD>\n" |
| 109 | " <TITLE>PJSIP %s (%s) - Static Benchmark</TITLE>\n" |
| 110 | " </HEAD>\n" |
| 111 | "<BODY>\n" |
| 112 | "\n", |
| 113 | PJ_VERSION, |
| 114 | (PJ_DEBUG ? "Debug" : "Release")); |
| 115 | pj_file_write(fd_report, buf, &len); |
| 116 | |
| 117 | |
| 118 | /* Title */ |
| 119 | len = pj_ansi_sprintf(buf, "<H1>PJSIP %s (%s) - Static Benchmark</H1>\n", |
| 120 | PJ_VERSION, |
| 121 | (PJ_DEBUG ? "Debug" : "Release")); |
| 122 | pj_file_write(fd_report, buf, &len); |
| 123 | |
| 124 | len = pj_ansi_sprintf(buf, "<P>Below is the benchmark result generated " |
| 125 | "by <b>test-pjsip</b> program. The program " |
| 126 | "is single-threaded only.</P>\n"); |
| 127 | pj_file_write(fd_report, buf, &len); |
| 128 | |
| 129 | |
| 130 | /* Write table heading */ |
| 131 | len = pj_ansi_sprintf(buf, "<TABLE border=\"1\" cellpadding=\"4\">\n" |
| 132 | " <TR><TD bgColor=\"aqua\" align=\"center\">Variable</TD>\n" |
| 133 | " <TD bgColor=\"aqua\" align=\"center\">Value</TD>\n" |
| 134 | " <TD bgColor=\"aqua\" align=\"center\">Description</TD>\n" |
| 135 | " </TR>\n"); |
| 136 | pj_file_write(fd_report, buf, &len); |
| 137 | |
| 138 | |
| 139 | /* Write version */ |
| 140 | report_sval("version", PJ_VERSION, "", "PJLIB/PJSIP version"); |
| 141 | |
| 142 | |
| 143 | /* Debug or release */ |
| 144 | report_sval("build-type", (PJ_DEBUG ? "Debug" : "Release"), "", "Build type"); |
| 145 | |
| 146 | |
| 147 | /* Write timestamp */ |
| 148 | pj_gettimeofday(×tamp); |
| 149 | report_ival("timestamp", timestamp.sec, "", "System timestamp of the test"); |
| 150 | |
| 151 | |
| 152 | /* Write time of day */ |
| 153 | pj_time_decode(×tamp, &date_time); |
| 154 | len = pj_ansi_sprintf(tmp, "%04d-%02d-%02d %02d:%02d:%02d", |
| 155 | date_time.year, date_time.mon+1, date_time.day, |
| 156 | date_time.hour, date_time.min, date_time.sec); |
| 157 | report_sval("date-time", tmp, "", "Date/time of the test"); |
| 158 | |
| 159 | |
| 160 | /* Write System */ |
| 161 | report_sval("system", system_name, "", "System description"); |
| 162 | |
| 163 | |
| 164 | /* Write OS type */ |
| 165 | report_sval("os-family", PJ_OS_NAME, "", "Operating system family"); |
| 166 | |
| 167 | |
| 168 | /* Write CC name */ |
| 169 | len = pj_ansi_sprintf(tmp, "%s-%d.%d.%d", PJ_CC_NAME, |
| 170 | PJ_CC_VER_1, PJ_CC_VER_2, PJ_CC_VER_2); |
| 171 | report_sval("cc-name", tmp, "", "Compiler name and version"); |
| 172 | |
| 173 | |
| 174 | return PJ_SUCCESS; |
| 175 | } |
| 176 | |
| 177 | void report_sval(const char *name, const char* value, const char *valname, |
| 178 | const char *desc) |
| 179 | { |
| 180 | pj_ssize_t len; |
| 181 | |
| 182 | len = pj_ansi_sprintf(buf, " <TR><TD><TT>%s</TT></TD>\n" |
| 183 | " <TD align=\"right\"><B>%s %s</B></TD>\n" |
| 184 | " <TD>%s</TD>\n" |
| 185 | " </TR>\n", |
| 186 | name, value, valname, desc); |
| 187 | pj_file_write(fd_report, buf, &len); |
| 188 | } |
| 189 | |
| 190 | |
| 191 | void report_ival(const char *name, int value, const char *valname, |
| 192 | const char *desc) |
| 193 | { |
| 194 | pj_ssize_t len; |
| 195 | |
| 196 | len = pj_ansi_sprintf(buf, " <TR><TD><TT>%s</TT></TD>\n" |
| 197 | " <TD align=\"right\"><B>%d %s</B></TD>\n" |
| 198 | " <TD>%s</TD>\n" |
| 199 | " </TR>\n", |
| 200 | name, value, valname, desc); |
| 201 | pj_file_write(fd_report, buf, &len); |
| 202 | |
| 203 | } |
| 204 | |
| 205 | static void close_report(void) |
| 206 | { |
| 207 | pj_ssize_t len; |
| 208 | |
| 209 | if (fd_report) { |
| 210 | len = pj_ansi_sprintf(buf, "</TABLE>\n</BODY>\n</HTML>\n"); |
| 211 | pj_file_write(fd_report, buf, &len); |
| 212 | |
| 213 | pj_file_close(fd_report); |
| 214 | } |
| 215 | } |
| 216 | |
| 217 | |
Benny Prijono | 5dcb38d | 2005-11-21 01:55:47 +0000 | [diff] [blame] | 218 | int test_main(void) |
| 219 | { |
| 220 | pj_status_t rc; |
| 221 | pj_caching_pool caching_pool; |
| 222 | const char *filename; |
Benny Prijono | bc331ca | 2006-09-19 13:32:05 +0000 | [diff] [blame] | 223 | unsigned tsx_test_cnt=0; |
Benny Prijono | e93e287 | 2006-06-28 16:46:49 +0000 | [diff] [blame] | 224 | struct tsx_test_param tsx_test[10]; |
| 225 | pj_status_t status; |
Benny Prijono | bc331ca | 2006-09-19 13:32:05 +0000 | [diff] [blame] | 226 | #if INCLUDE_TSX_TEST |
| 227 | unsigned i; |
Benny Prijono | e93e287 | 2006-06-28 16:46:49 +0000 | [diff] [blame] | 228 | pjsip_transport *tp; |
| 229 | pjsip_tpfactory *tpfactory; |
Benny Prijono | bc331ca | 2006-09-19 13:32:05 +0000 | [diff] [blame] | 230 | #endif |
Benny Prijono | 5dcb38d | 2005-11-21 01:55:47 +0000 | [diff] [blame] | 231 | int line; |
| 232 | |
Benny Prijono | 9c1d9f5 | 2006-01-07 23:01:56 +0000 | [diff] [blame] | 233 | pj_log_set_level(log_level); |
Benny Prijono | 85598d9 | 2006-01-07 18:44:25 +0000 | [diff] [blame] | 234 | /* |
Benny Prijono | 5dcb38d | 2005-11-21 01:55:47 +0000 | [diff] [blame] | 235 | pj_log_set_decor(PJ_LOG_HAS_NEWLINE | PJ_LOG_HAS_TIME | |
| 236 | PJ_LOG_HAS_MICRO_SEC); |
Benny Prijono | 85598d9 | 2006-01-07 18:44:25 +0000 | [diff] [blame] | 237 | */ |
Benny Prijono | 5dcb38d | 2005-11-21 01:55:47 +0000 | [diff] [blame] | 238 | |
| 239 | if ((rc=pj_init()) != PJ_SUCCESS) { |
| 240 | app_perror("pj_init", rc); |
| 241 | return rc; |
| 242 | } |
| 243 | |
Benny Prijono | fa9e5b1 | 2006-10-08 12:39:34 +0000 | [diff] [blame] | 244 | if ((rc=pjlib_util_init()) != PJ_SUCCESS) { |
| 245 | app_perror("pj_init", rc); |
| 246 | return rc; |
| 247 | } |
| 248 | |
Benny Prijono | e93e287 | 2006-06-28 16:46:49 +0000 | [diff] [blame] | 249 | status = init_report(); |
| 250 | if (status != PJ_SUCCESS) |
| 251 | return status; |
| 252 | |
Benny Prijono | 5dcb38d | 2005-11-21 01:55:47 +0000 | [diff] [blame] | 253 | pj_dump_config(); |
| 254 | |
Benny Prijono | 95c6348 | 2006-07-06 14:28:45 +0000 | [diff] [blame] | 255 | pj_caching_pool_init( &caching_pool, &pj_pool_factory_default_policy, |
| 256 | PJSIP_TEST_MEM_SIZE ); |
Benny Prijono | 5dcb38d | 2005-11-21 01:55:47 +0000 | [diff] [blame] | 257 | |
| 258 | rc = pjsip_endpt_create(&caching_pool.factory, "endpt", &endpt); |
| 259 | if (rc != PJ_SUCCESS) { |
| 260 | app_perror("pjsip_endpt_create", rc); |
| 261 | pj_caching_pool_destroy(&caching_pool); |
| 262 | return rc; |
| 263 | } |
| 264 | |
Benny Prijono | 85598d9 | 2006-01-07 18:44:25 +0000 | [diff] [blame] | 265 | PJ_LOG(3,(THIS_FILE,"")); |
| 266 | |
| 267 | /* Init logger module. */ |
| 268 | init_msg_logger(); |
| 269 | msg_logger_set_enabled(1); |
| 270 | |
| 271 | /* Start transaction layer module. */ |
Benny Prijono | 733c67a | 2006-06-23 01:03:52 +0000 | [diff] [blame] | 272 | rc = pjsip_tsx_layer_init_module(endpt); |
Benny Prijono | 85598d9 | 2006-01-07 18:44:25 +0000 | [diff] [blame] | 273 | if (rc != PJ_SUCCESS) { |
| 274 | app_perror(" Error initializing transaction module", rc); |
| 275 | goto on_return; |
| 276 | } |
| 277 | |
| 278 | /* Create loop transport. */ |
| 279 | rc = pjsip_loop_start(endpt, NULL); |
| 280 | if (rc != PJ_SUCCESS) { |
| 281 | app_perror(" error: unable to create datagram loop transport", |
| 282 | rc); |
| 283 | goto on_return; |
| 284 | } |
Benny Prijono | e93e287 | 2006-06-28 16:46:49 +0000 | [diff] [blame] | 285 | tsx_test[tsx_test_cnt].port = 5060; |
| 286 | tsx_test[tsx_test_cnt].tp_type = "loop-dgram"; |
| 287 | tsx_test[tsx_test_cnt].type = PJSIP_TRANSPORT_LOOP_DGRAM; |
| 288 | ++tsx_test_cnt; |
| 289 | |
Benny Prijono | 5dcb38d | 2005-11-21 01:55:47 +0000 | [diff] [blame] | 290 | |
Benny Prijono | 02b8fd8 | 2006-06-26 15:12:55 +0000 | [diff] [blame] | 291 | #if INCLUDE_URI_TEST |
Benny Prijono | 733c67a | 2006-06-23 01:03:52 +0000 | [diff] [blame] | 292 | DO_TEST(uri_test()); |
Benny Prijono | 02b8fd8 | 2006-06-26 15:12:55 +0000 | [diff] [blame] | 293 | #endif |
| 294 | |
| 295 | #if INCLUDE_MSG_TEST |
Benny Prijono | 733c67a | 2006-06-23 01:03:52 +0000 | [diff] [blame] | 296 | DO_TEST(msg_test()); |
| 297 | DO_TEST(msg_err_test()); |
Benny Prijono | 02b8fd8 | 2006-06-26 15:12:55 +0000 | [diff] [blame] | 298 | #endif |
| 299 | |
| 300 | #if INCLUDE_TXDATA_TEST |
Benny Prijono | 733c67a | 2006-06-23 01:03:52 +0000 | [diff] [blame] | 301 | DO_TEST(txdata_test()); |
Benny Prijono | 02b8fd8 | 2006-06-26 15:12:55 +0000 | [diff] [blame] | 302 | #endif |
| 303 | |
Benny Prijono | e93e287 | 2006-06-28 16:46:49 +0000 | [diff] [blame] | 304 | #if INCLUDE_TSX_BENCH |
| 305 | DO_TEST(tsx_bench()); |
| 306 | #endif |
| 307 | |
Benny Prijono | 02b8fd8 | 2006-06-26 15:12:55 +0000 | [diff] [blame] | 308 | #if INCLUDE_UDP_TEST |
Benny Prijono | 733c67a | 2006-06-23 01:03:52 +0000 | [diff] [blame] | 309 | DO_TEST(transport_udp_test()); |
Benny Prijono | 02b8fd8 | 2006-06-26 15:12:55 +0000 | [diff] [blame] | 310 | #endif |
| 311 | |
| 312 | #if INCLUDE_LOOP_TEST |
Benny Prijono | 733c67a | 2006-06-23 01:03:52 +0000 | [diff] [blame] | 313 | DO_TEST(transport_loop_test()); |
Benny Prijono | 02b8fd8 | 2006-06-26 15:12:55 +0000 | [diff] [blame] | 314 | #endif |
| 315 | |
Benny Prijono | e93e287 | 2006-06-28 16:46:49 +0000 | [diff] [blame] | 316 | #if INCLUDE_TCP_TEST |
| 317 | DO_TEST(transport_tcp_test()); |
| 318 | #endif |
| 319 | |
Benny Prijono | fa9e5b1 | 2006-10-08 12:39:34 +0000 | [diff] [blame] | 320 | #if INCLUDE_RESOLVE_TEST |
| 321 | DO_TEST(resolve_test()); |
| 322 | #endif |
| 323 | |
Benny Prijono | e93e287 | 2006-06-28 16:46:49 +0000 | [diff] [blame] | 324 | |
Benny Prijono | 02b8fd8 | 2006-06-26 15:12:55 +0000 | [diff] [blame] | 325 | #if INCLUDE_TSX_TEST |
Benny Prijono | e93e287 | 2006-06-28 16:46:49 +0000 | [diff] [blame] | 326 | status = pjsip_udp_transport_start(endpt, NULL, NULL, 1, &tp); |
| 327 | if (status == PJ_SUCCESS) { |
| 328 | tsx_test[tsx_test_cnt].port = tp->local_name.port; |
| 329 | tsx_test[tsx_test_cnt].tp_type = "udp"; |
| 330 | tsx_test[tsx_test_cnt].type = PJSIP_TRANSPORT_UDP; |
| 331 | ++tsx_test_cnt; |
| 332 | } |
| 333 | |
| 334 | status = pjsip_tcp_transport_start(endpt, NULL, 1, &tpfactory); |
| 335 | if (status == PJ_SUCCESS) { |
| 336 | tsx_test[tsx_test_cnt].port = tpfactory->addr_name.port; |
| 337 | tsx_test[tsx_test_cnt].tp_type = "tcp"; |
| 338 | tsx_test[tsx_test_cnt].type = PJSIP_TRANSPORT_TCP; |
| 339 | ++tsx_test_cnt; |
| 340 | } else { |
| 341 | app_perror("Unable to create TCP", status); |
| 342 | rc = -4; |
| 343 | goto on_return; |
| 344 | } |
| 345 | |
| 346 | |
| 347 | for (i=0; i<tsx_test_cnt; ++i) { |
| 348 | DO_TSX_TEST(tsx_basic_test, &tsx_test[i]); |
| 349 | DO_TSX_TEST(tsx_uac_test, &tsx_test[i]); |
| 350 | DO_TSX_TEST(tsx_uas_test, &tsx_test[i]); |
| 351 | } |
Benny Prijono | 02b8fd8 | 2006-06-26 15:12:55 +0000 | [diff] [blame] | 352 | #endif |
| 353 | |
Benny Prijono | 5dcb38d | 2005-11-21 01:55:47 +0000 | [diff] [blame] | 354 | |
| 355 | on_return: |
Benny Prijono | e93e287 | 2006-06-28 16:46:49 +0000 | [diff] [blame] | 356 | flush_events(500); |
Benny Prijono | 95c6348 | 2006-07-06 14:28:45 +0000 | [diff] [blame] | 357 | |
| 358 | /* Dumping memory pool usage */ |
Benny Prijono | 1ef06df | 2006-07-09 10:06:44 +0000 | [diff] [blame] | 359 | PJ_LOG(3,(THIS_FILE, "Peak memory size=%u MB", |
| 360 | caching_pool.peak_used_size / 1000000)); |
Benny Prijono | 95c6348 | 2006-07-06 14:28:45 +0000 | [diff] [blame] | 361 | |
Benny Prijono | 5dcb38d | 2005-11-21 01:55:47 +0000 | [diff] [blame] | 362 | pjsip_endpt_destroy(endpt); |
| 363 | pj_caching_pool_destroy(&caching_pool); |
| 364 | |
Benny Prijono | 85598d9 | 2006-01-07 18:44:25 +0000 | [diff] [blame] | 365 | PJ_LOG(3,(THIS_FILE, "")); |
Benny Prijono | 5dcb38d | 2005-11-21 01:55:47 +0000 | [diff] [blame] | 366 | |
| 367 | pj_thread_get_stack_info(pj_thread_this(), &filename, &line); |
Benny Prijono | 85598d9 | 2006-01-07 18:44:25 +0000 | [diff] [blame] | 368 | PJ_LOG(3,(THIS_FILE, "Stack max usage: %u, deepest: %s:%u", |
Benny Prijono | 5dcb38d | 2005-11-21 01:55:47 +0000 | [diff] [blame] | 369 | pj_thread_get_stack_max_usage(pj_thread_this()), |
| 370 | filename, line)); |
| 371 | if (rc == 0) |
Benny Prijono | 85598d9 | 2006-01-07 18:44:25 +0000 | [diff] [blame] | 372 | PJ_LOG(3,(THIS_FILE, "Looks like everything is okay!..")); |
Benny Prijono | 5dcb38d | 2005-11-21 01:55:47 +0000 | [diff] [blame] | 373 | else |
Benny Prijono | 85598d9 | 2006-01-07 18:44:25 +0000 | [diff] [blame] | 374 | PJ_LOG(3,(THIS_FILE, "Test completed with error(s)")); |
Benny Prijono | 5dcb38d | 2005-11-21 01:55:47 +0000 | [diff] [blame] | 375 | |
Benny Prijono | e93e287 | 2006-06-28 16:46:49 +0000 | [diff] [blame] | 376 | report_ival("test-status", rc, "", "Overall test status/result (0==success)"); |
| 377 | close_report(); |
Benny Prijono | 733c67a | 2006-06-23 01:03:52 +0000 | [diff] [blame] | 378 | return rc; |
Benny Prijono | 5dcb38d | 2005-11-21 01:55:47 +0000 | [diff] [blame] | 379 | } |
| 380 | |