diff options
author | Ian Lance Taylor <iant@golang.org> | 2023-06-16 10:45:15 -0700 |
---|---|---|
committer | Ian Lance Taylor <iant@golang.org> | 2023-06-16 12:29:04 -0700 |
commit | bc6bd0d608da1609c1caeb04ab795a83720add55 (patch) | |
tree | ad7354c98316a062b936473b027b4e43282d718a /libgo/go | |
parent | 2b4e0415ad664cdb3ce87d1f7eee5ca26911a05b (diff) | |
download | gcc-bc6bd0d608da1609c1caeb04ab795a83720add55.zip gcc-bc6bd0d608da1609c1caeb04ab795a83720add55.tar.gz gcc-bc6bd0d608da1609c1caeb04ab795a83720add55.tar.bz2 |
libgo/testsuite: add benchmarks and examples to list
In CL 384695 I simplified the code that built lists of benchmarks,
examples, and fuzz tests, and managed to break it. This CL corrects
the code to once again make the benchmarks available, and to run
the examples with output and the fuzz targets.
Doing this revealed a test failure in internal/fuzz on 32-bit x86:
a signalling NaN is turned into a quiet NaN on the 387 floating-point
stack that GCC uses by default. This CL skips the test.
Fixes golang/go#60826
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/503798
Diffstat (limited to 'libgo/go')
-rw-r--r-- | libgo/go/internal/fuzz/encoding_test.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libgo/go/internal/fuzz/encoding_test.go b/libgo/go/internal/fuzz/encoding_test.go index 8e3800e..53fc5b8 100644 --- a/libgo/go/internal/fuzz/encoding_test.go +++ b/libgo/go/internal/fuzz/encoding_test.go @@ -6,6 +6,7 @@ package fuzz import ( "math" + "runtime" "strconv" "testing" "unicode" @@ -330,6 +331,14 @@ func FuzzFloat64RoundTrip(f *testing.F) { f.Add(math.Float64bits(math.Inf(-1))) f.Fuzz(func(t *testing.T, u1 uint64) { + // The signaling NaN test fails on 32-bit x86 with gccgo, + // which uses the 387 floating-point stack by default. + // Converting a signaling NaN in and out of the stack + // changes the NaN to a quiet NaN. + if runtime.GOARCH == "386" && u1 == 0x7FF0000000000001 { + t.Skip("skipping signalling NaN test on 386 with gccgo") + } + x1 := math.Float64frombits(u1) b := marshalCorpusFile(x1) |