Skip to content

Commit 5e1ec66

Browse files
authored
Merge pull request #121 from hanxizh9910/feature/automated-test-failure-detector
Feature/automated test failure detector
2 parents e111ccf + 2b7e1d9 commit 5e1ec66

6 files changed

Lines changed: 114 additions & 129 deletions

File tree

.github/workflows/daily.yml

Lines changed: 110 additions & 109 deletions
Original file line numberDiff line numberDiff line change
@@ -620,108 +620,108 @@ jobs:
620620
uses: ./.github/actions/upload-test-failures
621621
with:
622622
job-name: ${{ github.job }}
623-
# test-ubuntu-io-threads:
624-
# runs-on: ubuntu-latest
625-
# if: |
626-
# (github.event_name == 'workflow_call' || github.event_name == 'workflow_dispatch' ||
627-
# (github.event_name == 'schedule' && github.repository == 'valkey-io/valkey') ||
628-
# (github.event_name == 'pull_request' &&
629-
# (github.event.pull_request.base.ref != 'unstable' ||
630-
# contains(github.event.pull_request.labels.*.name, 'run-extra-tests')) &&
631-
# (github.event.action != 'labeled' ||
632-
# (github.event.pull_request.base.ref == 'unstable' && github.event.label.name == 'run-extra-tests'))
633-
# )) &&
634-
# !contains(github.event.inputs.skipjobs, 'iothreads')
635-
# timeout-minutes: 1440
636-
# steps:
637-
# - name: prep
638-
# if: github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call'
639-
# run: |
640-
# echo "GITHUB_REPOSITORY=${{inputs.use_repo || github.event.inputs.use_repo}}" >> $GITHUB_ENV
641-
# echo "GITHUB_HEAD_REF=${{inputs.use_git_ref || github.event.inputs.use_git_ref}}" >> $GITHUB_ENV
642-
# echo "skipjobs: ${{github.event.inputs.skipjobs}}"
643-
# echo "skiptests: ${{github.event.inputs.skiptests}}"
644-
# echo "test_args: ${{github.event.inputs.test_args}}"
645-
# echo "cluster_test_args: ${{github.event.inputs.cluster_test_args}}"
646-
# - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
647-
# with:
648-
# repository: ${{ inputs.use_repo || github.event.inputs.use_repo || github.repository }}
649-
# ref: ${{ inputs.use_git_ref || github.event.inputs.use_git_ref || github.ref }}
650-
# - name: Install libbacktrace
651-
# uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
652-
# with:
653-
# repository: ianlancetaylor/libbacktrace
654-
# ref: b9e40069c0b47a722286b94eb5231f7f05c08713
655-
# path: libbacktrace
656-
# - run: cd libbacktrace && ./configure && make && sudo make install
657-
# - name: make
658-
# run: make SERVER_CFLAGS='-Werror' USE_LIBBACKTRACE=yes
659-
# - name: testprep
660-
# run: sudo apt-get install tcl8.6 tclx
661-
# - name: test
662-
# if: true && !contains(github.event.inputs.skiptests, 'valkey')
663-
# run: ./runtest --io-threads --accurate --failures-output test-failures/valkey.json --verbose --tags network --dump-logs ${{github.event.inputs.test_args}}
664-
# - name: cluster tests
665-
# if: true && !contains(github.event.inputs.skiptests, 'cluster')
666-
# run: ./runtest-cluster --failures-output test-failures/cluster.json --io-threads ${{github.event.inputs.cluster_test_args}}
667-
# - name: Upload test failures
668-
# if: always()
669-
# uses: ./.github/actions/upload-test-failures
670-
# with:
671-
# job-name: ${{ github.job }}
672-
# test-ubuntu-tls-io-threads:
673-
# runs-on: ubuntu-latest
674-
# if: |
675-
# (github.event_name == 'workflow_call' || github.event_name == 'workflow_dispatch' ||
676-
# (github.event_name == 'schedule' && github.repository == 'valkey-io/valkey') ||
677-
# (github.event_name == 'pull_request' &&
678-
# (github.event.pull_request.base.ref != 'unstable' ||
679-
# contains(github.event.pull_request.labels.*.name, 'run-extra-tests')) &&
680-
# (github.event.action != 'labeled' ||
681-
# (github.event.pull_request.base.ref == 'unstable' && github.event.label.name == 'run-extra-tests'))
682-
# )) &&
683-
# !contains(github.event.inputs.skipjobs, 'tls') && !contains(github.event.inputs.skipjobs, 'iothreads')
684-
# timeout-minutes: 1440
685-
# steps:
686-
# - name: prep
687-
# if: github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call'
688-
# run: |
689-
# echo "GITHUB_REPOSITORY=${{inputs.use_repo || github.event.inputs.use_repo}}" >> $GITHUB_ENV
690-
# echo "GITHUB_HEAD_REF=${{inputs.use_git_ref || github.event.inputs.use_git_ref}}" >> $GITHUB_ENV
691-
# echo "skipjobs: ${{github.event.inputs.skipjobs}}"
692-
# echo "skiptests: ${{github.event.inputs.skiptests}}"
693-
# echo "test_args: ${{github.event.inputs.test_args}}"
694-
# echo "cluster_test_args: ${{github.event.inputs.cluster_test_args}}"
695-
# - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
696-
# with:
697-
# repository: ${{ inputs.use_repo || github.event.inputs.use_repo || github.repository }}
698-
# ref: ${{ inputs.use_git_ref || github.event.inputs.use_git_ref || github.ref }}
699-
# - name: Install libbacktrace
700-
# uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
701-
# with:
702-
# repository: ianlancetaylor/libbacktrace
703-
# ref: b9e40069c0b47a722286b94eb5231f7f05c08713
704-
# path: libbacktrace
705-
# - run: cd libbacktrace && ./configure && make && sudo make install
706-
# - name: make
707-
# run: make BUILD_TLS=yes SERVER_CFLAGS='-Werror' USE_LIBBACKTRACE=yes
708-
# - name: testprep
709-
# run: |
710-
# sudo apt-get install tcl8.6 tclx tcl-tls
711-
# ./utils/gen-test-certs.sh
712-
# - name: test
713-
# if: true && !contains(github.event.inputs.skiptests, 'valkey')
714-
# run: |
715-
# ./runtest --io-threads --tls --accurate --failures-output test-failures/valkey.json --verbose --tags network --dump-logs ${{github.event.inputs.test_args}}
716-
# - name: cluster tests
717-
# if: true && !contains(github.event.inputs.skiptests, 'cluster')
718-
# run: |
719-
# ./runtest-cluster --failures-output test-failures/cluster.json --io-threads --tls ${{github.event.inputs.cluster_test_args}}
720-
# - name: Upload test failures
721-
# if: always()
722-
# uses: ./.github/actions/upload-test-failures
723-
# with:
724-
# job-name: ${{ github.job }}
623+
test-ubuntu-io-threads:
624+
runs-on: ubuntu-latest
625+
if: |
626+
(github.event_name == 'workflow_call' || github.event_name == 'workflow_dispatch' ||
627+
(github.event_name == 'schedule' && github.repository == 'valkey-io/valkey') ||
628+
(github.event_name == 'pull_request' &&
629+
(github.event.pull_request.base.ref != 'unstable' ||
630+
contains(github.event.pull_request.labels.*.name, 'run-extra-tests')) &&
631+
(github.event.action != 'labeled' ||
632+
(github.event.pull_request.base.ref == 'unstable' && github.event.label.name == 'run-extra-tests'))
633+
)) &&
634+
!contains(github.event.inputs.skipjobs, 'iothreads')
635+
timeout-minutes: 1440
636+
steps:
637+
- name: prep
638+
if: github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call'
639+
run: |
640+
echo "GITHUB_REPOSITORY=${{inputs.use_repo || github.event.inputs.use_repo}}" >> $GITHUB_ENV
641+
echo "GITHUB_HEAD_REF=${{inputs.use_git_ref || github.event.inputs.use_git_ref}}" >> $GITHUB_ENV
642+
echo "skipjobs: ${{github.event.inputs.skipjobs}}"
643+
echo "skiptests: ${{github.event.inputs.skiptests}}"
644+
echo "test_args: ${{github.event.inputs.test_args}}"
645+
echo "cluster_test_args: ${{github.event.inputs.cluster_test_args}}"
646+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
647+
with:
648+
repository: ${{ inputs.use_repo || github.event.inputs.use_repo || github.repository }}
649+
ref: ${{ inputs.use_git_ref || github.event.inputs.use_git_ref || github.ref }}
650+
- name: Install libbacktrace
651+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
652+
with:
653+
repository: ianlancetaylor/libbacktrace
654+
ref: b9e40069c0b47a722286b94eb5231f7f05c08713
655+
path: libbacktrace
656+
- run: cd libbacktrace && ./configure && make && sudo make install
657+
- name: make
658+
run: make SERVER_CFLAGS='-Werror' USE_LIBBACKTRACE=yes
659+
- name: testprep
660+
run: sudo apt-get install tcl8.6 tclx
661+
- name: test
662+
if: true && !contains(github.event.inputs.skiptests, 'valkey')
663+
run: ./runtest --io-threads --accurate --failures-output test-failures/valkey.json --verbose --tags network --dump-logs ${{github.event.inputs.test_args}}
664+
- name: cluster tests
665+
if: true && !contains(github.event.inputs.skiptests, 'cluster')
666+
run: ./runtest-cluster --failures-output test-failures/cluster.json --io-threads ${{github.event.inputs.cluster_test_args}}
667+
- name: Upload test failures
668+
if: always()
669+
uses: ./.github/actions/upload-test-failures
670+
with:
671+
job-name: ${{ github.job }}
672+
test-ubuntu-tls-io-threads:
673+
runs-on: ubuntu-latest
674+
if: |
675+
(github.event_name == 'workflow_call' || github.event_name == 'workflow_dispatch' ||
676+
(github.event_name == 'schedule' && github.repository == 'valkey-io/valkey') ||
677+
(github.event_name == 'pull_request' &&
678+
(github.event.pull_request.base.ref != 'unstable' ||
679+
contains(github.event.pull_request.labels.*.name, 'run-extra-tests')) &&
680+
(github.event.action != 'labeled' ||
681+
(github.event.pull_request.base.ref == 'unstable' && github.event.label.name == 'run-extra-tests'))
682+
)) &&
683+
!contains(github.event.inputs.skipjobs, 'tls') && !contains(github.event.inputs.skipjobs, 'iothreads')
684+
timeout-minutes: 1440
685+
steps:
686+
- name: prep
687+
if: github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call'
688+
run: |
689+
echo "GITHUB_REPOSITORY=${{inputs.use_repo || github.event.inputs.use_repo}}" >> $GITHUB_ENV
690+
echo "GITHUB_HEAD_REF=${{inputs.use_git_ref || github.event.inputs.use_git_ref}}" >> $GITHUB_ENV
691+
echo "skipjobs: ${{github.event.inputs.skipjobs}}"
692+
echo "skiptests: ${{github.event.inputs.skiptests}}"
693+
echo "test_args: ${{github.event.inputs.test_args}}"
694+
echo "cluster_test_args: ${{github.event.inputs.cluster_test_args}}"
695+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
696+
with:
697+
repository: ${{ inputs.use_repo || github.event.inputs.use_repo || github.repository }}
698+
ref: ${{ inputs.use_git_ref || github.event.inputs.use_git_ref || github.ref }}
699+
- name: Install libbacktrace
700+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
701+
with:
702+
repository: ianlancetaylor/libbacktrace
703+
ref: b9e40069c0b47a722286b94eb5231f7f05c08713
704+
path: libbacktrace
705+
- run: cd libbacktrace && ./configure && make && sudo make install
706+
- name: make
707+
run: make BUILD_TLS=yes SERVER_CFLAGS='-Werror' USE_LIBBACKTRACE=yes
708+
- name: testprep
709+
run: |
710+
sudo apt-get install tcl8.6 tclx tcl-tls
711+
./utils/gen-test-certs.sh
712+
- name: test
713+
if: true && !contains(github.event.inputs.skiptests, 'valkey')
714+
run: |
715+
./runtest --io-threads --tls --accurate --failures-output test-failures/valkey.json --verbose --tags network --dump-logs ${{github.event.inputs.test_args}}
716+
- name: cluster tests
717+
if: true && !contains(github.event.inputs.skiptests, 'cluster')
718+
run: |
719+
./runtest-cluster --failures-output test-failures/cluster.json --io-threads --tls ${{github.event.inputs.cluster_test_args}}
720+
- name: Upload test failures
721+
if: always()
722+
uses: ./.github/actions/upload-test-failures
723+
with:
724+
job-name: ${{ github.job }}
725725
test-ubuntu-reclaim-cache:
726726
runs-on: ubuntu-latest
727727
if: |
@@ -2068,9 +2068,10 @@ jobs:
20682068
job-name: ${{ github.job }}
20692069
consolidate-test-failures:
20702070
runs-on: ubuntu-latest
2071-
if: always()
2072-
# if: always() && (github.event_name != 'schedule' || github.repository == 'valkey-io/valkey')
2073-
permissions:
2071+
if: |
2072+
always() &&
2073+
(github.event_name == 'workflow_dispatch' ||
2074+
(github.event_name == 'schedule' && github.repository == 'valkey-io/valkey'))
20742075
actions: write
20752076
needs:
20762077
- test-ubuntu-jemalloc
@@ -2081,8 +2082,8 @@ jobs:
20812082
- test-ubuntu-32bit
20822083
- test-ubuntu-tls
20832084
- test-ubuntu-tls-no-tls
2084-
# - test-ubuntu-io-threads
2085-
# - test-ubuntu-tls-io-threads
2085+
- test-ubuntu-io-threads
2086+
- test-ubuntu-tls-io-threads
20862087
- test-valgrind-test
20872088
- test-valgrind-misc
20882089
- test-valgrind-no-malloc-usable-size-test
@@ -2181,8 +2182,8 @@ jobs:
21812182
- test-ubuntu-32bit
21822183
- test-ubuntu-tls
21832184
- test-ubuntu-tls-no-tls
2184-
# - test-ubuntu-io-threads
2185-
# - test-ubuntu-tls-io-threads
2185+
- test-ubuntu-io-threads
2186+
- test-ubuntu-tls-io-threads
21862187
- test-ubuntu-reclaim-cache
21872188
- test-valgrind-test
21882189
- test-valgrind-misc

.github/workflows/test-failure-detector.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ jobs:
1717
detect-test-failures:
1818
runs-on: ubuntu-latest
1919
if: >
20+
github.repository == 'valkey-io/valkey' &&
2021
(github.event.workflow_run.event == 'schedule' ||
2122
github.event.workflow_run.event == 'workflow_dispatch') &&
2223
github.event.workflow_run.conclusion != 'cancelled'

tests/sentinel/tests/00-base.tcl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ test "SENTINEL MYID return the sentinel instance ID" {
4646
test "SENTINEL INFO CACHE returns the cached info" {
4747
set res [S 0 SENTINEL INFO-CACHE mymaster]
4848
assert_morethan_equal [llength $res] 2
49-
assert_equal "mymasterr" [lindex $res 0]
49+
assert_equal "mymaster" [lindex $res 0]
5050

5151
set res [lindex $res 1]
5252
assert_morethan_equal [llength $res] 2

tests/unit/cluster/cli.tcl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ start_multiple_servers 3 [list overrides $base_conf] {
2424
127.0.0.1:[srv -2 port]
2525

2626
wait_for_condition 1000 50 {
27-
[CI 1 cluster_state] eq {okk} &&
27+
[CI 1 cluster_state] eq {ok} &&
2828
[CI 2 cluster_state] eq {ok}
2929
} else {
3030
fail "Cluster doesn't stabilize"

tests/unit/dummy-flaky.tcl

Lines changed: 0 additions & 17 deletions
This file was deleted.

tests/unit/moduleapi/auth.tcl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ start_server {tags {"modules"}} {
1414

1515
# Verify returned id is the same as our current id and
1616
# we are authenticated with the specified user
17-
assert_equal [r acl whoami] "globall"
17+
assert_equal [r acl whoami] "global"
1818
}
1919

2020
test {De-authenticating clients is tracked and kills clients} {

0 commit comments

Comments
 (0)