Esempio n. 1
0
int
main(int argc, char *argv[])
{
    progname = get_progname(argv[0]);

    handle_args(argc, argv);

    prepare_buf();

    test_open();

    /* Test using 1 XLOG_BLCKSZ write */
    test_sync(1);

    /* Test using 2 XLOG_BLCKSZ writes */
    test_sync(2);

    test_open_syncs();

    test_file_descriptor_sync();

    test_non_sync();

    unlink(filename);

    return 0;
}
Esempio n. 2
0
int
main(int argc, char *argv[])
{
	set_pglocale_pgservice(argv[0], PG_TEXTDOMAIN("pg_test_fsync"));
	progname = get_progname(argv[0]);

	handle_args(argc, argv);

	/* Prevent leaving behind the test file */
	pqsignal(SIGINT, signal_cleanup);
	pqsignal(SIGTERM, signal_cleanup);
#ifndef WIN32
	pqsignal(SIGALRM, process_alarm);
#endif
#ifdef SIGHUP
	/* Not defined on win32 */
	pqsignal(SIGHUP, signal_cleanup);
#endif

	prepare_buf();

	test_open();

	/* Test using 1 XLOG_BLCKSZ write */
	test_sync(1);

	/* Test using 2 XLOG_BLCKSZ writes */
	test_sync(2);

	test_open_syncs();

	test_file_descriptor_sync();

	test_non_sync();

	unlink(filename);

	return 0;
}