Re: Weird test mixup
Michael Paquier <michael@paquier.xyz>
From: Michael Paquier <michael@paquier.xyz>
To: Noah Misch <noah@leadboat.com>
Cc: Heikki Linnakangas <hlinnaka@iki.fi>, Tom Lane <tgl@sss.pgh.pa.us>, pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2024-05-09T04:47:45Z
Lists: pgsql-hackers
On Wed, May 08, 2024 at 08:15:53PM -0700, Noah Misch wrote: > Yes, that would be a loss for test readability. Also, I wouldn't be surprised > if some test will want to attach POINT-B while POINT-A is in injection_wait(). Not impossible, still annoying with more complex scenarios. > Various options avoiding those limitations: > > 1. The data area formerly called a "status" area is immutable after attach. > The core code copies it into a stack buffer to pass in a const callback > argument. > > 3. Move the PID check into core code. The PID checks are specific to the module, and there could be much more conditions like running only in specific backend types (first example coming into mind), so I want to avoid that kind of knowledge in the backend. > (1) is, I think, simple and sufficient. How about that? That sounds fine to do that at the end.. I'm not sure how large this chunk area added to each InjectionPointEntry should be, though. 128B stored in each InjectionPointEntry would be more than enough I guess? Or more like 1024? The in-core module does not need much currently, but larger is likely better for pluggability. -- Michael
Commits
-
injection_points: Store runtime conditions in private area
- 267d41dc4f41 17.0 landed
-
Introduce private data area for injection points
- 33181b48fd0e 17.0 landed
-
injection_points: Fix incorrect spinlock acquisition
- 597f66942d0b 17.0 landed
-
Make GIN tests using injection points concurrent-safe
- 5105c9079681 17.0 landed
-
injection_points: Fix race condition with local injection point tests
- f4083c497510 17.0 landed
-
injection_points: Introduce runtime conditions
- f587338dec87 17.0 landed
-
Make GIN test using injection points repeatable
- 997db123c054 17.0 landed
-
Fix backstop in gin test if injection point is not reached
- d802ff06d021 17.0 landed
-
Try to unbreak injection-fault tests in the buildfarm
- 85f65d7a26fc 17.0 landed
-
Disable tests using injection points in installcheck
- e2e3b8ae9ed7 17.0 landed