Esempio n. 1
0
int main(void)
{
	// ³õʼ»¯ acl ¿â
	acl::acl_cpp_init();

	test_thread();
	test_thread2();

	printf("enter any key to exit ...\r\n");
	getchar();

	return 0;
}
Esempio n. 2
0
int main(int argc, char *argv[]) {
    bool  chook = false;
    int   ferr;
    int   loop = 10;
    TAD   zargs[] = {
      { "-chook",     TA_Bool, TA_NOMAX,    &chook     },
      { "-client",    TA_Ign,  TA_NOMAX,    NULL       },
      { "-loop",      TA_Int,  TA_NOMAX,    &loop      },
      { "-maxth",     TA_Int,  MAX_THR,     &maxth     },
      { "-server",    TA_Ign,  TA_NOMAX,    NULL       },
      { "-tol",       TA_Int,  TA_NOMAX,    &to_tol    },
      { "-v",         TA_Bool, TA_NOMAX,    &verbose   },
      { "",           TA_End,  TA_NOMAX,    NULL       }
    };

    msfs_util_init(&argc, &argv, msg_debug_hook);
    arg_proc_args(zargs, false, argc, argv);
    if (chook)
        msg_debug_hook("c", "c");
    util_test_start(true);
    ferr = msg_mon_process_startup(true);  // system messages?
    TEST_CHK_FEOK(ferr);
    util_gethostname(my_name, sizeof(my_name));

#if 0 // reproduce bug 1570
    // - add sleep(1) in sb_timer_setitimer when pv_to != 0
#endif
    test_cancel();
    test_timers();
    test_timers_alloc();
    test_thread1();
    test_cancel_cb();
    test_timers_cb();
    test_thread3();
#if 0 // reproduce bug 728
// - must add sleep(1) after call-to-sb_timer_comp_q_remove() in MSG_LISTEN_
    test_thread2();
#endif

    ferr = msg_mon_process_shutdown();
    TEST_CHK_FEOK(ferr);
    util_test_finish(true);
    return 0;
}