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-10T01:04:17Z
Lists: pgsql-hackers
Attachments
- v4-0001-Add-chunk-area-for-injection-points.patch (text/x-diff) patch v4-0001
On Thu, May 09, 2024 at 04:39:00PM -0700, Noah Misch wrote: Thanks for the feedback. > The return-bool approach sounds fine. Up to you whether to do in this patch, > else I'll do it when I add the test. I see no reason to not change the signature of the routine now if we know that we're going to do it anyway in the future. I was shortly wondering if doing the same for InjectionpointAttach() would make sense, but it has more error states, so I'm not really tempted without an actual reason (cannot think of a case where I'd want to put more control into a module after a failed attach). >> It could >> always be possible that a concurrent backend does a detach followed by >> an attach with the same name, causing the shmem exit callback to drop >> a point it should not, but that's not really a plausible case IMO :) > > Agreed. It's reasonable to expect test cases to serialize backend exits, > attach calls, and detach calls. If we need to fix that later, we can use > attachment serial numbers. Okay by me. > I'd name this INJ_CONDITION_UNCONDITIONAL or INJ_CONDITION_ALWAYS. INVALID > sounds like a can't-happen event or an injection point that never runs. > Otherwise, the patch looks good and makes src/test/modules/gin safe for > installcheck. Thanks. INJ_CONDITION_ALWAYS sounds like a good compromise here. Attached is an updated patch for now, indented with a happy CI. I am still planning to look at that a second time on Monday with a fresher mind, in case I'm missing something now. -- 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