diff --git a/tests/fuzzers/bitutil/bitutil_test.go b/tests/fuzzers/bitutil/bitutil_test.go new file mode 100644 index 000000000..108bbc50c --- /dev/null +++ b/tests/fuzzers/bitutil/bitutil_test.go @@ -0,0 +1,9 @@ +package bitutil + +import "testing" + +func FuzzBitutil(f *testing.F) { + f.Fuzz(func(t *testing.T, data []byte) { + Fuzz(data) + }) +} diff --git a/tests/fuzzers/bn256/bn256_fuzz.go b/tests/fuzzers/bn256/bn256_fuzz.go index 79afa2a45..a84de8779 100644 --- a/tests/fuzzers/bn256/bn256_fuzz.go +++ b/tests/fuzzers/bn256/bn256_fuzz.go @@ -2,9 +2,6 @@ // Use of this source code is governed by a BSD-style license that can be found // in the LICENSE file. -//go:build gofuzz -// +build gofuzz - package bn256 import ( diff --git a/tests/fuzzers/bn256/bn256_test.go b/tests/fuzzers/bn256/bn256_test.go new file mode 100644 index 000000000..6f2ac6be5 --- /dev/null +++ b/tests/fuzzers/bn256/bn256_test.go @@ -0,0 +1,21 @@ +package bn256 + +import "testing" + +func FuzzBn256Add(f *testing.F) { + f.Fuzz(func(t *testing.T, data []byte) { + FuzzAdd(data) + }) +} + +func FuzzBn256Mul(f *testing.F) { + f.Fuzz(func(t *testing.T, data []byte) { + FuzzMul(data) + }) +} + +func FuzzBn256Pair(f *testing.F) { + f.Fuzz(func(t *testing.T, data []byte) { + FuzzPair(data) + }) +} diff --git a/tests/fuzzers/difficulty/difficulty_test.go b/tests/fuzzers/difficulty/difficulty_test.go new file mode 100644 index 000000000..438e006e8 --- /dev/null +++ b/tests/fuzzers/difficulty/difficulty_test.go @@ -0,0 +1,9 @@ +package difficulty + +import "testing" + +func FuzzDifficulty(f *testing.F) { + f.Fuzz(func(t *testing.T, data []byte) { + Fuzz(data) + }) +} diff --git a/tests/fuzzers/keystore/keystore_test.go b/tests/fuzzers/keystore/keystore_test.go new file mode 100644 index 000000000..f6907e9cd --- /dev/null +++ b/tests/fuzzers/keystore/keystore_test.go @@ -0,0 +1,9 @@ +package keystore + +import "testing" + +func FuzzKeystore(f *testing.F) { + f.Fuzz(func(t *testing.T, data []byte) { + Fuzz(data) + }) +} diff --git a/tests/fuzzers/les/les-fuzzer.go b/tests/fuzzers/les/les-fuzzer.go index e98c4f8b3..c0b38fd62 100644 --- a/tests/fuzzers/les/les-fuzzer.go +++ b/tests/fuzzers/les/les-fuzzer.go @@ -70,7 +70,7 @@ func makechain() (bc *core.BlockChain, addrHashes, txHashes []common.Hash) { ) nonce := uint64(i) if i%4 == 0 { - tx, _ = types.SignTx(types.NewContractCreation(nonce, big.NewInt(0), 200000, big.NewInt(0), testContractCode), signer, bankKey) + tx, _ = types.SignTx(types.NewContractCreation(nonce, big.NewInt(0), 200000, big.NewInt(params.GWei), testContractCode), signer, bankKey) addr = crypto.CreateAddress(bankAddr, nonce) } else { addr = common.BigToAddress(big.NewInt(int64(i))) diff --git a/tests/fuzzers/les/les_test.go b/tests/fuzzers/les/les_test.go new file mode 100644 index 000000000..55322b877 --- /dev/null +++ b/tests/fuzzers/les/les_test.go @@ -0,0 +1,9 @@ +package les + +import "testing" + +func FuzzLes(f *testing.F) { + f.Fuzz(func(t *testing.T, data []byte) { + Fuzz(data) + }) +} diff --git a/tests/fuzzers/rangeproof/rangeproof_test.go b/tests/fuzzers/rangeproof/rangeproof_test.go new file mode 100644 index 000000000..f0eb6ea34 --- /dev/null +++ b/tests/fuzzers/rangeproof/rangeproof_test.go @@ -0,0 +1,9 @@ +package rangeproof + +import "testing" + +func FuzzRangeproof(f *testing.F) { + f.Fuzz(func(t *testing.T, data []byte) { + Fuzz(data) + }) +} diff --git a/tests/fuzzers/rlp/rlp_test.go b/tests/fuzzers/rlp/rlp_test.go new file mode 100644 index 000000000..59658f27c --- /dev/null +++ b/tests/fuzzers/rlp/rlp_test.go @@ -0,0 +1,9 @@ +package rlp + +import "testing" + +func FuzzRlp(f *testing.F) { + f.Fuzz(func(t *testing.T, data []byte) { + Fuzz(data) + }) +} diff --git a/tests/fuzzers/runtime/runtime_test.go b/tests/fuzzers/runtime/runtime_test.go new file mode 100644 index 000000000..ee90a408e --- /dev/null +++ b/tests/fuzzers/runtime/runtime_test.go @@ -0,0 +1,9 @@ +package runtime + +import "testing" + +func FuzzRuntime(f *testing.F) { + f.Fuzz(func(t *testing.T, data []byte) { + Fuzz(data) + }) +} diff --git a/tests/fuzzers/stacktrie/stacktrie_test.go b/tests/fuzzers/stacktrie/stacktrie_test.go new file mode 100644 index 000000000..901b6da68 --- /dev/null +++ b/tests/fuzzers/stacktrie/stacktrie_test.go @@ -0,0 +1,9 @@ +package stacktrie + +import "testing" + +func FuzzStacktrie(f *testing.F) { + f.Fuzz(func(t *testing.T, data []byte) { + Fuzz(data) + }) +} diff --git a/tests/fuzzers/trie/trie_test.go b/tests/fuzzers/trie/trie_test.go new file mode 100644 index 000000000..fcf8b3a6d --- /dev/null +++ b/tests/fuzzers/trie/trie_test.go @@ -0,0 +1,9 @@ +package trie + +import "testing" + +func FuzzTrie(f *testing.F) { + f.Fuzz(func(t *testing.T, data []byte) { + Fuzz(data) + }) +} diff --git a/tests/fuzzers/txfetcher/txfetcher_test.go b/tests/fuzzers/txfetcher/txfetcher_test.go new file mode 100644 index 000000000..6bcfd75c5 --- /dev/null +++ b/tests/fuzzers/txfetcher/txfetcher_test.go @@ -0,0 +1,9 @@ +package txfetcher + +import "testing" + +func FuzzTxfetcher(f *testing.F) { + f.Fuzz(func(t *testing.T, data []byte) { + Fuzz(data) + }) +} diff --git a/tests/fuzzers/vflux/vflux_test.go b/tests/fuzzers/vflux/vflux_test.go new file mode 100644 index 000000000..f05969d03 --- /dev/null +++ b/tests/fuzzers/vflux/vflux_test.go @@ -0,0 +1,9 @@ +package vflux + +import "testing" + +func FuzzVfluxClientPool(f *testing.F) { + f.Fuzz(func(t *testing.T, data []byte) { + FuzzClientPool(data) + }) +}