/*------------------------------------------------------------------------- * Function: main * * Purpose: Tests the basic features of Virtual File Drivers * * Return: Success: 0 * Failure: 1 * * Programmer: Raymond Lu * Tuesday, Sept 24, 2002 * *------------------------------------------------------------------------- */ int main(void) { int nerrors = 0; h5_reset(); printf("Testing basic Virtual File Driver functionality.\n"); nerrors += test_sec2() < 0 ? 1 : 0; nerrors += test_core() < 0 ? 1 : 0; nerrors += test_family() < 0 ? 1 : 0; nerrors += test_family_compat() < 0 ? 1 : 0; nerrors += test_multi() < 0 ? 1 : 0; nerrors += test_multi_compat() < 0 ? 1 : 0; nerrors += test_direct() < 0 ? 1 : 0; nerrors += test_log() < 0 ? 1 : 0; nerrors += test_stdio() < 0 ? 1 : 0; nerrors += test_windows() < 0 ? 1 : 0; if(nerrors) { printf("***** %d Virtual File Driver TEST%s FAILED! *****\n", nerrors, nerrors > 1 ? "S" : ""); return 1; } printf("All Virtual File Driver tests passed.\n"); return 0; }
int test_multi_0() { TCHAR data[] = _T("hello\0world\0"); TCHAR *ref[] = {_T("hello"), _T("world")}; DWORD count = sizeof(data); return test_multi(101, data, sizeof(data), ref, LEN(ref)); }
int uORBTest::UnitTest::test() { int ret = test_single(); if (ret != OK) { return ret; } ret = test_multi(); if (ret != OK) { return ret; } ret = test_multi_reversed(); if (ret != OK) { return ret; } ret = test_unadvertise(); if (ret != OK) { return ret; } return test_multi2(); }
int main(int argc, char **argv) { TEST_START(); TEST(test_multi()); TEST_END(); return 0; }
int main() { printf("------------- test\n"); gc_init(); test(); gc_free(); printf("------------- test2\n"); gc_init(); test2(); gc_free(); printf("------------- test3\n"); gc_init(); test3(); gc_free(); printf("------------- test4\n"); gc_init(); test_record(); gc_free(); /* printf("------------- test new vm\n"); gc_init(); test_new_vm(); gc_free(); */ printf("------------- test multi vm\n"); gc_init(); test_multi_vm(); gc_free(); /* printf("------------- test pipes1\n"); gc_init(); test_pipes1(); gc_free(); printf("------------- test pipes2\n"); gc_init(); test_pipes2(); gc_free(); */ printf("------------- test multi\n"); gc_init(); test_multi(); gc_free(); return 0; }
int main(int argc, char* argv[]) { int ch, conn_timeout = 10, rw_timeout = 10; acl::string addr("127.0.0.1:6379"); bool slice_req = false; while ((ch = getopt(argc, argv, "hs:C:I:S")) > 0) { switch (ch) { case 'h': usage(argv[0]); return 0; case 's': addr = optarg; break; case 'C': conn_timeout = atoi(optarg); break; case 'I': rw_timeout = atoi(optarg); break; case 'S': slice_req = true; break; default: break; } } acl::acl_cpp_init(); acl::redis_client client(addr.c_str(), conn_timeout, rw_timeout); client.set_slice_request(slice_req); client.set_slice_respond(false); acl::redis_transaction redis(&client); bool ret; ret = test_multi(redis) && test_run_cmds(redis) && test_exec(redis) && get_results(redis); printf("all cmds %s\r\n", ret ? "ok" : "failed"); #ifdef WIN32 printf("enter any key to exit\r\n"); getchar(); #endif return 0; }
int main() { try { test_take(); test_intermittent(); test_multi(); test_poll(); test_take_wait(); test_threshold(); test_unblock(); test_integral(); } catch (const std::exception& e) { std::cout << e.what() << std::endl; return 1; } return 0; }
int uORBTest::UnitTest::test() { int ret = test_single(); if (ret != OK) { return ret; } ret = test_multi(); if (ret != OK) { return ret; } ret = test_multi_reversed(); if (ret != OK) { return ret; } return OK; }
/*------------------------------------------------------------------------- * Function: main * * Purpose: Tests the basic features of Virtual File Drivers * * Return: Success: exit(0) * Failure: exit(1) * * Programmer: Raymond Lu * Tuesday, Sept 24, 2002 * *------------------------------------------------------------------------- */ int main(void) { int nerrors = 0; h5_reset(); nerrors += test_sec2() < 0 ? 1 : 0; nerrors += test_core() < 0 ? 1 : 0; nerrors += test_family() < 0 ? 1 : 0; nerrors += test_family_compat() < 0 ? 1 : 0; nerrors += test_multi() < 0 ? 1 : 0; nerrors += test_direct() < 0 ? 1 : 0; if(nerrors) { printf("***** %d Virtual File Driver TEST%s FAILED! *****\n", nerrors, nerrors > 1 ? "S" : ""); return 1; } printf("All Virtual File Driver tests passed.\n"); return 0; }
int test_multi_1() { TCHAR data[] = _T(""); DWORD count = sizeof(data); return test_multi(102, data, sizeof(data), NULL, 0); }
TEST(SharedPollingTest, FourThreads) { test_multi(4); }
TEST(SharedPollingTest, TwoThreads) { test_multi(2); }
TEST(SharedPollingTest, OneThread) { test_multi(1); }
int main( int argc, char **argv ){ int c; while( (c = getopt( argc, argv, "p:s:u:n:c:")) != -1 ) { switch(c) { case 'u': opt_pub_sleep_us = atoi(optarg); break; case 'p': opt_n_pub = atoi(optarg); break; case 's': opt_n_sub = atoi(optarg); break; case 'n': opt_n_msgs = atoi(optarg); break; case 'c': opt_channel_name = strdup(optarg); break; case '?': case 'h': case 'H': printf( "Usage: achtest [OPTION...]\n" "ach stress test\n" "\n" " -u MICROSECONDS Microseconds between messages (%d)\n" " -p PUBLISHER-COUNT, Number of publishers (%d)\n" " -s SUBSCRIBER-COUNT, Number of subscribers (%d)\n" " -n MESAGE-COUNT, Messages to publish (%d)\n" " -c CHANNEL-NAME, Channel (%s)\n" " -?, -H, -h This help list\n", OPT_PUB_SLEEP_US, OPT_N_PUB, OPT_N_SUB, OPT_N_MSGS, OPT_CHAN); exit(EXIT_SUCCESS); } } printf("p: %d\ts: %d\tn: %d\tu: %d\n", opt_n_pub, opt_n_sub, opt_n_msgs, opt_pub_sleep_us ); { int r; r = test_basic(); if( 0 != r ) return r; r = test_multi(); if( 0 != r ) return r; } { ach_status_t r = ach_unlink(opt_channel_name); if( ! ach_status_match(r, ACH_MASK_OK | ACH_MASK_ENOENT) ) { fprintf(stderr, "ach_unlink failed\n: %s", ach_result_to_string(r)); return -1; } } return 0; }
int main(int argc, char **argv) { test_multi(); return 0; }