mirror of
https://github.com/postgres/postgres.git
synced 2025-10-25 13:17:41 +03:00
aio: Use runtime arguments with injections points in tests
This cleans up the code related to the testing infrastructure of AIO
that used injection points, switching the test code to use the new
facility for injection points added by 371f2db8b0 rather than tweaks
to pass and reset arguments to the callbacks run.
This removes all the dependencies to USE_INJECTION_POINTS in the AIO
code. pgaio_io_call_inj(), pgaio_inj_io_get() and pgaio_inj_cur_handle
are now gone.
Reviewed-by: Greg Burd <greg@burd.me>
Discussion: https://postgr.es/m/Z_y9TtnXubvYAApS@paquier.xyz
This commit is contained in:
@@ -394,26 +394,6 @@ extern const char *pgaio_io_get_target_name(PgAioHandle *ioh);
|
||||
pgaio_io_get_state_name(ioh), \
|
||||
__VA_ARGS__)
|
||||
|
||||
|
||||
#ifdef USE_INJECTION_POINTS
|
||||
|
||||
extern void pgaio_io_call_inj(PgAioHandle *ioh, const char *injection_point);
|
||||
|
||||
/* just for use in tests, from within injection points */
|
||||
extern PgAioHandle *pgaio_inj_io_get(void);
|
||||
|
||||
#else
|
||||
|
||||
#define pgaio_io_call_inj(ioh, injection_point) (void) 0
|
||||
|
||||
/*
|
||||
* no fallback for pgaio_inj_io_get, all code using injection points better be
|
||||
* guarded by USE_INJECTION_POINTS.
|
||||
*/
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
/* Declarations for the tables of function pointers exposed by each IO method. */
|
||||
extern PGDLLIMPORT const IoMethodOps pgaio_sync_ops;
|
||||
extern PGDLLIMPORT const IoMethodOps pgaio_worker_ops;
|
||||
|
||||
Reference in New Issue
Block a user