diff options
author | Michael Paquier <michael@paquier.xyz> | 2025-05-10 12:36:57 +0900 |
---|---|---|
committer | Michael Paquier <michael@paquier.xyz> | 2025-05-10 12:36:57 +0900 |
commit | c259ba881c1098e75b53d5b232600b49e3301058 (patch) | |
tree | 3b2d0439da89b797f7af649f8b26fc070b39efbf /src/backend/storage/aio/method_worker.c | |
parent | 36e5fda6326045f4523568d4c9d682ee5d2f0867 (diff) | |
download | postgresql-c259ba881c1098e75b53d5b232600b49e3301058.tar.gz postgresql-c259ba881c1098e75b53d5b232600b49e3301058.zip |
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/backend/storage/aio/method_worker.c')
-rw-r--r-- | src/backend/storage/aio/method_worker.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/backend/storage/aio/method_worker.c b/src/backend/storage/aio/method_worker.c index 6e8b1327946..743cccc2acd 100644 --- a/src/backend/storage/aio/method_worker.c +++ b/src/backend/storage/aio/method_worker.c @@ -42,6 +42,7 @@ #include "storage/latch.h" #include "storage/proc.h" #include "tcop/tcopprot.h" +#include "utils/injection_point.h" #include "utils/memdebug.h" #include "utils/ps_status.h" #include "utils/wait_event.h" @@ -525,7 +526,7 @@ IoWorkerMain(const void *startup_data, size_t startup_data_len) * To be able to exercise the reopen-fails path, allow injection * points to trigger a failure at this point. */ - pgaio_io_call_inj(ioh, "aio-worker-after-reopen"); + INJECTION_POINT("aio-worker-after-reopen", ioh); error_errno = 0; error_ioh = NULL; |