Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

first attempt at fuzz testing #2274

Merged
merged 54 commits into from
Dec 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
1f5283d
first attempt at fuzz testing
lastmjs Nov 8, 2024
d4234d3
fix cuzzjson requirement
lastmjs Nov 8, 2024
7ba9961
we must exit the main process if any cuzz process exits
lastmjs Nov 8, 2024
0ed9f3b
updating fuzz tests
lastmjs Nov 8, 2024
cf9b976
Add more fuzz testing
lastmjs Nov 8, 2024
0bcaedf
add memory usage canister method to experimental canisters
lastmjs Nov 8, 2024
c860679
fix up a few fuzz tests, allow terminals for multiple canisters
lastmjs Nov 8, 2024
9c836b7
hopefully remove crazy memory leak from cross canister calls
lastmjs Nov 11, 2024
f6a9a6b
add result handling to cleanup code
lastmjs Nov 12, 2024
5a3c639
attempt to fix many issues with fuzz tests
lastmjs Nov 12, 2024
7e5c6b9
now using a raw pointer to get the context in call raw
lastmjs Nov 19, 2024
ba3db58
Merge branch 'main' of github.com:demergent-labs/azle into battle_tes…
lastmjs Nov 19, 2024
d9b6165
fix comments
lastmjs Nov 19, 2024
faee6a4
fixing various fuzz tests
lastmjs Nov 19, 2024
c38af90
fixing fuzz testS
lastmjs Nov 20, 2024
8d26bdc
fix various fuzz tests, add 30 minute time limit for fuzz tests
lastmjs Nov 20, 2024
db490ba
fix factorial, superheroes, principal
lastmjs Nov 25, 2024
2b5451d
fix simple_erc20 and rejections
lastmjs Nov 25, 2024
cc10c21
add fuzz workflow
lastmjs Nov 25, 2024
89546f2
Merge branch 'main' of github.com:demergent-labs/azle into battle_tes…
lastmjs Nov 25, 2024
2585818
remove extraneous needs
lastmjs Nov 25, 2024
ec30e83
hook up call delay and timeout
lastmjs Nov 25, 2024
d68b0b7
use number input type, use skip explanation
lastmjs Nov 25, 2024
680f9bc
add explanations for skip, remove fuzz.yml
lastmjs Nov 25, 2024
5b6c0ed
Merge branch 'main' of github.com:demergent-labs/azle into battle_tes…
lastmjs Nov 25, 2024
c42db24
get rid of requirement to have canisters listed for fuzz testing, get…
lastmjs Nov 25, 2024
b37623a
actually pass over the inputs
lastmjs Nov 25, 2024
7c3c748
fix inputs
lastmjs Nov 25, 2024
4af0a37
test with string inputs
lastmjs Nov 25, 2024
07022be
fix the http_counter
lastmjs Nov 26, 2024
5ba8b60
update cuzz
lastmjs Nov 26, 2024
9d79d0f
Merge branch 'main' of github.com:demergent-labs/azle into battle_tes…
lastmjs Nov 26, 2024
647bb4a
Merge branch 'main' of github.com:demergent-labs/azle into battle_tes…
lastmjs Nov 26, 2024
fe0a9f6
fix simple user accounts and timers fuzz tests
lastmjs Nov 26, 2024
7680a3d
fix stable structures, update cuzz to hopefully fix stable structures…
lastmjs Nov 27, 2024
ab113ce
attempt to fix timers
lastmjs Nov 27, 2024
bef7945
fix many fuzz tests
lastmjs Dec 10, 2024
a28c3bc
Merge branch 'main' of github.com:demergent-labs/azle into battle_tes…
lastmjs Dec 10, 2024
608cdf2
add back shell: bash command
lastmjs Dec 10, 2024
aa65d09
fix cert-var fuzz tests
lastmjs Dec 11, 2024
5eb05c9
Merge branch 'main' of github.com:demergent-labs/azle into battle_tes…
lastmjs Dec 11, 2024
2bd7bce
fix certified data and yml
lastmjs Dec 11, 2024
ab00513
typo
lastmjs Dec 11, 2024
47d64d7
add link-azle
lastmjs Dec 11, 2024
bb4cf31
fix time and remove new from fuzz tests
lastmjs Dec 11, 2024
abe80e2
fix all issues except for cycles
lastmjs Dec 12, 2024
be3e48c
fix cycles and cycles_burn
lastmjs Dec 12, 2024
6a0b791
update cuzz
lastmjs Dec 12, 2024
617caf1
Merge branch 'main' of github.com:demergent-labs/azle into battle_tes…
lastmjs Dec 12, 2024
e96a7ed
make vecs shorter
lastmjs Dec 12, 2024
2f8085f
remove _azle_memory_usage
lastmjs Dec 12, 2024
65000e4
fixed unwraps
lastmjs Dec 12, 2024
38d5ee6
refactor cuzz
lastmjs Dec 13, 2024
2c65935
get rid of cycle fabrication issues
lastmjs Dec 13, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions .github/workflows/fuzz.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ on:
call-delay:
description: 'Length of time (in seconds) to wait between canister method fuzz test calls'
required: false
type: number
default: .1
type: string
default: '.1'
timeout:
description: 'Length of time (in minutes) after which the fuzz tests will automatically succeed'
required: false
type: number
type: string
default: '300'

jobs:
Expand All @@ -29,7 +29,11 @@ jobs:
name: 'Property IC API',
directories: './tests/property/ic_api'
}
uses: ./.github/workflows/get_and_run_tests.yml
uses: ./.github/workflows/run_test.yml
with:
directories: ${{ matrix.test_group.directories }}
exclude-dirs: class_syntax/new
fuzz: true
call-delay: ${{ inputs.call-delay }}
timeout: ${{ inputs.timeout }}
link-azle: true
9 changes: 5 additions & 4 deletions .github/workflows/run_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ on:
default: false
call-delay:
required: false
type: number
default: .1
type: string
default: '.1'
timeout:
required: false
type: number
default: 300
type: string
default: '300'

jobs:
get-test-infos:
Expand Down Expand Up @@ -167,6 +167,7 @@ jobs:
exit $exit_code
fi
working-directory: ${{ matrix.test.path }}
shell: bash -l {0}
env:
AZLE_PROPTEST_NUM_RUNS: ${{ steps.calc-runs.outputs.runs }}
AZLE_PROPTEST_VERBOSE: true
Expand Down
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified canister_templates/experimental.wasm
Binary file not shown.
Binary file modified canister_templates/stable.wasm
Binary file not shown.
161 changes: 71 additions & 90 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"type": "module",
"bin": {
"azle": "./src/build/index.ts",
"cuzz": "./node_modules/.bin/cuzz",
"tsc": "./node_modules/.bin/tsc"
},
"main": "./src/lib/stable/index.ts",
Expand All @@ -36,6 +37,7 @@
"class-transformer": "^0.5.1",
"class-validator": "^0.14.1",
"crypto-browserify": "^3.12.0",
"cuzz": "github:demergent-labs/cuzz#70f95363c64674ec2cf19b9eccfc1a773c3bf28f",
"deep-is": "^0.1.4",
"esbuild": "^0.23.0",
"esbuild-plugin-tsc": "^0.4.0",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
// TODO the plan is to integrate rquickjs for stable
// TODO and at that time create two crates
// TODO we should place each crate at src/build/stable/commands/compile/rust
// TODO and src/build/experimental/commands/compile/rust respectively

use std::cell::RefCell;

#[allow(unused)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ ic-cdk-timers = "0.6.0"
ic-stable-structures = "0.6.5"
ic-wasi-polyfill = "0.6.1"
rquickjs = { version = "0.6.2", features = ["array-buffer"] }
scopeguard = "1.2.0"
serde = "1.0.202"
serde_json = "1.0.107"
slotmap = "=1.0.6"
Loading
Loading