From e2f5b30681481b1f5c3ed018354db1abe80fc36e Mon Sep 17 00:00:00 2001 From: dqhl76 Date: Tue, 25 Jul 2023 22:53:36 +0800 Subject: [PATCH 01/16] ci: add fuzz test Signed-off-by: dqhl76 --- .github/workflows/fuzz_test.yml | 84 +++++++++++++++++++++++++++++++++ core/fuzz/utils.rs | 1 + 2 files changed, 85 insertions(+) create mode 100644 .github/workflows/fuzz_test.yml diff --git a/.github/workflows/fuzz_test.yml b/.github/workflows/fuzz_test.yml new file mode 100644 index 000000000000..6a48b6a15eac --- /dev/null +++ b/.github/workflows/fuzz_test.yml @@ -0,0 +1,84 @@ +# 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 + - fuzz-ci + 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: + runs-on: ubuntu-latest + services: + minio: + image: wktk/minio-server + ports: + - 9000:9000 + env: + MINIO_ACCESS_KEY: "minioadmin" + MINIO_SECRET_KEY: "minioadmin" + steps: + - uses: actions/checkout@v3 + - 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: 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 -D + - name: Test + shell: bash + working-directory: core/fuzz + run: cargo +nightly fuzz run -D fuzz_range_reader -- -max_total_time=150 & cargo +nightly fuzz run -D fuzz_reader -- -max_total_time=150 & cargo +nightly fuzz run -D fuzz_writer -- -max_total_time=150 + env: + OPENDAL_MEMORY_TEST: on + OPENDAL_FS_TEST: on + OPENDAL_FS_ROOT: ${{ runner.temp }}/ + 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 + + diff --git a/core/fuzz/utils.rs b/core/fuzz/utils.rs index e17c3e2e8583..3afdf56cde66 100644 --- a/core/fuzz/utils.rs +++ b/core/fuzz/utils.rs @@ -47,5 +47,6 @@ pub fn init_services() -> Vec<(&'static str, Option)> { vec![ ("fs", service::()), ("memory", service::()), + ("s3", service::()) ] } From 57c37006fc5a307e4d5c4bc878d1a124d608599d Mon Sep 17 00:00:00 2001 From: dqhl76 Date: Tue, 25 Jul 2023 22:55:01 +0800 Subject: [PATCH 02/16] fix: change time limit Signed-off-by: dqhl76 --- .github/workflows/fuzz_test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/fuzz_test.yml b/.github/workflows/fuzz_test.yml index 6a48b6a15eac..027989bafff0 100644 --- a/.github/workflows/fuzz_test.yml +++ b/.github/workflows/fuzz_test.yml @@ -70,7 +70,7 @@ jobs: - name: Test shell: bash working-directory: core/fuzz - run: cargo +nightly fuzz run -D fuzz_range_reader -- -max_total_time=150 & cargo +nightly fuzz run -D fuzz_reader -- -max_total_time=150 & cargo +nightly fuzz run -D fuzz_writer -- -max_total_time=150 + run: cargo +nightly fuzz run -D fuzz_range_reader -- -max_total_time=200 & cargo +nightly fuzz run -D fuzz_reader -- -max_total_time=200 & cargo +nightly fuzz run -D fuzz_writer -- -max_total_time=200 env: OPENDAL_MEMORY_TEST: on OPENDAL_FS_TEST: on From bfe96212dca0035ee8bde90adbf7305cfb34054e Mon Sep 17 00:00:00 2001 From: dqhl76 Date: Tue, 25 Jul 2023 22:56:47 +0800 Subject: [PATCH 03/16] fix: fmt Signed-off-by: dqhl76 --- core/fuzz/utils.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/fuzz/utils.rs b/core/fuzz/utils.rs index 3afdf56cde66..83b708a9cf90 100644 --- a/core/fuzz/utils.rs +++ b/core/fuzz/utils.rs @@ -47,6 +47,6 @@ pub fn init_services() -> Vec<(&'static str, Option)> { vec![ ("fs", service::()), ("memory", service::()), - ("s3", service::()) + ("s3", service::()), ] } From df9e124c12914ec9370b4e7a1924998511c7e4b2 Mon Sep 17 00:00:00 2001 From: dqhl76 Date: Wed, 26 Jul 2023 09:12:19 +0800 Subject: [PATCH 04/16] feat: add matrix strategy Signed-off-by: dqhl76 --- .github/workflows/fuzz_test.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/fuzz_test.yml b/.github/workflows/fuzz_test.yml index 027989bafff0..496685d2e7a6 100644 --- a/.github/workflows/fuzz_test.yml +++ b/.github/workflows/fuzz_test.yml @@ -22,7 +22,6 @@ on: push: branches: - main - - fuzz-ci pull_request: branches: - main @@ -50,6 +49,10 @@ jobs: env: MINIO_ACCESS_KEY: "minioadmin" MINIO_SECRET_KEY: "minioadmin" + strategy: + fail-fast: true + matrix: + fuzz-targets: [fuzz_reader, fuzz_range_reader, fuzz_writer] steps: - uses: actions/checkout@v3 - name: Setup Test Bucket @@ -70,7 +73,7 @@ jobs: - name: Test shell: bash working-directory: core/fuzz - run: cargo +nightly fuzz run -D fuzz_range_reader -- -max_total_time=200 & cargo +nightly fuzz run -D fuzz_reader -- -max_total_time=200 & cargo +nightly fuzz run -D fuzz_writer -- -max_total_time=200 + run: cargo +nightly fuzz run -D ${{ matrix.fuzz-targets }} -- -max_total_time=200 env: OPENDAL_MEMORY_TEST: on OPENDAL_FS_TEST: on From c55332e2f39c62fc1c2da9c21c19cbb75a4b856e Mon Sep 17 00:00:00 2001 From: dqhl76 Date: Wed, 26 Jul 2023 09:30:27 +0800 Subject: [PATCH 05/16] feat: split s3 Signed-off-by: dqhl76 --- .github/workflows/fuzz_test.yml | 48 +++++++++++++++++++-------------- 1 file changed, 28 insertions(+), 20 deletions(-) diff --git a/.github/workflows/fuzz_test.yml b/.github/workflows/fuzz_test.yml index 496685d2e7a6..1f46f7979beb 100644 --- a/.github/workflows/fuzz_test.yml +++ b/.github/workflows/fuzz_test.yml @@ -39,8 +39,27 @@ concurrency: cancel-in-progress: true jobs: - fuzz-test: + 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 -D + - name: Upload build artifacts + uses: actions/upload-artifact@v3 + with: + name: fuzz_targets + path: ./target/x86_64-unknown-linux-gnu/debug/fuzz_* + fuzz-test-run-s3: + runs-on: ubuntu-latest + needs: fuzz-test-build-target services: minio: image: wktk/minio-server @@ -52,36 +71,25 @@ jobs: strategy: fail-fast: true matrix: - fuzz-targets: [fuzz_reader, fuzz_range_reader, fuzz_writer] + fuzz-targets: [ fuzz_reader, fuzz_range_reader, fuzz_writer ] steps: - - uses: actions/checkout@v3 - 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: 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 + - name: Download Fuzz Targets + uses: actions/download-artifact@v2 + with: + name: fuzz_targets + path: ./target + - name: Run Fuzz Test shell: bash - working-directory: core/fuzz - run: cargo +nightly fuzz build -D - - name: Test - shell: bash - working-directory: core/fuzz - run: cargo +nightly fuzz run -D ${{ matrix.fuzz-targets }} -- -max_total_time=200 + run: ./target/${{ matrix.fuzz-targets }} env: - OPENDAL_MEMORY_TEST: on - OPENDAL_FS_TEST: on - OPENDAL_FS_ROOT: ${{ runner.temp }}/ 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 - - From 7e497268765c9702893234fd6870cbaea70d92eb Mon Sep 17 00:00:00 2001 From: dqhl76 Date: Wed, 26 Jul 2023 09:52:22 +0800 Subject: [PATCH 06/16] fix: change permission Signed-off-by: dqhl76 --- .github/workflows/fuzz_test.yml | 39 ++++++++++++++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) diff --git a/.github/workflows/fuzz_test.yml b/.github/workflows/fuzz_test.yml index 1f46f7979beb..aa518f886d6a 100644 --- a/.github/workflows/fuzz_test.yml +++ b/.github/workflows/fuzz_test.yml @@ -86,10 +86,47 @@ jobs: path: ./target - name: Run Fuzz Test shell: bash - run: ./target/${{ matrix.fuzz-targets }} + run: chmod 777 ./target/${{ matrix.fuzz-targets }} && ./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 + 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@v2 + with: + name: fuzz_targets + path: ./target + - name: Run Fuzz Test + shell: bash + run: chmod 777 ./target/${{ matrix.fuzz-targets }} && ./target/${{ matrix.fuzz-targets }} -max_total_time=120 + env: + OPENDAL_FS_TEST: on + OPENDAL_FS_ROOT: ${{ runner.temp }}/ + 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@v2 + with: + name: fuzz_targets + path: ./target + - name: Run Fuzz Test + shell: bash + run: chmod 777 ./target/${{ matrix.fuzz-targets }} && ./target/${{ matrix.fuzz-targets }} -max_total_time=120 + env: + OPENDAL_MEMORY_TEST: on From 14581f40f3f7fbb3b1aa1c66475d4136273d37a2 Mon Sep 17 00:00:00 2001 From: dqhl76 Date: Wed, 26 Jul 2023 13:40:32 +0800 Subject: [PATCH 07/16] fix: add release flag and make code readable Signed-off-by: dqhl76 --- .github/workflows/fuzz_test.yml | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/.github/workflows/fuzz_test.yml b/.github/workflows/fuzz_test.yml index aa518f886d6a..f08636a5f9f8 100644 --- a/.github/workflows/fuzz_test.yml +++ b/.github/workflows/fuzz_test.yml @@ -51,7 +51,7 @@ jobs: - name: Build Fuzz Targets shell: bash working-directory: core/fuzz - run: cargo +nightly fuzz build -D + run: cargo +nightly fuzz build - name: Upload build artifacts uses: actions/upload-artifact@v3 with: @@ -80,13 +80,16 @@ jobs: 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@v2 + 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: chmod 777 ./target/${{ matrix.fuzz-targets }} && ./target/${{ matrix.fuzz-targets }} -max_total_time=120 + run: ./target/${{ matrix.fuzz-targets }} -max_total_time=120 env: OPENDAL_S3_TEST: on OPENDAL_S3_BUCKET: test @@ -102,13 +105,16 @@ jobs: fuzz-targets: [ fuzz_reader, fuzz_range_reader, fuzz_writer ] steps: - name: Download Fuzz Targets - uses: actions/download-artifact@v2 + 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: chmod 777 ./target/${{ matrix.fuzz-targets }} && ./target/${{ matrix.fuzz-targets }} -max_total_time=120 + run: ./target/${{ matrix.fuzz-targets }} -max_total_time=120 env: OPENDAL_FS_TEST: on OPENDAL_FS_ROOT: ${{ runner.temp }}/ @@ -121,12 +127,15 @@ jobs: fuzz-targets: [ fuzz_reader, fuzz_range_reader, fuzz_writer ] steps: - name: Download Fuzz Targets - uses: actions/download-artifact@v2 + 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: chmod 777 ./target/${{ matrix.fuzz-targets }} && ./target/${{ matrix.fuzz-targets }} -max_total_time=120 + run: ./target/${{ matrix.fuzz-targets }} -max_total_time=120 env: OPENDAL_MEMORY_TEST: on From 7ddf5d1068420d619cdc4ea4259517f7dc75b3c3 Mon Sep 17 00:00:00 2001 From: dqhl76 Date: Wed, 26 Jul 2023 13:52:55 +0800 Subject: [PATCH 08/16] fix: fix wrong path Signed-off-by: dqhl76 --- .github/workflows/fuzz_test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/fuzz_test.yml b/.github/workflows/fuzz_test.yml index f08636a5f9f8..29c641d47959 100644 --- a/.github/workflows/fuzz_test.yml +++ b/.github/workflows/fuzz_test.yml @@ -56,7 +56,7 @@ jobs: uses: actions/upload-artifact@v3 with: name: fuzz_targets - path: ./target/x86_64-unknown-linux-gnu/debug/fuzz_* + path: ./target/x86_64-unknown-linux-gnu/release/fuzz_* fuzz-test-run-s3: runs-on: ubuntu-latest needs: fuzz-test-build-target From 63128135f0316565aadb073eed682965472fe833 Mon Sep 17 00:00:00 2001 From: dqhl76 Date: Wed, 26 Jul 2023 14:51:09 +0800 Subject: [PATCH 09/16] fix: fix wrong path Signed-off-by: dqhl76 --- .github/workflows/fuzz_test.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.github/workflows/fuzz_test.yml b/.github/workflows/fuzz_test.yml index 29c641d47959..d481a7b86de4 100644 --- a/.github/workflows/fuzz_test.yml +++ b/.github/workflows/fuzz_test.yml @@ -96,6 +96,11 @@ jobs: 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 + uses: actions/upload-artifact@v3 + with: + name: fuzz_crashes + path: ./crash* fuzz-test-run-fs: runs-on: ubuntu-latest needs: fuzz-test-build-target @@ -118,6 +123,11 @@ jobs: env: OPENDAL_FS_TEST: on OPENDAL_FS_ROOT: ${{ runner.temp }}/ + - name: Upload Crash Files + uses: actions/upload-artifact@v3 + with: + name: fuzz_crashes + path: ./crash* fuzz-test-run-memory: runs-on: ubuntu-latest needs: fuzz-test-build-target @@ -139,3 +149,8 @@ jobs: run: ./target/${{ matrix.fuzz-targets }} -max_total_time=120 env: OPENDAL_MEMORY_TEST: on + - name: Upload Crash Files + uses: actions/upload-artifact@v3 + with: + name: fuzz_crashes + path: ./crash* From 23fe03a18883567fd7c3e07561fe27aa04814132 Mon Sep 17 00:00:00 2001 From: dqhl76 Date: Wed, 26 Jul 2023 15:00:19 +0800 Subject: [PATCH 10/16] fix: add if failure condition Signed-off-by: dqhl76 --- .github/workflows/fuzz_test.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/fuzz_test.yml b/.github/workflows/fuzz_test.yml index d481a7b86de4..f55af8c07065 100644 --- a/.github/workflows/fuzz_test.yml +++ b/.github/workflows/fuzz_test.yml @@ -97,6 +97,7 @@ jobs: 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: fuzz_crashes @@ -125,6 +126,7 @@ jobs: OPENDAL_FS_ROOT: ${{ runner.temp }}/ - name: Upload Crash Files uses: actions/upload-artifact@v3 + if: ${{ failure() }} with: name: fuzz_crashes path: ./crash* @@ -150,6 +152,7 @@ jobs: env: OPENDAL_MEMORY_TEST: on - name: Upload Crash Files + if: ${{ failure() }} uses: actions/upload-artifact@v3 with: name: fuzz_crashes From 71c3385ad09958df86ed1a2ff56d6f95024c7632 Mon Sep 17 00:00:00 2001 From: dqhl76 Date: Wed, 26 Jul 2023 15:41:48 +0800 Subject: [PATCH 11/16] fix: add crash info to avoid conflict Signed-off-by: dqhl76 --- .github/workflows/fuzz_test.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/fuzz_test.yml b/.github/workflows/fuzz_test.yml index f55af8c07065..013266ada30c 100644 --- a/.github/workflows/fuzz_test.yml +++ b/.github/workflows/fuzz_test.yml @@ -100,7 +100,7 @@ jobs: if: ${{ failure() }} uses: actions/upload-artifact@v3 with: - name: fuzz_crashes + name: crash_s3_${{ matrix.fuzz-targets }}_${GITHUB_REF}_${GITHUB_RUN_NUMBER} path: ./crash* fuzz-test-run-fs: runs-on: ubuntu-latest @@ -128,7 +128,7 @@ jobs: uses: actions/upload-artifact@v3 if: ${{ failure() }} with: - name: fuzz_crashes + name: crash_fs_${{ matrix.fuzz-targets }}_${GITHUB_REF}_${GITHUB_RUN_NUMBER} path: ./crash* fuzz-test-run-memory: runs-on: ubuntu-latest @@ -155,5 +155,5 @@ jobs: if: ${{ failure() }} uses: actions/upload-artifact@v3 with: - name: fuzz_crashes + name: crash_memory_${{ matrix.fuzz-targets }}_${GITHUB_REF}_${GITHUB_RUN_NUMBER} path: ./crash* From ef75a2bf929a19041681ffc3563e1ecd0886f37c Mon Sep 17 00:00:00 2001 From: dqhl76 Date: Wed, 26 Jul 2023 16:01:32 +0800 Subject: [PATCH 12/16] fix: add crash time to avoid conflict Signed-off-by: dqhl76 --- .github/workflows/fuzz_test.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/fuzz_test.yml b/.github/workflows/fuzz_test.yml index 013266ada30c..9b60bf032d89 100644 --- a/.github/workflows/fuzz_test.yml +++ b/.github/workflows/fuzz_test.yml @@ -100,7 +100,7 @@ jobs: if: ${{ failure() }} uses: actions/upload-artifact@v3 with: - name: crash_s3_${{ matrix.fuzz-targets }}_${GITHUB_REF}_${GITHUB_RUN_NUMBER} + name: crash_s3_${{ matrix.fuzz-targets }}_${GITHUB_REF}_${GITHUB_RUN_NUMBER}_${$EPOCHSECONDS} path: ./crash* fuzz-test-run-fs: runs-on: ubuntu-latest @@ -128,7 +128,7 @@ jobs: uses: actions/upload-artifact@v3 if: ${{ failure() }} with: - name: crash_fs_${{ matrix.fuzz-targets }}_${GITHUB_REF}_${GITHUB_RUN_NUMBER} + name: crash_fs_${{ matrix.fuzz-targets }}_${GITHUB_REF}_${GITHUB_RUN_NUMBER}_${$EPOCHSECONDS} path: ./crash* fuzz-test-run-memory: runs-on: ubuntu-latest @@ -155,5 +155,5 @@ jobs: if: ${{ failure() }} uses: actions/upload-artifact@v3 with: - name: crash_memory_${{ matrix.fuzz-targets }}_${GITHUB_REF}_${GITHUB_RUN_NUMBER} + name: crash_memory_${{ matrix.fuzz-targets }}_${GITHUB_REF}_${GITHUB_RUN_NUMBER}_${$EPOCHSECONDS} path: ./crash* From 3b6ca3b07cb5fc225706ba0489293e0e9d925669 Mon Sep 17 00:00:00 2001 From: dqhl76 Date: Wed, 26 Jul 2023 16:30:36 +0800 Subject: [PATCH 13/16] fix: add crash time to avoid conflict Signed-off-by: dqhl76 --- .github/workflows/fuzz_test.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/fuzz_test.yml b/.github/workflows/fuzz_test.yml index 9b60bf032d89..a8befcc0b800 100644 --- a/.github/workflows/fuzz_test.yml +++ b/.github/workflows/fuzz_test.yml @@ -100,7 +100,7 @@ jobs: if: ${{ failure() }} uses: actions/upload-artifact@v3 with: - name: crash_s3_${{ matrix.fuzz-targets }}_${GITHUB_REF}_${GITHUB_RUN_NUMBER}_${$EPOCHSECONDS} + name: crash_s3_${{ matrix.fuzz-targets }}_${{ github.ref }}_${{ github.run_attempt }}_${EPOCHSECONDS} path: ./crash* fuzz-test-run-fs: runs-on: ubuntu-latest @@ -128,7 +128,7 @@ jobs: uses: actions/upload-artifact@v3 if: ${{ failure() }} with: - name: crash_fs_${{ matrix.fuzz-targets }}_${GITHUB_REF}_${GITHUB_RUN_NUMBER}_${$EPOCHSECONDS} + name: crash_fs_${{ matrix.fuzz-targets }}_${{ github.ref }}_${{ github.run_attempt }}_${EPOCHSECONDS} path: ./crash* fuzz-test-run-memory: runs-on: ubuntu-latest @@ -155,5 +155,5 @@ jobs: if: ${{ failure() }} uses: actions/upload-artifact@v3 with: - name: crash_memory_${{ matrix.fuzz-targets }}_${GITHUB_REF}_${GITHUB_RUN_NUMBER}_${$EPOCHSECONDS} + name: crash_memory_${{ matrix.fuzz-targets }}_${{ github.ref }}_${{ github.run_attempt }}_${EPOCHSECONDS} path: ./crash* From c15a23b43fe73e341ecfd676995e284cae91c914 Mon Sep 17 00:00:00 2001 From: dqhl76 Date: Wed, 26 Jul 2023 16:38:40 +0800 Subject: [PATCH 14/16] fix: add crash time to avoid conflict Signed-off-by: dqhl76 --- .github/workflows/fuzz_test.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/fuzz_test.yml b/.github/workflows/fuzz_test.yml index a8befcc0b800..5a11b15969bf 100644 --- a/.github/workflows/fuzz_test.yml +++ b/.github/workflows/fuzz_test.yml @@ -100,7 +100,7 @@ jobs: if: ${{ failure() }} uses: actions/upload-artifact@v3 with: - name: crash_s3_${{ matrix.fuzz-targets }}_${{ github.ref }}_${{ github.run_attempt }}_${EPOCHSECONDS} + name: crash_s3_${{ matrix.fuzz-targets }}_${{ github.ref }}_${{ github.run_attempt }}_${{ github.sha }} path: ./crash* fuzz-test-run-fs: runs-on: ubuntu-latest @@ -128,7 +128,7 @@ jobs: uses: actions/upload-artifact@v3 if: ${{ failure() }} with: - name: crash_fs_${{ matrix.fuzz-targets }}_${{ github.ref }}_${{ github.run_attempt }}_${EPOCHSECONDS} + name: crash_fs_${{ matrix.fuzz-targets }}_${{ github.ref }}_${{ github.run_attempt }}_${{ github.sha }} path: ./crash* fuzz-test-run-memory: runs-on: ubuntu-latest @@ -155,5 +155,5 @@ jobs: if: ${{ failure() }} uses: actions/upload-artifact@v3 with: - name: crash_memory_${{ matrix.fuzz-targets }}_${{ github.ref }}_${{ github.run_attempt }}_${EPOCHSECONDS} + name: crash_memory_${{ matrix.fuzz-targets }}_${{ github.ref }}_${{ github.run_attempt }}_${{ github.sha }} path: ./crash* From ee0943712ff7e13d9c910dd8eed84efc10261d4c Mon Sep 17 00:00:00 2001 From: dqhl76 Date: Wed, 26 Jul 2023 17:12:28 +0800 Subject: [PATCH 15/16] fix: correct char Signed-off-by: dqhl76 --- .github/workflows/fuzz_test.yml | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/.github/workflows/fuzz_test.yml b/.github/workflows/fuzz_test.yml index 5a11b15969bf..d07fbd8851b5 100644 --- a/.github/workflows/fuzz_test.yml +++ b/.github/workflows/fuzz_test.yml @@ -96,11 +96,14 @@ jobs: OPENDAL_S3_ENDPOINT: "http://127.0.0.1:9000" OPENDAL_S3_ACCESS_KEY_ID: minioadmin OPENDAL_S3_SECRET_ACCESS_KEY: minioadmin + - name: Clean Github ref + id: ref + run: echo "::set-output name=ref::$(echo ${{ github.ref }} | sed 's/\//_/g')" - name: Upload Crash Files if: ${{ failure() }} uses: actions/upload-artifact@v3 with: - name: crash_s3_${{ matrix.fuzz-targets }}_${{ github.ref }}_${{ github.run_attempt }}_${{ github.sha }} + name: crash_s3_${{ matrix.fuzz-targets }}_${{ steps.ref.outputs.ref }}_${{ github.run_attempt }}_${{ github.sha }} path: ./crash* fuzz-test-run-fs: runs-on: ubuntu-latest @@ -124,11 +127,14 @@ jobs: env: OPENDAL_FS_TEST: on OPENDAL_FS_ROOT: ${{ runner.temp }}/ + - name: Clean Github ref + id: ref + run: echo "::set-output name=ref::$(echo ${{ github.ref }} | sed 's/\//_/g')" - name: Upload Crash Files uses: actions/upload-artifact@v3 if: ${{ failure() }} with: - name: crash_fs_${{ matrix.fuzz-targets }}_${{ github.ref }}_${{ github.run_attempt }}_${{ github.sha }} + name: crash_fs_${{ matrix.fuzz-targets }}_${{ steps.ref.outputs.ref }}_${{ github.run_attempt }}_${{ github.sha }} path: ./crash* fuzz-test-run-memory: runs-on: ubuntu-latest @@ -151,9 +157,12 @@ jobs: run: ./target/${{ matrix.fuzz-targets }} -max_total_time=120 env: OPENDAL_MEMORY_TEST: on + - name: Clean Github ref + id: ref + run: echo "::set-output name=ref::$(echo ${{ github.ref }} | sed 's/\//_/g')" - name: Upload Crash Files if: ${{ failure() }} uses: actions/upload-artifact@v3 with: - name: crash_memory_${{ matrix.fuzz-targets }}_${{ github.ref }}_${{ github.run_attempt }}_${{ github.sha }} + name: crash_memory_${{ matrix.fuzz-targets }}_${{ steps.ref.outputs.ref }}_${{ github.run_attempt }}_${{ github.sha }} path: ./crash* From e9e194072c6f2e2157c9c0be1243eecbf8356c3f Mon Sep 17 00:00:00 2001 From: dqhl76 Date: Wed, 26 Jul 2023 17:27:33 +0800 Subject: [PATCH 16/16] fix: correct char Signed-off-by: dqhl76 --- .github/workflows/fuzz_test.yml | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/.github/workflows/fuzz_test.yml b/.github/workflows/fuzz_test.yml index d07fbd8851b5..1a11e06aa490 100644 --- a/.github/workflows/fuzz_test.yml +++ b/.github/workflows/fuzz_test.yml @@ -96,14 +96,11 @@ jobs: OPENDAL_S3_ENDPOINT: "http://127.0.0.1:9000" OPENDAL_S3_ACCESS_KEY_ID: minioadmin OPENDAL_S3_SECRET_ACCESS_KEY: minioadmin - - name: Clean Github ref - id: ref - run: echo "::set-output name=ref::$(echo ${{ github.ref }} | sed 's/\//_/g')" - name: Upload Crash Files if: ${{ failure() }} uses: actions/upload-artifact@v3 with: - name: crash_s3_${{ matrix.fuzz-targets }}_${{ steps.ref.outputs.ref }}_${{ github.run_attempt }}_${{ github.sha }} + name: crash_s3_${{ matrix.fuzz-targets }}_${{ github.event_name }}_${{ github.run_attempt }}_${{ github.sha }} path: ./crash* fuzz-test-run-fs: runs-on: ubuntu-latest @@ -127,14 +124,11 @@ jobs: env: OPENDAL_FS_TEST: on OPENDAL_FS_ROOT: ${{ runner.temp }}/ - - name: Clean Github ref - id: ref - run: echo "::set-output name=ref::$(echo ${{ github.ref }} | sed 's/\//_/g')" - name: Upload Crash Files uses: actions/upload-artifact@v3 if: ${{ failure() }} with: - name: crash_fs_${{ matrix.fuzz-targets }}_${{ steps.ref.outputs.ref }}_${{ github.run_attempt }}_${{ github.sha }} + name: crash_fs_${{ matrix.fuzz-targets }}_${{ github.event_name }}_${{ github.run_attempt }}_${{ github.sha }} path: ./crash* fuzz-test-run-memory: runs-on: ubuntu-latest @@ -157,12 +151,9 @@ jobs: run: ./target/${{ matrix.fuzz-targets }} -max_total_time=120 env: OPENDAL_MEMORY_TEST: on - - name: Clean Github ref - id: ref - run: echo "::set-output name=ref::$(echo ${{ github.ref }} | sed 's/\//_/g')" - name: Upload Crash Files if: ${{ failure() }} uses: actions/upload-artifact@v3 with: - name: crash_memory_${{ matrix.fuzz-targets }}_${{ steps.ref.outputs.ref }}_${{ github.run_attempt }}_${{ github.sha }} + name: crash_memory_${{ matrix.fuzz-targets }}_${{ github.event_name }}_${{ github.run_attempt }}_${{ github.sha }} path: ./crash*