From d0c3a46aaf9fad7c9ec6ef190882c1f1e053173d Mon Sep 17 00:00:00 2001 From: Michael Ilyin Date: Wed, 19 Jun 2024 12:19:13 +0200 Subject: [PATCH 01/12] experiment, if any packet is received --- zenoh/tests/interceptors.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zenoh/tests/interceptors.rs b/zenoh/tests/interceptors.rs index 48a3f1b3e8..7d5c468e09 100644 --- a/zenoh/tests/interceptors.rs +++ b/zenoh/tests/interceptors.rs @@ -92,6 +92,7 @@ fn downsampling_test( counters .get(sample.key_expr()) .map(|ctr| ctr.fetch_add(1, Ordering::SeqCst)); + panic!("Hurray, received a message from the publisher!"); } }) .wait() @@ -180,7 +181,6 @@ fn downsampling_by_keyexpr_impl(flow: InterceptorFlow) { downsampling_test(pub_config, sub_config, ke_prefix, ke_of_rates, rate_check); } -#[cfg(unix)] #[test] fn downsampling_by_keyexpr() { zenoh::try_init_log_from_env(); From 065acb46f7524bbb3e7b6ec5bc37fbb671eab635 Mon Sep 17 00:00:00 2001 From: Michael Ilyin Date: Wed, 19 Jun 2024 13:34:28 +0200 Subject: [PATCH 02/12] run only windows test --- .github/workflows/ci.yml | 202 ++++++++++++++++++++------------------- 1 file changed, 102 insertions(+), 100 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 35250bdec5..575e263366 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,67 +27,67 @@ env: RUSTUP_WINDOWS_PATH_ADD_BIN: 1 jobs: - check: - name: Lints and doc tests on ${{ matrix.os }} - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - os: [ubuntu-latest, windows-latest, macos-13, macos-14] + # check: + # name: Lints and doc tests on ${{ matrix.os }} + # runs-on: ${{ matrix.os }} + # strategy: + # fail-fast: false + # matrix: + # # os: [ubuntu-latest, windows-latest, macos-13, macos-14] - steps: - - name: Clone this repository - uses: actions/checkout@v4 + # steps: + # - name: Clone this repository + # uses: actions/checkout@v4 - - name: Setup rust-cache - uses: Swatinem/rust-cache@v2 + # - name: Setup rust-cache + # uses: Swatinem/rust-cache@v2 - - name: Update Stable Rust toolchain - run: rustup update stable + # - name: Update Stable Rust toolchain + # run: rustup update stable - - name: Install latest cargo-deny - uses: taiki-e/install-action@cargo-deny + # - name: Install latest cargo-deny + # uses: taiki-e/install-action@cargo-deny - - name: Code format check - run: cargo fmt --check -- --config "unstable_features=true,imports_granularity=Crate,group_imports=StdExternalCrate" + # - name: Code format check + # run: cargo fmt --check -- --config "unstable_features=true,imports_granularity=Crate,group_imports=StdExternalCrate" - - name: Clippy zenoh no-default-features - run: cargo +stable clippy -p zenoh --all-targets --no-default-features -- --deny warnings + # - name: Clippy zenoh no-default-features + # run: cargo +stable clippy -p zenoh --all-targets --no-default-features -- --deny warnings - - name: Clippy zenoh - run: cargo +stable clippy -p zenoh --all-targets -- --deny warnings + # - name: Clippy zenoh + # run: cargo +stable clippy -p zenoh --all-targets -- --deny warnings - - name: Clippy zenoh unstable - run: cargo +stable clippy -p zenoh --all-targets --features unstable -- --deny warnings + # - name: Clippy zenoh unstable + # run: cargo +stable clippy -p zenoh --all-targets --features unstable -- --deny warnings - - name: Clippy zenoh internal - run: cargo +stable clippy -p zenoh --all-targets --features unstable,internal -- --deny warnings + # - name: Clippy zenoh internal + # run: cargo +stable clippy -p zenoh --all-targets --features unstable,internal -- --deny warnings - - name: Clippy zenoh shared-memory - run: cargo +stable clippy -p zenoh --all-targets --features unstable,shared-memory -- --deny warnings + # - name: Clippy zenoh shared-memory + # run: cargo +stable clippy -p zenoh --all-targets --features unstable,shared-memory -- --deny warnings - - name: Clippy workspace - run: cargo +stable clippy --all-targets -- --deny warnings + # - name: Clippy workspace + # run: cargo +stable clippy --all-targets -- --deny warnings - - name: Clippy workspace unstable - run: cargo +stable clippy --all-targets --features unstable -- --deny warnings + # - name: Clippy workspace unstable + # run: cargo +stable clippy --all-targets --features unstable -- --deny warnings - - name: Clippy all features - if: ${{ matrix.os == 'ubuntu-latest' || matrix.os == 'macOS-latest' }} - run: cargo +stable clippy --all-targets --all-features -- --deny warnings + # - name: Clippy all features + # if: ${{ matrix.os == 'ubuntu-latest' || matrix.os == 'macOS-latest' }} + # run: cargo +stable clippy --all-targets --all-features -- --deny warnings - - name: Install generic no_std target - # Generic no_std target architecture is x86_64-unknown-none - run: rustup target add x86_64-unknown-none + # - name: Install generic no_std target + # # Generic no_std target architecture is x86_64-unknown-none + # run: rustup target add x86_64-unknown-none - - name: Perform no_std checks - run: cargo check --bin nostd_check --target x86_64-unknown-none --manifest-path ci/nostd-check/Cargo.toml + # - name: Perform no_std checks + # run: cargo check --bin nostd_check --target x86_64-unknown-none --manifest-path ci/nostd-check/Cargo.toml - - name: Run doctests - run: cargo test --doc + # - name: Run doctests + # run: cargo test --doc - - name: Check licenses - run: cargo deny check licenses + # - name: Check licenses + # run: cargo deny check licenses test: name: Unit tests on ${{ matrix.os }} @@ -95,83 +95,85 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-latest, windows-latest, macos-13, macos-14] + # os: [ubuntu-latest, windows-latest, macos-13, macos-14] + os: [windows-latest] steps: - - name: Clone this repository - uses: actions/checkout@v4 + # - name: Clone this repository + # uses: actions/checkout@v4 - - name: Install latest Rust toolchain - run: rustup show + # - name: Install latest Rust toolchain + # run: rustup show - - name: Setup rust-cache - uses: Swatinem/rust-cache@v2 + # - name: Setup rust-cache + # uses: Swatinem/rust-cache@v2 - - name: Set rustflags - shell: bash - run: | - case ${{ matrix.os }} in - *windows*) echo "RUSTFLAGS=-Clink-arg=/DEBUG:NONE" >> $GITHUB_ENV ;; - esac + # - name: Set rustflags + # shell: bash + # run: | + # case ${{ matrix.os }} in + # *windows*) echo "RUSTFLAGS=-Clink-arg=/DEBUG:NONE" >> $GITHUB_ENV ;; + # esac - - name: Install latest nextest - uses: taiki-e/install-action@nextest + # - name: Install latest nextest + # uses: taiki-e/install-action@nextest - name: Run tests - run: cargo nextest run --exclude zenoh-examples --exclude zenoh-plugin-example --workspace + # run: cargo nextest run --exclude zenoh-examples --exclude zenoh-plugin-example --workspace + run: cargo nextest run downsampling_by_keyexpr - - name: Run tests with SHM - if: ${{ matrix.os == 'macOS-latest' || matrix.os == 'windows-latest' }} - run: cargo nextest run -F shared-memory -F unstable -E 'not (test(test_default_features))' --exclude zenoh-examples --exclude zenoh-plugin-example --workspace + # - name: Run tests with SHM + # if: ${{ matrix.os == 'macOS-latest' || matrix.os == 'windows-latest' }} + # run: cargo nextest run -F shared-memory -F unstable -E 'not (test(test_default_features))' --exclude zenoh-examples --exclude zenoh-plugin-example --workspace - - name: Run tests with SHM + unixpipe - if: ${{ matrix.os == 'ubuntu-latest' }} - run: cargo nextest run -F shared-memory -F unstable -F transport_unixpipe -E 'not (test(test_default_features))' --exclude zenoh-examples --exclude zenoh-plugin-example --workspace + # - name: Run tests with SHM + unixpipe + # if: ${{ matrix.os == 'ubuntu-latest' }} + # run: cargo nextest run -F shared-memory -F unstable -F transport_unixpipe -E 'not (test(test_default_features))' --exclude zenoh-examples --exclude zenoh-plugin-example --workspace - - name: Check for feature leaks - if: ${{ matrix.os == 'ubuntu-latest' }} - run: cargo nextest run -p zenohd --no-default-features + # - name: Check for feature leaks + # if: ${{ matrix.os == 'ubuntu-latest' }} + # run: cargo nextest run -p zenohd --no-default-features - valgrind: - name: Memory leak checks - runs-on: ubuntu-latest - needs: check - steps: - - name: Clone this repository - uses: actions/checkout@v4 + # valgrind: + # name: Memory leak checks + # runs-on: ubuntu-latest + # needs: check + # steps: + # - name: Clone this repository + # uses: actions/checkout@v4 - - name: Install latest Rust toolchain - run: rustup show + # - name: Install latest Rust toolchain + # run: rustup show - - name: Install valgrind - uses: taiki-e/install-action@valgrind + # - name: Install valgrind + # uses: taiki-e/install-action@valgrind - - uses: Swatinem/rust-cache@v2 + # - uses: Swatinem/rust-cache@v2 - - name: Run memory leaks check - run: ci/valgrind-check/run.sh - shell: bash + # - name: Run memory leaks check + # run: ci/valgrind-check/run.sh + # shell: bash - typos: - name: Typos Check - runs-on: ubuntu-latest - steps: - - name: Clone this repository - uses: actions/checkout@v4 + # typos: + # name: Typos Check + # runs-on: ubuntu-latest + # steps: + # - name: Clone this repository + # uses: actions/checkout@v4 - - name: Check spelling - uses: crate-ci/typos@master + # - name: Check spelling + # uses: crate-ci/typos@master # NOTE: In GitHub repository settings, the "Require status checks to pass # before merging" branch protection rule ensures that commits are only merged # from branches where specific status checks have passed. These checks are # specified manually as a list of workflow job names. Thus we use this extra # job to signal whether all CI checks have passed. - ci: - name: CI status checks - runs-on: ubuntu-latest - needs: [check, test, valgrind, typos] - if: always() - steps: - - name: Check whether all jobs pass - run: echo '${{ toJson(needs) }}' | jq -e 'all(.result == "success")' + # ci: + # name: CI status checks + # runs-on: ubuntu-latest + # needs: [check, test, valgrind, typos] + # if: always() + # steps: + # - name: Check whether all jobs pass + # run: echo '${{ toJson(needs) }}' | jq -e 'all(.result == "success")' From 46f0c80821f16eeb7bb0609678b1d13305cd06e2 Mon Sep 17 00:00:00 2001 From: Michael Ilyin Date: Wed, 19 Jun 2024 13:36:16 +0200 Subject: [PATCH 03/12] install nextest restored --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 575e263366..f98143c572 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -115,8 +115,8 @@ jobs: # *windows*) echo "RUSTFLAGS=-Clink-arg=/DEBUG:NONE" >> $GITHUB_ENV ;; # esac - # - name: Install latest nextest - # uses: taiki-e/install-action@nextest + - name: Install latest nextest + uses: taiki-e/install-action@nextest - name: Run tests # run: cargo nextest run --exclude zenoh-examples --exclude zenoh-plugin-example --workspace From 02d4e30d62f8140a64eb2725942d94cc0ff0b1f4 Mon Sep 17 00:00:00 2001 From: Michael Ilyin Date: Wed, 19 Jun 2024 13:37:41 +0200 Subject: [PATCH 04/12] installation restored --- .github/workflows/ci.yml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f98143c572..b07c91cdd8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -99,21 +99,21 @@ jobs: os: [windows-latest] steps: - # - name: Clone this repository - # uses: actions/checkout@v4 + - name: Clone this repository + uses: actions/checkout@v4 - # - name: Install latest Rust toolchain - # run: rustup show + - name: Install latest Rust toolchain + run: rustup show - # - name: Setup rust-cache - # uses: Swatinem/rust-cache@v2 + - name: Setup rust-cache + uses: Swatinem/rust-cache@v2 - # - name: Set rustflags - # shell: bash - # run: | - # case ${{ matrix.os }} in - # *windows*) echo "RUSTFLAGS=-Clink-arg=/DEBUG:NONE" >> $GITHUB_ENV ;; - # esac + - name: Set rustflags + shell: bash + run: | + case ${{ matrix.os }} in + *windows*) echo "RUSTFLAGS=-Clink-arg=/DEBUG:NONE" >> $GITHUB_ENV ;; + esac - name: Install latest nextest uses: taiki-e/install-action@nextest From fde8a021dee035fbee26110aae9a4a55dad9fef7 Mon Sep 17 00:00:00 2001 From: Michael Ilyin Date: Wed, 19 Jun 2024 13:45:38 +0200 Subject: [PATCH 05/12] panic commented --- zenoh/tests/interceptors.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zenoh/tests/interceptors.rs b/zenoh/tests/interceptors.rs index 7d5c468e09..d59ef8e779 100644 --- a/zenoh/tests/interceptors.rs +++ b/zenoh/tests/interceptors.rs @@ -92,7 +92,7 @@ fn downsampling_test( counters .get(sample.key_expr()) .map(|ctr| ctr.fetch_add(1, Ordering::SeqCst)); - panic!("Hurray, received a message from the publisher!"); + // panic!("Hurray, received a message from the publisher!"); } }) .wait() From 61f17afea4c8da6e5013130084d88049ec68571d Mon Sep 17 00:00:00 2001 From: Michael Ilyin Date: Wed, 19 Jun 2024 13:53:58 +0200 Subject: [PATCH 06/12] run all tests --- .github/workflows/ci.yml | 4 ++-- zenoh/tests/interceptors.rs | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b07c91cdd8..84592c101f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -119,8 +119,8 @@ jobs: uses: taiki-e/install-action@nextest - name: Run tests - # run: cargo nextest run --exclude zenoh-examples --exclude zenoh-plugin-example --workspace - run: cargo nextest run downsampling_by_keyexpr + run: cargo nextest run --exclude zenoh-examples --exclude zenoh-plugin-example --workspace + # run: cargo nextest run downsampling_by_keyexpr # - name: Run tests with SHM # if: ${{ matrix.os == 'macOS-latest' || matrix.os == 'windows-latest' }} diff --git a/zenoh/tests/interceptors.rs b/zenoh/tests/interceptors.rs index d59ef8e779..3ee2c51828 100644 --- a/zenoh/tests/interceptors.rs +++ b/zenoh/tests/interceptors.rs @@ -92,7 +92,6 @@ fn downsampling_test( counters .get(sample.key_expr()) .map(|ctr| ctr.fetch_add(1, Ordering::SeqCst)); - // panic!("Hurray, received a message from the publisher!"); } }) .wait() From 502ddf7b50e3e5f8d3aa6dfba43fae11831ecf8e Mon Sep 17 00:00:00 2001 From: Michael Ilyin Date: Wed, 19 Jun 2024 14:05:34 +0200 Subject: [PATCH 07/12] sequentioal group added --- .config/nextest.toml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.config/nextest.toml b/.config/nextest.toml index c911f7bd63..e3c7c3bca2 100644 --- a/.config/nextest.toml +++ b/.config/nextest.toml @@ -1,3 +1,6 @@ +[test-groups] +sequential = { max-threads = 1 } + # By default, retry a few times until pass the test within the specified timeout [profile.default] retries = 1 @@ -20,3 +23,9 @@ test(=header_link_failure_concurrent) """ threads-required = 'num-cpus' slow-timeout = { period = "60s", terminate-after = 6 } + +[[profile.default.overrides]] +filter = """ +test(=downsampling_by_keyexpr) +""" +test-group = "sequential" From e290904be6fa3f30a9505cac9250dc4c34698735 Mon Sep 17 00:00:00 2001 From: Michael Ilyin Date: Wed, 19 Jun 2024 22:36:31 +0200 Subject: [PATCH 08/12] check transport_tcp_concurrent --- .github/workflows/ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 84592c101f..d46d0c0048 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -119,8 +119,9 @@ jobs: uses: taiki-e/install-action@nextest - name: Run tests - run: cargo nextest run --exclude zenoh-examples --exclude zenoh-plugin-example --workspace + # run: cargo nextest run --exclude zenoh-examples --exclude zenoh-plugin-example --workspace # run: cargo nextest run downsampling_by_keyexpr + run: cargo nextest run --F shared-memory -F unstable transport_tcp_concurrent --nocapture # - name: Run tests with SHM # if: ${{ matrix.os == 'macOS-latest' || matrix.os == 'windows-latest' }} From 6d398172fcdc5acbbce0e1d3a4ad63ea513108eb Mon Sep 17 00:00:00 2001 From: Michael Ilyin Date: Wed, 19 Jun 2024 22:44:12 +0200 Subject: [PATCH 09/12] parameter fix --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d46d0c0048..f9883f3cb2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -121,7 +121,7 @@ jobs: - name: Run tests # run: cargo nextest run --exclude zenoh-examples --exclude zenoh-plugin-example --workspace # run: cargo nextest run downsampling_by_keyexpr - run: cargo nextest run --F shared-memory -F unstable transport_tcp_concurrent --nocapture + run: cargo nextest run -F shared-memory -F unstable transport_tcp_concurrent --nocapture # - name: Run tests with SHM # if: ${{ matrix.os == 'macOS-latest' || matrix.os == 'windows-latest' }} From feb443508671218cc54296a7faa37994304c4513 Mon Sep 17 00:00:00 2001 From: Michael Ilyin Date: Wed, 19 Jun 2024 23:00:16 +0200 Subject: [PATCH 10/12] backtrace, all os --- .github/workflows/ci.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f9883f3cb2..26d381c920 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -95,8 +95,7 @@ jobs: strategy: fail-fast: false matrix: - # os: [ubuntu-latest, windows-latest, macos-13, macos-14] - os: [windows-latest] + os: [ubuntu-latest, windows-latest, macos-13, macos-14] steps: - name: Clone this repository @@ -121,7 +120,7 @@ jobs: - name: Run tests # run: cargo nextest run --exclude zenoh-examples --exclude zenoh-plugin-example --workspace # run: cargo nextest run downsampling_by_keyexpr - run: cargo nextest run -F shared-memory -F unstable transport_tcp_concurrent --nocapture + run: RUST_BACKTRACE=1 cargo nextest run -F shared-memory -F unstable transport_tcp_concurrent --nocapture # - name: Run tests with SHM # if: ${{ matrix.os == 'macOS-latest' || matrix.os == 'windows-latest' }} From 4b0e2d9c22a9879e8b72c42f74e77255d0aec0ed Mon Sep 17 00:00:00 2001 From: Michael Ilyin Date: Wed, 19 Jun 2024 23:03:07 +0200 Subject: [PATCH 11/12] set env correctly --- .github/workflows/ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 26d381c920..e33c0123fa 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,6 +25,7 @@ env: CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse CARGO_PROFILE_DEV_DEBUG: false RUSTUP_WINDOWS_PATH_ADD_BIN: 1 + RUST_BACKTRACE: 1 jobs: # check: @@ -120,7 +121,7 @@ jobs: - name: Run tests # run: cargo nextest run --exclude zenoh-examples --exclude zenoh-plugin-example --workspace # run: cargo nextest run downsampling_by_keyexpr - run: RUST_BACKTRACE=1 cargo nextest run -F shared-memory -F unstable transport_tcp_concurrent --nocapture + run: cargo nextest run -F shared-memory -F unstable transport_tcp_concurrent --nocapture # - name: Run tests with SHM # if: ${{ matrix.os == 'macOS-latest' || matrix.os == 'windows-latest' }} From 86b92d3f22ebf65e9fa6a6a93c1dd28b2c373b0a Mon Sep 17 00:00:00 2001 From: Michael Ilyin Date: Thu, 20 Jun 2024 00:15:25 +0200 Subject: [PATCH 12/12] backtrace full --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e33c0123fa..bccd87c400 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,7 +25,7 @@ env: CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse CARGO_PROFILE_DEV_DEBUG: false RUSTUP_WINDOWS_PATH_ADD_BIN: 1 - RUST_BACKTRACE: 1 + RUST_BACKTRACE: full jobs: # check: