diff options
| author | Michael Paquier <michael@paquier.xyz> | 2025-11-12 10:32:50 +0900 |
|---|---|---|
| committer | Michael Paquier <michael@paquier.xyz> | 2025-11-12 10:32:50 +0900 |
| commit | fb9bff04542138d7217e79fc5e1bb9d5fabd9026 (patch) | |
| tree | 6c689385fcc08296f558f2939a22532e752bb124 /src/test/modules/injection_points/sql | |
| parent | 6e1535308c843dc7413a02c83a41f70449c58fb3 (diff) | |
injection_points: Add tests for name limits
The maximum limits for point name, library name, function name and
private area size were not kept track of in the tests. The new function
introduced in 16a2f706951e gives a way to trigger them. This is not
critical but cheap to cover.
While on it, this commit cleans up some of the tests introduced by
16a2f706951e for NULL inputs by using more consistent argument values.
The coverage does not change, but it makes the whole less confusing with
argument values that are correct based their position in the SQL
function called.
Reviewed-by: Daniel Gustafsson <daniel@yesql.se>
Reviewed-by: Xuneng Zhou <xunengzhou@gmail.com>
Discussion: https://postgr.es/m/aRE7zhu6wOA29gFf@paquier.xyz
Diffstat (limited to 'src/test/modules/injection_points/sql')
| -rw-r--r-- | src/test/modules/injection_points/sql/injection_points.sql | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/src/test/modules/injection_points/sql/injection_points.sql b/src/test/modules/injection_points/sql/injection_points.sql index 87f7184b291..ba14df706ef 100644 --- a/src/test/modules/injection_points/sql/injection_points.sql +++ b/src/test/modules/injection_points/sql/injection_points.sql @@ -89,11 +89,20 @@ SELECT injection_points_attach('TestConditionLocal1', 'error'); SELECT injection_points_detach('TestConditionLocal1'); -- Function variant for attach. +SELECT injection_points_attach(repeat('a', 64), 'injection_points', + 'injection_notice', NULL); +SELECT injection_points_attach('TestInjectionNoticeFunc', repeat('a', 128), + 'injection_notice', NULL); +SELECT injection_points_attach('TestInjectionNoticeFunc', 'injection_points', + repeat('a', 128), NULL); +SELECT injection_points_attach('TestInjectionNoticeFunc', 'injection_points', + 'injection_notice', repeat('a', 1025)::bytea); SELECT injection_points_attach(NULL, NULL, NULL, NULL); -SELECT injection_points_attach('injection_points', NULL, NULL, NULL); -SELECT injection_points_attach('injection_points', 'injection_notice', NULL, NULL); -SELECT injection_points_attach('TestInjectionNoticeFunc', - 'injection_points', 'injection_notice', NULL); +SELECT injection_points_attach('TestInjectionNoticeFunc', NULL, NULL, NULL); +SELECT injection_points_attach('TestInjectionNoticeFunc', 'injection_points', + NULL, NULL); +SELECT injection_points_attach('TestInjectionNoticeFunc', 'injection_points', + 'injection_notice', NULL); SELECT point_name, library, function FROM injection_points_list() ORDER BY point_name COLLATE "C"; SELECT injection_points_run('TestInjectionNoticeFunc', NULL); -- notice |
