-
Notifications
You must be signed in to change notification settings - Fork 741
ci: Add services fuzz test for read/write/range_read #2710
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
Merged
Merged
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
e2f5b30
ci: add fuzz test
dqhl76 57c3700
fix: change time limit
dqhl76 bfe9621
fix: fmt
dqhl76 df9e124
feat: add matrix strategy
dqhl76 c55332e
feat: split s3
dqhl76 7e49726
fix: change permission
dqhl76 14581f4
fix: add release flag and make code readable
dqhl76 7ddf5d1
fix: fix wrong path
dqhl76 6312813
fix: fix wrong path
dqhl76 23fe03a
fix: add if failure condition
dqhl76 71c3385
fix: add crash info to avoid conflict
dqhl76 ef75a2b
fix: add crash time to avoid conflict
dqhl76 3b6ca3b
fix: add crash time to avoid conflict
dqhl76 c15a23b
fix: add crash time to avoid conflict
dqhl76 ee09437
fix: correct char
dqhl76 e9e1940
fix: correct char
dqhl76 e207c11
Merge branch 'main' into fuzz-ci-test
PsiACE File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,159 @@ | ||
| # Licensed to the Apache Software Foundation (ASF) under one | ||
| # or more contributor license agreements. See the NOTICE file | ||
| # distributed with this work for additional information | ||
| # regarding copyright ownership. The ASF licenses this file | ||
| # to you under the Apache License, Version 2.0 (the | ||
| # "License"); you may not use this file except in compliance | ||
| # with the License. You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, | ||
| # software distributed under the License is distributed on an | ||
| # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
| # KIND, either express or implied. See the License for the | ||
| # specific language governing permissions and limitations | ||
| # under the License. | ||
|
|
||
|
|
||
| name: Fuzz Test | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
| pull_request: | ||
| branches: | ||
| - main | ||
| paths: | ||
| - "core/src/**" | ||
| - "!core/src/docs/**" | ||
| - "!core/src/services/**" | ||
| - "core/src/services/fs/**" | ||
| - "core/src/services/memory/**" | ||
| - "core/src/services/s3/**" | ||
| - ".github/workflows/fuzz_test.yml" | ||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }} | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| fuzz-test-build-target: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v3 | ||
| - name: Setup Rust toolchain | ||
| uses: ./.github/actions/setup | ||
| - name: Install cargo fuzz | ||
| shell: bash | ||
| run: rustup install nightly && cargo +nightly install cargo-fuzz | ||
| - name: Build Fuzz Targets | ||
| shell: bash | ||
| working-directory: core/fuzz | ||
| run: cargo +nightly fuzz build | ||
| - name: Upload build artifacts | ||
| uses: actions/upload-artifact@v3 | ||
| with: | ||
| name: fuzz_targets | ||
| path: ./target/x86_64-unknown-linux-gnu/release/fuzz_* | ||
| fuzz-test-run-s3: | ||
| runs-on: ubuntu-latest | ||
| needs: fuzz-test-build-target | ||
| services: | ||
| minio: | ||
| image: wktk/minio-server | ||
| ports: | ||
| - 9000:9000 | ||
| env: | ||
| MINIO_ACCESS_KEY: "minioadmin" | ||
| MINIO_SECRET_KEY: "minioadmin" | ||
| strategy: | ||
| fail-fast: true | ||
| matrix: | ||
| fuzz-targets: [ fuzz_reader, fuzz_range_reader, fuzz_writer ] | ||
| steps: | ||
| - name: Setup Test Bucket | ||
| env: | ||
| AWS_ACCESS_KEY_ID: "minioadmin" | ||
| AWS_SECRET_ACCESS_KEY: "minioadmin" | ||
| AWS_EC2_METADATA_DISABLED: "true" | ||
| run: aws --endpoint-url http://127.0.0.1:9000/ s3 mb s3://test | ||
| - name: Download Fuzz Targets | ||
| uses: actions/download-artifact@v3 | ||
| with: | ||
| name: fuzz_targets | ||
| path: ./target | ||
| - name: Grant Execute Permissions | ||
| shell: bash | ||
| run: chmod +x ./target/${{ matrix.fuzz-targets }} | ||
| - name: Run Fuzz Test | ||
| shell: bash | ||
| run: ./target/${{ matrix.fuzz-targets }} -max_total_time=120 | ||
| env: | ||
| OPENDAL_S3_TEST: on | ||
| OPENDAL_S3_BUCKET: test | ||
| OPENDAL_S3_ENDPOINT: "http://127.0.0.1:9000" | ||
| OPENDAL_S3_ACCESS_KEY_ID: minioadmin | ||
| OPENDAL_S3_SECRET_ACCESS_KEY: minioadmin | ||
| - name: Upload Crash Files | ||
| if: ${{ failure() }} | ||
| uses: actions/upload-artifact@v3 | ||
| with: | ||
| name: crash_s3_${{ matrix.fuzz-targets }}_${{ github.event_name }}_${{ github.run_attempt }}_${{ github.sha }} | ||
| path: ./crash* | ||
| fuzz-test-run-fs: | ||
| runs-on: ubuntu-latest | ||
| needs: fuzz-test-build-target | ||
| strategy: | ||
| fail-fast: true | ||
| matrix: | ||
| fuzz-targets: [ fuzz_reader, fuzz_range_reader, fuzz_writer ] | ||
| steps: | ||
| - name: Download Fuzz Targets | ||
| uses: actions/download-artifact@v3 | ||
| with: | ||
| name: fuzz_targets | ||
| path: ./target | ||
| - name: Grant Execute Permissions | ||
| shell: bash | ||
| run: chmod +x ./target/${{ matrix.fuzz-targets }} | ||
| - name: Run Fuzz Test | ||
| shell: bash | ||
| run: ./target/${{ matrix.fuzz-targets }} -max_total_time=120 | ||
| env: | ||
| OPENDAL_FS_TEST: on | ||
| OPENDAL_FS_ROOT: ${{ runner.temp }}/ | ||
| - name: Upload Crash Files | ||
| uses: actions/upload-artifact@v3 | ||
| if: ${{ failure() }} | ||
| with: | ||
| name: crash_fs_${{ matrix.fuzz-targets }}_${{ github.event_name }}_${{ github.run_attempt }}_${{ github.sha }} | ||
| path: ./crash* | ||
| fuzz-test-run-memory: | ||
| runs-on: ubuntu-latest | ||
| needs: fuzz-test-build-target | ||
| strategy: | ||
| fail-fast: true | ||
| matrix: | ||
| fuzz-targets: [ fuzz_reader, fuzz_range_reader, fuzz_writer ] | ||
| steps: | ||
| - name: Download Fuzz Targets | ||
| uses: actions/download-artifact@v3 | ||
| with: | ||
| name: fuzz_targets | ||
| path: ./target | ||
| - name: Grant Execute Permissions | ||
| shell: bash | ||
| run: chmod +x ./target/${{ matrix.fuzz-targets }} | ||
| - name: Run Fuzz Test | ||
| shell: bash | ||
| run: ./target/${{ matrix.fuzz-targets }} -max_total_time=120 | ||
| env: | ||
| OPENDAL_MEMORY_TEST: on | ||
| - name: Upload Crash Files | ||
| if: ${{ failure() }} | ||
| uses: actions/upload-artifact@v3 | ||
| with: | ||
| name: crash_memory_${{ matrix.fuzz-targets }}_${{ github.event_name }}_${{ github.run_attempt }}_${{ github.sha }} | ||
| path: ./crash* | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.