From a691cb30bb1bf04f887a908572eb59c12442857d Mon Sep 17 00:00:00 2001 From: Binbin Date: Thu, 15 Aug 2024 15:11:38 +0800 Subject: [PATCH] Skip IPv6 tests when TCLSH version is < 8.6 (#910) In #786, we did skip it in the daily, but not for the others. When running ./runtest on MacOS, we will get the failure. ``` couldn't open socket: host is unreachable (nodename nor servname provided, or not known) ``` The reason is that TCL 8.5 doesn't support ipv6, so we skip tests tagged with ipv6. This also revert #786. Signed-off-by: Binbin --- .github/workflows/daily.yml | 42 ++++++++++++++++++------------------- tests/support/server.tcl | 5 +++++ 2 files changed, 26 insertions(+), 21 deletions(-) diff --git a/.github/workflows/daily.yml b/.github/workflows/daily.yml index 9b5b8ee482..74df73fb79 100644 --- a/.github/workflows/daily.yml +++ b/.github/workflows/daily.yml @@ -872,27 +872,27 @@ jobs: !contains(github.event.inputs.skipjobs, 'macos') && !(contains(github.event.inputs.skiptests, 'redis') && contains(github.event.inputs.skiptests, 'modules')) timeout-minutes: 14400 steps: - - name: prep - if: github.event_name == 'workflow_dispatch' - run: | - echo "GITHUB_REPOSITORY=${{github.event.inputs.use_repo}}" >> $GITHUB_ENV - echo "GITHUB_HEAD_REF=${{github.event.inputs.use_git_ref}}" >> $GITHUB_ENV - echo "skipjobs: ${{github.event.inputs.skipjobs}}" - echo "skiptests: ${{github.event.inputs.skiptests}}" - echo "test_args: ${{github.event.inputs.test_args}}" - echo "cluster_test_args: ${{github.event.inputs.cluster_test_args}}" - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - with: - repository: ${{ env.GITHUB_REPOSITORY }} - ref: ${{ env.GITHUB_HEAD_REF }} - - name: make - run: make SERVER_CFLAGS='-Werror' - - name: test - if: true && !contains(github.event.inputs.skiptests, 'redis') - run: ./runtest --accurate --verbose --tags -ipv6 --clients 1 --no-latency --dump-logs ${{github.event.inputs.test_args}} - - name: module api test - if: true && !contains(github.event.inputs.skiptests, 'modules') - run: ./runtest-moduleapi --verbose --verbose --clients 1 --no-latency --dump-logs ${{github.event.inputs.test_args}} + - name: prep + if: github.event_name == 'workflow_dispatch' + run: | + echo "GITHUB_REPOSITORY=${{github.event.inputs.use_repo}}" >> $GITHUB_ENV + echo "GITHUB_HEAD_REF=${{github.event.inputs.use_git_ref}}" >> $GITHUB_ENV + echo "skipjobs: ${{github.event.inputs.skipjobs}}" + echo "skiptests: ${{github.event.inputs.skiptests}}" + echo "test_args: ${{github.event.inputs.test_args}}" + echo "cluster_test_args: ${{github.event.inputs.cluster_test_args}}" + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + with: + repository: ${{ env.GITHUB_REPOSITORY }} + ref: ${{ env.GITHUB_HEAD_REF }} + - name: make + run: make SERVER_CFLAGS='-Werror' + - name: test + if: true && !contains(github.event.inputs.skiptests, 'redis') + run: ./runtest --accurate --verbose --clients 1 --no-latency --dump-logs ${{github.event.inputs.test_args}} + - name: module api test + if: true && !contains(github.event.inputs.skiptests, 'modules') + run: CFLAGS='-Werror' ./runtest-moduleapi --verbose --clients 1 --no-latency --dump-logs ${{github.event.inputs.test_args}} test-macos-latest-sentinel: runs-on: macos-latest diff --git a/tests/support/server.tcl b/tests/support/server.tcl index 32f0c18a4c..6d5d2e8495 100644 --- a/tests/support/server.tcl +++ b/tests/support/server.tcl @@ -238,6 +238,11 @@ proc tags_acceptable {tags err_return} { return 0 } + if {$::tcl_version < 8.6 && [lsearch $tags "ipv6"] >= 0} { + set err "TCL version is too low and does not support this" + return 0 + } + return 1 }