Skip to content

Commit 114f7fa

Browse files
committed
Rename injection points used in AIO tests
The format of the injection point names used by the AIO code does not match the existing naming convention used everywhere else in the code, so let's be consistent. These points are used in test_aio. Reviewed-by: Hayato Kuroda <kuroda.hayato@fujitsu.com> Discussion: https://postgr.es/m/Z_yTB80bdu1sYDqJ@paquier.xyz
1 parent 3aad76a commit 114f7fa

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

src/backend/storage/aio/aio.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,7 @@ pgaio_io_process_completion(PgAioHandle *ioh, int result)
507507

508508
pgaio_io_update_state(ioh, PGAIO_HS_COMPLETED_IO);
509509

510-
pgaio_io_call_inj(ioh, "AIO_PROCESS_COMPLETION_BEFORE_SHARED");
510+
pgaio_io_call_inj(ioh, "aio-process-completion-before-shared");
511511

512512
pgaio_io_call_complete_shared(ioh);
513513

src/backend/storage/aio/method_worker.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -525,7 +525,7 @@ IoWorkerMain(const void *startup_data, size_t startup_data_len)
525525
* To be able to exercise the reopen-fails path, allow injection
526526
* points to trigger a failure at this point.
527527
*/
528-
pgaio_io_call_inj(ioh, "AIO_WORKER_AFTER_REOPEN");
528+
pgaio_io_call_inj(ioh, "aio-worker-after-reopen");
529529

530530
error_errno = 0;
531531
error_ioh = NULL;

src/test/modules/test_aio/test_aio.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -86,19 +86,19 @@ test_aio_shmem_startup(void)
8686
inj_io_error_state->enabled_reopen = false;
8787

8888
#ifdef USE_INJECTION_POINTS
89-
InjectionPointAttach("AIO_PROCESS_COMPLETION_BEFORE_SHARED",
89+
InjectionPointAttach("aio-process-completion-before-shared",
9090
"test_aio",
9191
"inj_io_short_read",
9292
NULL,
9393
0);
94-
InjectionPointLoad("AIO_PROCESS_COMPLETION_BEFORE_SHARED");
94+
InjectionPointLoad("aio-process-completion-before-shared");
9595

96-
InjectionPointAttach("AIO_WORKER_AFTER_REOPEN",
96+
InjectionPointAttach("aio-worker-after-reopen",
9797
"test_aio",
9898
"inj_io_reopen",
9999
NULL,
100100
0);
101-
InjectionPointLoad("AIO_WORKER_AFTER_REOPEN");
101+
InjectionPointLoad("aio-worker-after-reopen");
102102

103103
#endif
104104
}
@@ -109,8 +109,8 @@ test_aio_shmem_startup(void)
109109
* critical section.
110110
*/
111111
#ifdef USE_INJECTION_POINTS
112-
InjectionPointLoad("AIO_PROCESS_COMPLETION_BEFORE_SHARED");
113-
InjectionPointLoad("AIO_WORKER_AFTER_REOPEN");
112+
InjectionPointLoad("aio-process-completion-before-shared");
113+
InjectionPointLoad("aio-worker-after-reopen");
114114
elog(LOG, "injection point loaded");
115115
#endif
116116
}

0 commit comments

Comments
 (0)