示例#1
0
文件: hello_world.c 项目: azet/kitten
int
main(int argc, char *argv[], char *envp[])
{
	int i;

	printf("Hello, world!\n");

	printf("Arguments:\n");
	for (i = 0; i < argc; i++)
		printf("  argv[%d] = %s\n", i, argv[i]);

	printf("Environment Variables:\n");
	for (i = 0; envp[i] != NULL; i++)
		printf("  envp[%d] = %s\n", i, envp[i]);

	pmem_api_test();
	aspace_api_test();
	fd_test();
	task_api_test();
	task_migrate_test();
#ifdef TEST_BLOCK_LAYER
	block_layer_test();
#endif
	hypervisor_api_test();
        socket_api_test();

	printf("\n");
	printf("ALL TESTS COMPLETE\n");

	printf("\n");
	printf("Spinning forever...\n");
	for (i = 0; i < 10; i++) {
#ifdef TEST_TASK_MEAS
		{
			volatile unsigned long long j;
			for( j=0; j < (long long)1<<24; j++ );
			task_meas_api_test();
		}
#else
		sleep(5);
#endif
		printf("%s: Meow %d!\n", __func__, i );
	}
	printf("   That's all, folks!\n");

	while(1)
		sleep(100000);
}
示例#2
0
int
main(int argc, char *argv[], char *envp[])
{
	int i;

	printf("Hello, world!\n");

	printf("Arguments:\n");
	for (i = 0; i < argc; i++)
		printf("  argv[%d] = %s\n", i, argv[i]);

	printf("Environment Variables:\n");
	for (i = 0; envp[i] != NULL; i++)
		printf("  envp[%d] = %s\n", i, envp[i]);

	pmem_api_test();
	aspace_api_test();
	fd_test();
	task_api_test();
	task_migrate_test();
	hypervisor_api_test();

	printf("\n");
	printf("ALL TESTS COMPLETE\n");

	printf("\n");
	printf("Spinning forever...\n");
	for (i = 0; i < 10; i++) {
		sleep(5);
		printf("%s: Meow %d!\n", __func__, i );
	}
	printf("   That's all, folks!\n");

	while(1)
		sleep(100000);
}