Source File
allocations.go
Belonging Package
crypto/internal/cryptotest
// Copyright 2024 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package cryptotest
import (
)
// SkipTestAllocations skips the test if there are any factors that interfere
// with allocation optimizations.
func ( *testing.T) {
// Go+BoringCrypto uses cgo.
if boring.Enabled {
.Skip("skipping allocations test with BoringCrypto")
}
// The sanitizers sometimes cause allocations.
if race.Enabled || msan.Enabled || asan.Enabled {
.Skip("skipping allocations test with sanitizers")
}
// The plan9 crypto/rand allocates.
if runtime.GOOS == "plan9" {
.Skip("skipping allocations test on plan9")
}
// Some APIs rely on inliner and devirtualization to allocate on the stack.
testenv.SkipIfOptimizationOff()
}
The pages are generated with Golds v0.7.3. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |