forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit54100f5
committed
Add an enforcement mechanism for global object names in regression tests.
In commit18555b1 we tentatively established a rule that regressiontests should use names containing "regression" for databases, and namesstarting with "regress_" for all other globally-visible object names, soas to circumscribe the side-effects that "make installcheck" could haveon an existing installation.This commit adds a simple enforcement mechanism for that rule: if the codeis compiled with ENFORCE_REGRESSION_TEST_NAME_RESTRICTIONS defined, itwill emit a warning (not an error) whenever a database, role, tablespace,subscription, or replication origin name is created that doesn't obey therule. Running one or more buildfarm members with that symbol definedshould be enough to catch new violations, at least in the regularregression tests. Most TAP tests wouldn't notice such warnings, butthat's actually fine because TAP tests don't execute against an existingserver anyway.Since it's already the case that running src/test/modules/ tests ininstallcheck mode is deprecated, we can use that as a home for teststhat seem unsafe to run against an existing server, such as tests thatmight have side-effects on existing roles. Document that (though thiscommit doesn't in itself make it any less safe than before).Update regress.sgml to define these restrictions more clearly, andto clean up assorted lack-of-up-to-date-ness in its descriptions ofthe available regression tests.Discussion:https://postgr.es/m/16638.1468620817@sss.pgh.pa.us1 parentca129e5 commit54100f5
File tree
8 files changed
+172
-19
lines changed- doc/src/sgml
- src
- backend
- commands
- replication/logical
- test/modules
8 files changed
+172
-19
lines changedLines changed: 86 additions & 19 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
47 | 47 |
| |
48 | 48 |
| |
49 | 49 |
| |
50 |
| - | |
| 50 | + | |
51 | 51 |
| |
52 | 52 |
| |
53 | 53 |
| |
| |||
98 | 98 |
| |
99 | 99 |
| |
100 | 100 |
| |
101 |
| - | |
| 101 | + | |
102 | 102 |
| |
103 | 103 |
| |
104 | 104 |
| |
| |||
116 | 116 |
| |
117 | 117 |
| |
118 | 118 |
| |
119 |
| - | |
120 |
| - | |
121 |
| - | |
122 |
| - | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
123 | 123 |
| |
124 | 124 |
| |
125 | 125 |
| |
| |||
130 | 130 |
| |
131 | 131 |
| |
132 | 132 |
| |
133 |
| - | |
| 133 | + | |
134 | 134 |
| |
135 | 135 |
| |
136 | 136 |
| |
| |||
146 | 146 |
| |
147 | 147 |
| |
148 | 148 |
| |
149 |
| - | |
150 |
| - | |
151 |
| - | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
152 | 167 |
| |
153 | 168 |
| |
154 | 169 |
| |
| |||
166 | 181 |
| |
167 | 182 |
| |
168 | 183 |
| |
169 |
| - | |
170 |
| - | |
| 184 | + | |
171 | 185 |
| |
172 | 186 |
| |
173 | 187 |
| |
| |||
184 | 198 |
| |
185 | 199 |
| |
186 | 200 |
| |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
187 | 208 |
| |
188 | 209 |
| |
189 | 210 |
| |
| |||
192 | 213 |
| |
193 | 214 |
| |
194 | 215 |
| |
195 |
| - | |
196 |
| - | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
197 | 229 |
| |
198 | 230 |
| |
199 | 231 |
| |
200 | 232 |
| |
201 | 233 |
| |
202 |
| - | |
203 |
| - | |
204 |
| - | |
205 |
| - | |
206 |
| - | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
207 | 241 |
| |
208 | 242 |
| |
209 | 243 |
| |
| 244 | + | |
| 245 | + | |
210 | 246 |
| |
211 | 247 |
| |
212 | 248 |
| |
| |||
259 | 295 |
| |
260 | 296 |
| |
261 | 297 |
| |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
262 | 309 |
| |
263 | 310 |
| |
264 | 311 |
| |
| |||
737 | 784 |
| |
738 | 785 |
| |
739 | 786 |
| |
| 787 | + | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
| 791 | + | |
| 792 | + | |
| 793 | + | |
| 794 | + | |
| 795 | + | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
| 801 | + | |
| 802 | + | |
| 803 | + | |
| 804 | + | |
| 805 | + | |
| 806 | + | |
740 | 807 |
| |
741 | 808 |
| |
742 | 809 |
| |
|
Lines changed: 6 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
274 | 274 |
| |
275 | 275 |
| |
276 | 276 |
| |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
277 | 283 |
| |
278 | 284 |
| |
279 | 285 |
| |
|
Lines changed: 19 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
470 | 470 |
| |
471 | 471 |
| |
472 | 472 |
| |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
473 | 483 |
| |
474 | 484 |
| |
475 | 485 |
| |
| |||
1008 | 1018 |
| |
1009 | 1019 |
| |
1010 | 1020 |
| |
| 1021 | + | |
| 1022 | + | |
| 1023 | + | |
| 1024 | + | |
| 1025 | + | |
| 1026 | + | |
| 1027 | + | |
| 1028 | + | |
| 1029 | + | |
1011 | 1030 |
| |
1012 | 1031 |
| |
1013 | 1032 |
| |
|
Lines changed: 9 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
357 | 357 |
| |
358 | 358 |
| |
359 | 359 |
| |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
360 | 369 |
| |
361 | 370 |
| |
362 | 371 |
| |
|
Lines changed: 18 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
307 | 307 |
| |
308 | 308 |
| |
309 | 309 |
| |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
310 | 319 |
| |
311 | 320 |
| |
312 | 321 |
| |
| |||
957 | 966 |
| |
958 | 967 |
| |
959 | 968 |
| |
| 969 | + | |
| 970 | + | |
| 971 | + | |
| 972 | + | |
| 973 | + | |
| 974 | + | |
| 975 | + | |
| 976 | + | |
| 977 | + | |
960 | 978 |
| |
961 | 979 |
| |
962 | 980 |
| |
|
Lines changed: 18 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
326 | 326 |
| |
327 | 327 |
| |
328 | 328 |
| |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
329 | 338 |
| |
330 | 339 |
| |
331 | 340 |
| |
| |||
1212 | 1221 |
| |
1213 | 1222 |
| |
1214 | 1223 |
| |
| 1224 | + | |
| 1225 | + | |
| 1226 | + | |
| 1227 | + | |
| 1228 | + | |
| 1229 | + | |
| 1230 | + | |
| 1231 | + | |
| 1232 | + | |
1215 | 1233 |
| |
1216 | 1234 |
| |
1217 | 1235 |
| |
|
Lines changed: 9 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1238 | 1238 |
| |
1239 | 1239 |
| |
1240 | 1240 |
| |
| 1241 | + | |
| 1242 | + | |
| 1243 | + | |
| 1244 | + | |
| 1245 | + | |
| 1246 | + | |
| 1247 | + | |
| 1248 | + | |
| 1249 | + | |
1241 | 1250 |
| |
1242 | 1251 |
| |
1243 | 1252 |
| |
|
Lines changed: 7 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
6 | 6 |
| |
7 | 7 |
| |
8 | 8 |
| |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
9 | 16 |
| |
10 | 17 |
| |
11 | 18 |
| |
|
0 commit comments
Comments
(0)