Exemplo n.º 1
0
int main(int argc, char **argv)
{
	int opt, signal_source;
	int type = 0;

	while ((opt = getopt(argc, argv, "ht:")) != EOF) {
		switch (opt) {
		case 't':
			type = atoi(optarg);
			break;
		case 'h':
			usage();
			exit(1);
			break;
		default:
			break;
		}
	}

	test_server(type);

	signal_source = create_signal_io();

	mainloop = g_main_loop_new(NULL, FALSE);

	g_main_loop_run(mainloop);

	g_main_loop_unref(mainloop);

	g_source_remove(signal_source);

	return 0;
}
Exemplo n.º 2
0
int
main (void)
{
  g_type_init ();
  test_server ();

  return 0;
}
Exemplo n.º 3
0
int main( int argc , char ** argv) {
  lsf_driver_type * driver = lsf_driver_alloc();

  test_option( driver , LSF_BSUB_CMD    , "Xbsub");
  test_option( driver , LSF_BJOBS_CMD   , "Xbsub");
  test_option( driver , LSF_BKILL_CMD   , "Xbsub");
  test_option( driver , LSF_RSH_CMD     , "RSH");
  test_option( driver , LSF_LOGIN_SHELL , "shell");
  test_option( driver , LSF_BSUB_CMD    , "bsub");
  printf("Options OK\n");

  test_server( driver , NULL , LSF_SUBMIT_INTERNAL );
  test_server( driver , "LoCaL" , LSF_SUBMIT_LOCAL_SHELL );
  test_server( driver , "LOCAL" , LSF_SUBMIT_LOCAL_SHELL );
  test_server( driver , "XLOCAL" , LSF_SUBMIT_REMOTE_SHELL );
  test_server( driver , NULL , LSF_SUBMIT_INTERNAL );
  test_server( driver , "be-grid01" , LSF_SUBMIT_REMOTE_SHELL );
  printf("Servers OK\n");

  test_status( JOB_STAT_PEND   , JOB_QUEUE_PENDING );
  test_status( JOB_STAT_PSUSP  , JOB_QUEUE_RUNNING );
  test_status( JOB_STAT_USUSP  , JOB_QUEUE_RUNNING );
  test_status( JOB_STAT_SSUSP  , JOB_QUEUE_RUNNING );
  test_status( JOB_STAT_RUN    , JOB_QUEUE_RUNNING );
  test_status( JOB_STAT_NULL   , JOB_QUEUE_NOT_ACTIVE );
  test_status( JOB_STAT_DONE   , JOB_QUEUE_DONE );
  test_status( JOB_STAT_EXIT   , JOB_QUEUE_EXIT );
  test_status( JOB_STAT_UNKWN  , JOB_QUEUE_EXIT );
  test_status( 192             , JOB_QUEUE_DONE ); 
  
  printf("Status OK \n");
  exit(0);
}
Exemplo n.º 4
0
/*! @brief Main timer server entry point. */
int
main(void)
{
    SET_MUSLC_SYSCALL_TABLE;
    //dprintf("Initialising RefOS timer server.\n");
    refosio_setup_morecore_override(timeServMMapRegion, TIMESERV_MMAP_REGION_SIZE);
    refos_initialise();
    timeserv_init();

    test_server();

    //timer_server_mainloop();

    return 0;
}
Exemplo n.º 5
0
int
main(int argc, const char **argv)
{

	if (argc < 2)
		usage();
	if (!strcmp(argv[1], "client"))
		test_client(argc - 1, argv + 1);
	else if (!strcmp(argv[1], "server"))
		test_server(argc - 1, argv + 1);
	else if (!strcmp(argv[1], "principal"))
		test_get_principal_name(argc - 1, argv + 1);
	else
		usage();

	return (0);
}
Exemplo n.º 6
0
int call_server(mach_msg_header_t *request_ptr, mach_msg_header_t *reply_ptr) {
  return test_server(request_ptr, reply_ptr);
}
Exemplo n.º 7
0
int main() {
test_server();
return 0;
}
Exemplo n.º 8
0
int main(int argc , char** argv)
{ 
    test_server();
	return 0;
}