diff options
| author | Michael Paquier | 2025-05-10 03:36:57 +0000 |
|---|---|---|
| committer | Michael Paquier | 2025-05-10 03:36:57 +0000 |
| commit | c259ba881c1098e75b53d5b232600b49e3301058 (patch) | |
| tree | 3b2d0439da89b797f7af649f8b26fc070b39efbf /src/test | |
| parent | 36e5fda6326045f4523568d4c9d682ee5d2f0867 (diff) | |
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 371f2db8b05e 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
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/modules/test_aio/test_aio.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/test/modules/test_aio/test_aio.c b/src/test/modules/test_aio/test_aio.c index 681d5d73d47..5cdfb89210b 100644 --- a/src/test/modules/test_aio/test_aio.c +++ b/src/test/modules/test_aio/test_aio.c @@ -684,7 +684,7 @@ extern PGDLLEXPORT void inj_io_reopen(const char *name, void inj_io_short_read(const char *name, const void *private_data, void *arg) { - PgAioHandle *ioh; + PgAioHandle *ioh = (PgAioHandle *) arg; ereport(LOG, errmsg("short read injection point called, is enabled: %d", @@ -693,8 +693,6 @@ inj_io_short_read(const char *name, const void *private_data, void *arg) if (inj_io_error_state->enabled_short_read) { - ioh = pgaio_inj_io_get(); - /* * Only shorten reads that are actually longer than the target size, * otherwise we can trigger over-reads. |
