MCPcopy Create free account
hub / github.com/apache/cloudberry / main

Function main

src/bin/pg_test_fsync/pg_test_fsync.c:100–139  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

98
99
100int
101main(int argc, char *argv[])
102{
103 pg_logging_init(argv[0]);
104 set_pglocale_pgservice(argv[0], PG_TEXTDOMAIN("pg_test_fsync"));
105 progname = get_progname(argv[0]);
106
107 handle_args(argc, argv);
108
109 /* Prevent leaving behind the test file */
110 pqsignal(SIGINT, signal_cleanup);
111 pqsignal(SIGTERM, signal_cleanup);
112#ifndef WIN32
113 pqsignal(SIGALRM, process_alarm);
114#endif
115#ifdef SIGHUP
116 /* Not defined on win32 */
117 pqsignal(SIGHUP, signal_cleanup);
118#endif
119
120 prepare_buf();
121
122 test_open();
123
124 /* Test using 1 XLOG_BLCKSZ write */
125 test_sync(1);
126
127 /* Test using 2 XLOG_BLCKSZ writes */
128 test_sync(2);
129
130 test_open_syncs();
131
132 test_file_descriptor_sync();
133
134 test_non_sync();
135
136 unlink(filename);
137
138 return 0;
139}
140
141static void
142handle_args(int argc, char *argv[])

Callers

nothing calls this directly

Calls 11

pg_logging_initFunction · 0.85
set_pglocale_pgserviceFunction · 0.85
get_prognameFunction · 0.85
prepare_bufFunction · 0.85
test_openFunction · 0.85
test_syncFunction · 0.85
test_open_syncsFunction · 0.85
test_non_syncFunction · 0.85
handle_argsFunction · 0.70
pqsignalFunction · 0.50

Tested by

no test coverage detected