Run the tests with cgo off and without the race detector (closes #538)
check / check (push) Waiting to run
check / check (push) Waiting to run
sneak ruled the race detector out (#538 (comment)), and on Linux it was the only reason the tests needed cgo. The test phase and the browser test binary now build with CGO_ENABLED=0 and without -race, so no test binary compiles mattn's C SQLite. The test phase keeps the builder stage's Debian Go image. Its comments, the README and the code comments that said the suite runs under -race now say what is true, and the README notes the exception to the vendored REPO_POLICIES.md. Model: opus-5-5
This commit is contained in:
@@ -303,7 +303,7 @@ func (r *racingWrites) wait() (bool, error) {
|
||||
// contending for the writer's mutex when the eviction takes it.
|
||||
// The write that wins the mutex after the eviction must abandon
|
||||
// its work rather than reopen the archive, leaving the writer
|
||||
// permanently handle-free. Run under -race.
|
||||
// permanently handle-free.
|
||||
func TestEvictWebhook_RacingWriteDoesNotReopenHandle(
|
||||
t *testing.T,
|
||||
) {
|
||||
|
||||
@@ -959,9 +959,11 @@ func TestArchiveSweep_SkipsDeletedWebhookTargets(t *testing.T) {
|
||||
)
|
||||
}
|
||||
|
||||
// TestArchiveSweep_ConcurrentWrites proves the sweep serialises
|
||||
// against writes through the target's writer mutex. Run under
|
||||
// -race, an unsynchronised sweep would be caught here.
|
||||
// TestArchiveSweep_ConcurrentWrites runs the sweep while writes to
|
||||
// the same target are under way. The sweep serialises against them
|
||||
// through the target's writer mutex; the suite runs without Go's race
|
||||
// detector, so a sweep that did not would fail this test only by
|
||||
// panicking, hanging or leaving no archive file.
|
||||
func TestArchiveSweep_ConcurrentWrites(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user