<commit_before># Test that when both race detection and coverage instrumentation are enabled,
# and seed values are being executed, the race detector isn't mistakenly
# triggered.

[short] skip
[!fuzz] skip

# Test with coverage instrumentation enbaled (-fuzz) and race instrumentation
# but without actually fuzzing the target (by using a non-matching pattern)
go test -fuzz=xxx -race -v
! stderr 'race detected during execution of test'

# Test with just race instrumentation enabled
go test -race -v
! stderr 'race detected during execution of test'

# Test with coverage and race instrumentation enabled, and a matching fuzz
# pattern
go test -fuzz=FuzzRace -race -v -fuzztime=200x
! stderr 'race detected during execution of test'

-- go.mod --
module test

-- race_test.go --
package race

import "testing"

func FuzzRace(f *testing.F) {
	for i := 0; i < 100; i++ {
		f.Add(i)
	}

	f.Fuzz(func(t *testing.T, i int) {
		t.Parallel()
	})<commit_msg>cmd/go: skip TestScript/test_fuzz_test_race on !race<commit_after># Test that when both race detection and coverage instrumentation are enabled,
# and seed values are being executed, the race detector isn't mistakenly
# triggered.

[short] skip
[!fuzz] skip
[!race] skip

# Test with coverage instrumentation enabled (-fuzz) and race instrumentation
# but without actually fuzzing the target (by using a non-matching pattern)
go test -fuzz=xxx -race -v
! stderr 'race detected during execution of test'

# Test with just race instrumentation enabled
go test -race -v
! stderr 'race detected during execution of test'

# Test with coverage and race instrumentation enabled, and a matching fuzz
# pattern
go test -fuzz=FuzzRace -race -v -fuzztime=200x
! stderr 'race detected during execution of test'

-- go.mod --
module test

-- race_test.go --
package race

import "testing"

func FuzzRace(f *testing.F) {
	for i := 0; i < 100; i++ {
		f.Add(i)
	}

	f.Fuzz(func(t *testing.T, i int) {
		t.Parallel()
	})
{'fraction_non_alphanumeric': 0.09550561797752809, 'fraction_numerical': 0.007150153217568948, 'mean_word_length': 4.062015503875969, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2135426', 'n_tokens_mistral': 652, 'n_tokens_neox': 604, 'n_words': 256}