]> Cypherpunks repositories - gostls13.git/commitdiff
crypto/rand: skip TestAllocations on plan9
authorRichard Miller <millerresearch@gmail.com>
Thu, 31 Oct 2024 16:06:48 +0000 (16:06 +0000)
committerGopher Robot <gobot@golang.org>
Thu, 31 Oct 2024 21:41:16 +0000 (21:41 +0000)
The function crypto/rand.read allocates on Plan 9, so this test
would always fail.

Fixes #69873

Change-Id: I8d661cb868c32f6985d0926f9ae7b30204cafbf4
Reviewed-on: https://go-review.googlesource.com/c/go/+/624015
Reviewed-by: Filippo Valsorda <filippo@golang.org>
Reviewed-by: Michael Pratt <mpratt@google.com>
Reviewed-by: Mauri de Souza Meneguzzo <mauri870@gmail.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Carlos Amedee <carlos@golang.org>
Auto-Submit: Filippo Valsorda <filippo@golang.org>

src/crypto/rand/rand_test.go

index 2d84fdc90015a42b5dad1f251f0e914613c71ada..5cf0ad8ec1fd5df47c23601b050443fb6ec4271a 100644 (file)
@@ -160,6 +160,9 @@ func TestAllocations(t *testing.T) {
        if race.Enabled || msan.Enabled || asan.Enabled {
                t.Skip("urandomRead allocates under -race, -asan, and -msan")
        }
+       if runtime.GOOS == "plan9" {
+               t.Skip("plan9 allocates")
+       }
        testenv.SkipIfOptimizationOff(t)
 
        n := int(testing.AllocsPerRun(10, func() {