Squash changes for creating valkey-server
Signed-off-by: Madelyn Olson <madelyneolson@gmail.com>
This commit is contained in:
parent
d2c8a4b91e
commit
7ed24abe49
14
.github/workflows/ci.yml
vendored
14
.github/workflows/ci.yml
vendored
@ -11,7 +11,7 @@ jobs:
|
|||||||
- name: make
|
- name: make
|
||||||
# Fail build if there are warnings
|
# Fail build if there are warnings
|
||||||
# build with TLS just for compilation coverage
|
# build with TLS just for compilation coverage
|
||||||
run: make REDIS_CFLAGS='-Werror' BUILD_TLS=yes
|
run: make SERVER_CFLAGS='-Werror' BUILD_TLS=yes
|
||||||
- name: test
|
- name: test
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get install tcl8.6 tclx
|
sudo apt-get install tcl8.6 tclx
|
||||||
@ -31,7 +31,7 @@ jobs:
|
|||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- name: make
|
- name: make
|
||||||
# build with TLS module just for compilation coverage
|
# build with TLS module just for compilation coverage
|
||||||
run: make SANITIZER=address REDIS_CFLAGS='-Werror' BUILD_TLS=module
|
run: make SANITIZER=address SERVER_CFLAGS='-Werror' BUILD_TLS=module
|
||||||
- name: testprep
|
- name: testprep
|
||||||
run: sudo apt-get install tcl8.6 tclx -y
|
run: sudo apt-get install tcl8.6 tclx -y
|
||||||
- name: test
|
- name: test
|
||||||
@ -47,14 +47,14 @@ jobs:
|
|||||||
- name: make
|
- name: make
|
||||||
run: |
|
run: |
|
||||||
apt-get update && apt-get install -y build-essential
|
apt-get update && apt-get install -y build-essential
|
||||||
make REDIS_CFLAGS='-Werror'
|
make SERVER_CFLAGS='-Werror'
|
||||||
|
|
||||||
build-macos-latest:
|
build-macos-latest:
|
||||||
runs-on: macos-latest
|
runs-on: macos-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- name: make
|
- name: make
|
||||||
run: make REDIS_CFLAGS='-Werror'
|
run: make SERVER_CFLAGS='-Werror'
|
||||||
|
|
||||||
build-32bit:
|
build-32bit:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@ -63,14 +63,14 @@ jobs:
|
|||||||
- name: make
|
- name: make
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update && sudo apt-get install libc6-dev-i386
|
sudo apt-get update && sudo apt-get install libc6-dev-i386
|
||||||
make REDIS_CFLAGS='-Werror' 32bit
|
make SERVER_CFLAGS='-Werror' 32bit
|
||||||
|
|
||||||
build-libc-malloc:
|
build-libc-malloc:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- name: make
|
- name: make
|
||||||
run: make REDIS_CFLAGS='-Werror' MALLOC=libc
|
run: make SERVER_CFLAGS='-Werror' MALLOC=libc
|
||||||
|
|
||||||
build-centos7-jemalloc:
|
build-centos7-jemalloc:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@ -80,5 +80,5 @@ jobs:
|
|||||||
- name: make
|
- name: make
|
||||||
run: |
|
run: |
|
||||||
yum -y install gcc make
|
yum -y install gcc make
|
||||||
make REDIS_CFLAGS='-Werror'
|
make SERVER_CFLAGS='-Werror'
|
||||||
|
|
||||||
|
140
.github/workflows/daily.yml
vendored
140
.github/workflows/daily.yml
vendored
@ -23,7 +23,7 @@ on:
|
|||||||
default: ''
|
default: ''
|
||||||
use_repo:
|
use_repo:
|
||||||
description: 'repo owner and name'
|
description: 'repo owner and name'
|
||||||
default: 'redis/redis'
|
default: 'valkey-io/valkey'
|
||||||
use_git_ref:
|
use_git_ref:
|
||||||
description: 'git branch or sha to use'
|
description: 'git branch or sha to use'
|
||||||
default: 'unstable'
|
default: 'unstable'
|
||||||
@ -34,7 +34,7 @@ jobs:
|
|||||||
test-ubuntu-jemalloc:
|
test-ubuntu-jemalloc:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: |
|
if: |
|
||||||
(github.event_name == 'workflow_dispatch' || (github.event_name != 'workflow_dispatch' && github.repository == 'redis/redis')) &&
|
(github.event_name == 'workflow_dispatch' || (github.event_name != 'workflow_dispatch' && github.repository == 'valkey-io/valkey')) &&
|
||||||
!contains(github.event.inputs.skipjobs, 'ubuntu')
|
!contains(github.event.inputs.skipjobs, 'ubuntu')
|
||||||
timeout-minutes: 14400
|
timeout-minutes: 14400
|
||||||
steps:
|
steps:
|
||||||
@ -52,7 +52,7 @@ jobs:
|
|||||||
repository: ${{ env.GITHUB_REPOSITORY }}
|
repository: ${{ env.GITHUB_REPOSITORY }}
|
||||||
ref: ${{ env.GITHUB_HEAD_REF }}
|
ref: ${{ env.GITHUB_HEAD_REF }}
|
||||||
- name: make
|
- name: make
|
||||||
run: make REDIS_CFLAGS='-Werror -DREDIS_TEST'
|
run: make SERVER_CFLAGS='-Werror -DREDIS_TEST'
|
||||||
- name: testprep
|
- name: testprep
|
||||||
run: sudo apt-get install tcl8.6 tclx
|
run: sudo apt-get install tcl8.6 tclx
|
||||||
- name: test
|
- name: test
|
||||||
@ -69,12 +69,12 @@ jobs:
|
|||||||
run: ./runtest-cluster ${{github.event.inputs.cluster_test_args}}
|
run: ./runtest-cluster ${{github.event.inputs.cluster_test_args}}
|
||||||
- name: unittest
|
- name: unittest
|
||||||
if: true && !contains(github.event.inputs.skiptests, 'unittest')
|
if: true && !contains(github.event.inputs.skiptests, 'unittest')
|
||||||
run: ./src/redis-server test all --accurate
|
run: ./src/valkey-server test all --accurate
|
||||||
|
|
||||||
test-ubuntu-jemalloc-fortify:
|
test-ubuntu-jemalloc-fortify:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: |
|
if: |
|
||||||
(github.event_name == 'workflow_dispatch' || (github.event_name != 'workflow_dispatch' && github.repository == 'redis/redis')) &&
|
(github.event_name == 'workflow_dispatch' || (github.event_name != 'workflow_dispatch' && github.repository == 'valkey-io/valkey')) &&
|
||||||
!contains(github.event.inputs.skipjobs, 'fortify')
|
!contains(github.event.inputs.skipjobs, 'fortify')
|
||||||
container: ubuntu:lunar
|
container: ubuntu:lunar
|
||||||
timeout-minutes: 14400
|
timeout-minutes: 14400
|
||||||
@ -96,7 +96,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
apt-get update && apt-get install -y make gcc-13
|
apt-get update && apt-get install -y make gcc-13
|
||||||
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-13 100
|
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-13 100
|
||||||
make CC=gcc REDIS_CFLAGS='-Werror -DREDIS_TEST -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3'
|
make CC=gcc SERVER_CFLAGS='-Werror -DREDIS_TEST -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3'
|
||||||
- name: testprep
|
- name: testprep
|
||||||
run: apt-get install -y tcl8.6 tclx procps
|
run: apt-get install -y tcl8.6 tclx procps
|
||||||
- name: test
|
- name: test
|
||||||
@ -113,12 +113,12 @@ jobs:
|
|||||||
run: ./runtest-cluster ${{github.event.inputs.cluster_test_args}}
|
run: ./runtest-cluster ${{github.event.inputs.cluster_test_args}}
|
||||||
- name: unittest
|
- name: unittest
|
||||||
if: true && !contains(github.event.inputs.skiptests, 'unittest')
|
if: true && !contains(github.event.inputs.skiptests, 'unittest')
|
||||||
run: ./src/redis-server test all --accurate
|
run: ./src/valkey-server test all --accurate
|
||||||
|
|
||||||
test-ubuntu-libc-malloc:
|
test-ubuntu-libc-malloc:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: |
|
if: |
|
||||||
(github.event_name == 'workflow_dispatch' || (github.event_name != 'workflow_dispatch' && github.repository == 'redis/redis')) &&
|
(github.event_name == 'workflow_dispatch' || (github.event_name != 'workflow_dispatch' && github.repository == 'valkey-io/valkey')) &&
|
||||||
!contains(github.event.inputs.skipjobs, 'malloc')
|
!contains(github.event.inputs.skipjobs, 'malloc')
|
||||||
timeout-minutes: 14400
|
timeout-minutes: 14400
|
||||||
steps:
|
steps:
|
||||||
@ -136,7 +136,7 @@ jobs:
|
|||||||
repository: ${{ env.GITHUB_REPOSITORY }}
|
repository: ${{ env.GITHUB_REPOSITORY }}
|
||||||
ref: ${{ env.GITHUB_HEAD_REF }}
|
ref: ${{ env.GITHUB_HEAD_REF }}
|
||||||
- name: make
|
- name: make
|
||||||
run: make MALLOC=libc REDIS_CFLAGS='-Werror'
|
run: make MALLOC=libc SERVER_CFLAGS='-Werror'
|
||||||
- name: testprep
|
- name: testprep
|
||||||
run: sudo apt-get install tcl8.6 tclx
|
run: sudo apt-get install tcl8.6 tclx
|
||||||
- name: test
|
- name: test
|
||||||
@ -155,7 +155,7 @@ jobs:
|
|||||||
test-ubuntu-no-malloc-usable-size:
|
test-ubuntu-no-malloc-usable-size:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: |
|
if: |
|
||||||
(github.event_name == 'workflow_dispatch' || (github.event_name != 'workflow_dispatch' && github.repository == 'redis/redis')) &&
|
(github.event_name == 'workflow_dispatch' || (github.event_name != 'workflow_dispatch' && github.repository == 'valkey-io/valkey')) &&
|
||||||
!contains(github.event.inputs.skipjobs, 'malloc')
|
!contains(github.event.inputs.skipjobs, 'malloc')
|
||||||
timeout-minutes: 14400
|
timeout-minutes: 14400
|
||||||
steps:
|
steps:
|
||||||
@ -173,7 +173,7 @@ jobs:
|
|||||||
repository: ${{ env.GITHUB_REPOSITORY }}
|
repository: ${{ env.GITHUB_REPOSITORY }}
|
||||||
ref: ${{ env.GITHUB_HEAD_REF }}
|
ref: ${{ env.GITHUB_HEAD_REF }}
|
||||||
- name: make
|
- name: make
|
||||||
run: make MALLOC=libc CFLAGS=-DNO_MALLOC_USABLE_SIZE REDIS_CFLAGS='-Werror'
|
run: make MALLOC=libc CFLAGS=-DNO_MALLOC_USABLE_SIZE SERVER_CFLAGS='-Werror'
|
||||||
- name: testprep
|
- name: testprep
|
||||||
run: sudo apt-get install tcl8.6 tclx
|
run: sudo apt-get install tcl8.6 tclx
|
||||||
- name: test
|
- name: test
|
||||||
@ -192,7 +192,7 @@ jobs:
|
|||||||
test-ubuntu-32bit:
|
test-ubuntu-32bit:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: |
|
if: |
|
||||||
(github.event_name == 'workflow_dispatch' || (github.event_name != 'workflow_dispatch' && github.repository == 'redis/redis')) &&
|
(github.event_name == 'workflow_dispatch' || (github.event_name != 'workflow_dispatch' && github.repository == 'valkey-io/valkey')) &&
|
||||||
!contains(github.event.inputs.skipjobs, '32bit')
|
!contains(github.event.inputs.skipjobs, '32bit')
|
||||||
timeout-minutes: 14400
|
timeout-minutes: 14400
|
||||||
steps:
|
steps:
|
||||||
@ -212,7 +212,7 @@ jobs:
|
|||||||
- name: make
|
- name: make
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update && sudo apt-get install libc6-dev-i386
|
sudo apt-get update && sudo apt-get install libc6-dev-i386
|
||||||
make 32bit REDIS_CFLAGS='-Werror -DREDIS_TEST'
|
make 32bit SERVER_CFLAGS='-Werror -DREDIS_TEST'
|
||||||
- name: testprep
|
- name: testprep
|
||||||
run: sudo apt-get install tcl8.6 tclx
|
run: sudo apt-get install tcl8.6 tclx
|
||||||
- name: test
|
- name: test
|
||||||
@ -231,12 +231,12 @@ jobs:
|
|||||||
run: ./runtest-cluster ${{github.event.inputs.cluster_test_args}}
|
run: ./runtest-cluster ${{github.event.inputs.cluster_test_args}}
|
||||||
- name: unittest
|
- name: unittest
|
||||||
if: true && !contains(github.event.inputs.skiptests, 'unittest')
|
if: true && !contains(github.event.inputs.skiptests, 'unittest')
|
||||||
run: ./src/redis-server test all --accurate
|
run: ./src/valkey-server test all --accurate
|
||||||
|
|
||||||
test-ubuntu-tls:
|
test-ubuntu-tls:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: |
|
if: |
|
||||||
(github.event_name == 'workflow_dispatch' || (github.event_name != 'workflow_dispatch' && github.repository == 'redis/redis')) &&
|
(github.event_name == 'workflow_dispatch' || (github.event_name != 'workflow_dispatch' && github.repository == 'valkey-io/valkey')) &&
|
||||||
!contains(github.event.inputs.skipjobs, 'tls')
|
!contains(github.event.inputs.skipjobs, 'tls')
|
||||||
timeout-minutes: 14400
|
timeout-minutes: 14400
|
||||||
steps:
|
steps:
|
||||||
@ -255,7 +255,7 @@ jobs:
|
|||||||
ref: ${{ env.GITHUB_HEAD_REF }}
|
ref: ${{ env.GITHUB_HEAD_REF }}
|
||||||
- name: make
|
- name: make
|
||||||
run: |
|
run: |
|
||||||
make BUILD_TLS=yes REDIS_CFLAGS='-Werror'
|
make BUILD_TLS=yes SERVER_CFLAGS='-Werror'
|
||||||
- name: testprep
|
- name: testprep
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get install tcl8.6 tclx tcl-tls
|
sudo apt-get install tcl8.6 tclx tcl-tls
|
||||||
@ -280,7 +280,7 @@ jobs:
|
|||||||
test-ubuntu-tls-no-tls:
|
test-ubuntu-tls-no-tls:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: |
|
if: |
|
||||||
(github.event_name == 'workflow_dispatch' || (github.event_name != 'workflow_dispatch' && github.repository == 'redis/redis')) &&
|
(github.event_name == 'workflow_dispatch' || (github.event_name != 'workflow_dispatch' && github.repository == 'valkey-io/valkey')) &&
|
||||||
!contains(github.event.inputs.skipjobs, 'tls')
|
!contains(github.event.inputs.skipjobs, 'tls')
|
||||||
timeout-minutes: 14400
|
timeout-minutes: 14400
|
||||||
steps:
|
steps:
|
||||||
@ -299,7 +299,7 @@ jobs:
|
|||||||
ref: ${{ env.GITHUB_HEAD_REF }}
|
ref: ${{ env.GITHUB_HEAD_REF }}
|
||||||
- name: make
|
- name: make
|
||||||
run: |
|
run: |
|
||||||
make BUILD_TLS=yes REDIS_CFLAGS='-Werror'
|
make BUILD_TLS=yes SERVER_CFLAGS='-Werror'
|
||||||
- name: testprep
|
- name: testprep
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get install tcl8.6 tclx tcl-tls
|
sudo apt-get install tcl8.6 tclx tcl-tls
|
||||||
@ -324,7 +324,7 @@ jobs:
|
|||||||
test-ubuntu-io-threads:
|
test-ubuntu-io-threads:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: |
|
if: |
|
||||||
(github.event_name == 'workflow_dispatch' || (github.event_name != 'workflow_dispatch' && github.repository == 'redis/redis')) &&
|
(github.event_name == 'workflow_dispatch' || (github.event_name != 'workflow_dispatch' && github.repository == 'valkey-io/valkey')) &&
|
||||||
!contains(github.event.inputs.skipjobs, 'iothreads')
|
!contains(github.event.inputs.skipjobs, 'iothreads')
|
||||||
timeout-minutes: 14400
|
timeout-minutes: 14400
|
||||||
steps:
|
steps:
|
||||||
@ -343,7 +343,7 @@ jobs:
|
|||||||
ref: ${{ env.GITHUB_HEAD_REF }}
|
ref: ${{ env.GITHUB_HEAD_REF }}
|
||||||
- name: make
|
- name: make
|
||||||
run: |
|
run: |
|
||||||
make REDIS_CFLAGS='-Werror'
|
make SERVER_CFLAGS='-Werror'
|
||||||
- name: testprep
|
- name: testprep
|
||||||
run: sudo apt-get install tcl8.6 tclx
|
run: sudo apt-get install tcl8.6 tclx
|
||||||
- name: test
|
- name: test
|
||||||
@ -356,7 +356,7 @@ jobs:
|
|||||||
test-ubuntu-reclaim-cache:
|
test-ubuntu-reclaim-cache:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: |
|
if: |
|
||||||
(github.event_name == 'workflow_dispatch' || (github.event_name != 'workflow_dispatch' && github.repository == 'redis/redis')) &&
|
(github.event_name == 'workflow_dispatch' || (github.event_name != 'workflow_dispatch' && github.repository == 'valkey-io/valkey')) &&
|
||||||
!contains(github.event.inputs.skipjobs, 'specific')
|
!contains(github.event.inputs.skipjobs, 'specific')
|
||||||
timeout-minutes: 14400
|
timeout-minutes: 14400
|
||||||
steps:
|
steps:
|
||||||
@ -375,7 +375,7 @@ jobs:
|
|||||||
ref: ${{ env.GITHUB_HEAD_REF }}
|
ref: ${{ env.GITHUB_HEAD_REF }}
|
||||||
- name: make
|
- name: make
|
||||||
run: |
|
run: |
|
||||||
make REDIS_CFLAGS='-Werror'
|
make SERVER_CFLAGS='-Werror'
|
||||||
- name: testprep
|
- name: testprep
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get install vmtouch
|
sudo apt-get install vmtouch
|
||||||
@ -383,19 +383,19 @@ jobs:
|
|||||||
mkdir /tmp/slave
|
mkdir /tmp/slave
|
||||||
- name: warm up
|
- name: warm up
|
||||||
run: |
|
run: |
|
||||||
./src/redis-server --daemonize yes --logfile /dev/null
|
./src/valkey-server --daemonize yes --logfile /dev/null
|
||||||
./src/redis-benchmark -n 1 > /dev/null
|
./src/valkey-benchmark -n 1 > /dev/null
|
||||||
./src/redis-cli save | grep OK > /dev/null
|
./src/valkey-cli save | grep OK > /dev/null
|
||||||
vmtouch -v ./dump.rdb > /dev/null
|
vmtouch -v ./dump.rdb > /dev/null
|
||||||
- name: test
|
- name: test
|
||||||
run: |
|
run: |
|
||||||
echo "test SAVE doesn't increase cache"
|
echo "test SAVE doesn't increase cache"
|
||||||
CACHE0=$(grep -w file /sys/fs/cgroup/memory.stat | awk '{print $2}')
|
CACHE0=$(grep -w file /sys/fs/cgroup/memory.stat | awk '{print $2}')
|
||||||
echo "$CACHE0"
|
echo "$CACHE0"
|
||||||
./src/redis-server --daemonize yes --logfile /dev/null --dir /tmp/master --port 8080 --repl-diskless-sync no --pidfile /tmp/master/redis.pid --rdbcompression no --enable-debug-command yes
|
./src/valkey-server --daemonize yes --logfile /dev/null --dir /tmp/master --port 8080 --repl-diskless-sync no --pidfile /tmp/master/redis.pid --rdbcompression no --enable-debug-command yes
|
||||||
./src/redis-cli -p 8080 debug populate 10000 k 102400
|
./src/valkey-cli -p 8080 debug populate 10000 k 102400
|
||||||
./src/redis-server --daemonize yes --logfile /dev/null --dir /tmp/slave --port 8081 --repl-diskless-load disabled --rdbcompression no
|
./src/valkey-server --daemonize yes --logfile /dev/null --dir /tmp/slave --port 8081 --repl-diskless-load disabled --rdbcompression no
|
||||||
./src/redis-cli -p 8080 save > /dev/null
|
./src/valkey-cli -p 8080 save > /dev/null
|
||||||
VMOUT=$(vmtouch -v /tmp/master/dump.rdb)
|
VMOUT=$(vmtouch -v /tmp/master/dump.rdb)
|
||||||
echo $VMOUT
|
echo $VMOUT
|
||||||
grep -q " 0%" <<< $VMOUT
|
grep -q " 0%" <<< $VMOUT
|
||||||
@ -404,8 +404,8 @@ jobs:
|
|||||||
if [ "$(( $CACHE-$CACHE0 ))" -gt "8000000" ]; then exit 1; fi
|
if [ "$(( $CACHE-$CACHE0 ))" -gt "8000000" ]; then exit 1; fi
|
||||||
|
|
||||||
echo "test replication doesn't increase cache"
|
echo "test replication doesn't increase cache"
|
||||||
./src/redis-cli -p 8081 REPLICAOF 127.0.0.1 8080 > /dev/null
|
./src/valkey-cli -p 8081 REPLICAOF 127.0.0.1 8080 > /dev/null
|
||||||
while [ $(./src/redis-cli -p 8081 info replication | grep "master_link_status:down") ]; do sleep 1; done;
|
while [ $(./src/valkey-cli -p 8081 info replication | grep "master_link_status:down") ]; do sleep 1; done;
|
||||||
sleep 1 # wait for the completion of cache reclaim bio
|
sleep 1 # wait for the completion of cache reclaim bio
|
||||||
VMOUT=$(vmtouch -v /tmp/master/dump.rdb)
|
VMOUT=$(vmtouch -v /tmp/master/dump.rdb)
|
||||||
echo $VMOUT
|
echo $VMOUT
|
||||||
@ -421,8 +421,8 @@ jobs:
|
|||||||
PID=$(cat /tmp/master/redis.pid)
|
PID=$(cat /tmp/master/redis.pid)
|
||||||
kill -15 $PID
|
kill -15 $PID
|
||||||
while [ -x /proc/${PID} ]; do sleep 1; done
|
while [ -x /proc/${PID} ]; do sleep 1; done
|
||||||
./src/redis-server --daemonize yes --logfile /dev/null --dir /tmp/master --port 8080
|
./src/valkey-server --daemonize yes --logfile /dev/null --dir /tmp/master --port 8080
|
||||||
while [ $(./src/redis-cli -p 8080 info persistence | grep "loading:1") ]; do sleep 1; done;
|
while [ $(./src/valkey-cli -p 8080 info persistence | grep "loading:1") ]; do sleep 1; done;
|
||||||
sleep 1 # wait for the completion of cache reclaim bio
|
sleep 1 # wait for the completion of cache reclaim bio
|
||||||
VMOUT=$(vmtouch -v /tmp/master/dump.rdb)
|
VMOUT=$(vmtouch -v /tmp/master/dump.rdb)
|
||||||
echo $VMOUT
|
echo $VMOUT
|
||||||
@ -434,7 +434,7 @@ jobs:
|
|||||||
test-valgrind-test:
|
test-valgrind-test:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: |
|
if: |
|
||||||
(github.event_name == 'workflow_dispatch' || (github.event_name != 'workflow_dispatch' && github.repository == 'redis/redis')) &&
|
(github.event_name == 'workflow_dispatch' || (github.event_name != 'workflow_dispatch' && github.repository == 'valkey-io/valkey')) &&
|
||||||
!contains(github.event.inputs.skipjobs, 'valgrind') && !contains(github.event.inputs.skiptests, 'redis')
|
!contains(github.event.inputs.skipjobs, 'valgrind') && !contains(github.event.inputs.skiptests, 'redis')
|
||||||
timeout-minutes: 14400
|
timeout-minutes: 14400
|
||||||
steps:
|
steps:
|
||||||
@ -452,7 +452,7 @@ jobs:
|
|||||||
repository: ${{ env.GITHUB_REPOSITORY }}
|
repository: ${{ env.GITHUB_REPOSITORY }}
|
||||||
ref: ${{ env.GITHUB_HEAD_REF }}
|
ref: ${{ env.GITHUB_HEAD_REF }}
|
||||||
- name: make
|
- name: make
|
||||||
run: make valgrind REDIS_CFLAGS='-Werror -DREDIS_TEST'
|
run: make valgrind SERVER_CFLAGS='-Werror -DREDIS_TEST'
|
||||||
- name: testprep
|
- name: testprep
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
@ -464,7 +464,7 @@ jobs:
|
|||||||
test-valgrind-misc:
|
test-valgrind-misc:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: |
|
if: |
|
||||||
(github.event_name == 'workflow_dispatch' || (github.event_name != 'workflow_dispatch' && github.repository == 'redis/redis')) &&
|
(github.event_name == 'workflow_dispatch' || (github.event_name != 'workflow_dispatch' && github.repository == 'valkey-io/valkey')) &&
|
||||||
!contains(github.event.inputs.skipjobs, 'valgrind') && !(contains(github.event.inputs.skiptests, 'modules') && contains(github.event.inputs.skiptests, 'unittest'))
|
!contains(github.event.inputs.skipjobs, 'valgrind') && !(contains(github.event.inputs.skiptests, 'modules') && contains(github.event.inputs.skiptests, 'unittest'))
|
||||||
timeout-minutes: 14400
|
timeout-minutes: 14400
|
||||||
steps:
|
steps:
|
||||||
@ -482,7 +482,7 @@ jobs:
|
|||||||
repository: ${{ env.GITHUB_REPOSITORY }}
|
repository: ${{ env.GITHUB_REPOSITORY }}
|
||||||
ref: ${{ env.GITHUB_HEAD_REF }}
|
ref: ${{ env.GITHUB_HEAD_REF }}
|
||||||
- name: make
|
- name: make
|
||||||
run: make valgrind REDIS_CFLAGS='-Werror -DREDIS_TEST'
|
run: make valgrind SERVER_CFLAGS='-Werror -DREDIS_TEST'
|
||||||
- name: testprep
|
- name: testprep
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
@ -493,13 +493,13 @@ jobs:
|
|||||||
- name: unittest
|
- name: unittest
|
||||||
if: true && !contains(github.event.inputs.skiptests, 'unittest')
|
if: true && !contains(github.event.inputs.skiptests, 'unittest')
|
||||||
run: |
|
run: |
|
||||||
valgrind --track-origins=yes --suppressions=./src/valgrind.sup --show-reachable=no --show-possibly-lost=no --leak-check=full --log-file=err.txt ./src/redis-server test all --valgrind
|
valgrind --track-origins=yes --suppressions=./src/valgrind.sup --show-reachable=no --show-possibly-lost=no --leak-check=full --log-file=err.txt ./src/valkey-server test all --valgrind
|
||||||
if grep -q 0x err.txt; then cat err.txt; exit 1; fi
|
if grep -q 0x err.txt; then cat err.txt; exit 1; fi
|
||||||
|
|
||||||
test-valgrind-no-malloc-usable-size-test:
|
test-valgrind-no-malloc-usable-size-test:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: |
|
if: |
|
||||||
(github.event_name == 'workflow_dispatch' || (github.event_name != 'workflow_dispatch' && github.repository == 'redis/redis')) &&
|
(github.event_name == 'workflow_dispatch' || (github.event_name != 'workflow_dispatch' && github.repository == 'valkey-io/valkey')) &&
|
||||||
!contains(github.event.inputs.skipjobs, 'valgrind') && !contains(github.event.inputs.skiptests, 'redis')
|
!contains(github.event.inputs.skipjobs, 'valgrind') && !contains(github.event.inputs.skiptests, 'redis')
|
||||||
timeout-minutes: 14400
|
timeout-minutes: 14400
|
||||||
steps:
|
steps:
|
||||||
@ -517,7 +517,7 @@ jobs:
|
|||||||
repository: ${{ env.GITHUB_REPOSITORY }}
|
repository: ${{ env.GITHUB_REPOSITORY }}
|
||||||
ref: ${{ env.GITHUB_HEAD_REF }}
|
ref: ${{ env.GITHUB_HEAD_REF }}
|
||||||
- name: make
|
- name: make
|
||||||
run: make valgrind CFLAGS="-DNO_MALLOC_USABLE_SIZE -DREDIS_TEST" REDIS_CFLAGS='-Werror'
|
run: make valgrind CFLAGS="-DNO_MALLOC_USABLE_SIZE -DREDIS_TEST" SERVER_CFLAGS='-Werror'
|
||||||
- name: testprep
|
- name: testprep
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
@ -529,7 +529,7 @@ jobs:
|
|||||||
test-valgrind-no-malloc-usable-size-misc:
|
test-valgrind-no-malloc-usable-size-misc:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: |
|
if: |
|
||||||
(github.event_name == 'workflow_dispatch' || (github.event_name != 'workflow_dispatch' && github.repository == 'redis/redis')) &&
|
(github.event_name == 'workflow_dispatch' || (github.event_name != 'workflow_dispatch' && github.repository == 'valkey-io/valkey')) &&
|
||||||
!contains(github.event.inputs.skipjobs, 'valgrind') && !(contains(github.event.inputs.skiptests, 'modules') && contains(github.event.inputs.skiptests, 'unittest'))
|
!contains(github.event.inputs.skipjobs, 'valgrind') && !(contains(github.event.inputs.skiptests, 'modules') && contains(github.event.inputs.skiptests, 'unittest'))
|
||||||
timeout-minutes: 14400
|
timeout-minutes: 14400
|
||||||
steps:
|
steps:
|
||||||
@ -547,7 +547,7 @@ jobs:
|
|||||||
repository: ${{ env.GITHUB_REPOSITORY }}
|
repository: ${{ env.GITHUB_REPOSITORY }}
|
||||||
ref: ${{ env.GITHUB_HEAD_REF }}
|
ref: ${{ env.GITHUB_HEAD_REF }}
|
||||||
- name: make
|
- name: make
|
||||||
run: make valgrind CFLAGS="-DNO_MALLOC_USABLE_SIZE -DREDIS_TEST" REDIS_CFLAGS='-Werror'
|
run: make valgrind CFLAGS="-DNO_MALLOC_USABLE_SIZE -DREDIS_TEST" SERVER_CFLAGS='-Werror'
|
||||||
- name: testprep
|
- name: testprep
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
@ -558,13 +558,13 @@ jobs:
|
|||||||
- name: unittest
|
- name: unittest
|
||||||
if: true && !contains(github.event.inputs.skiptests, 'unittest')
|
if: true && !contains(github.event.inputs.skiptests, 'unittest')
|
||||||
run: |
|
run: |
|
||||||
valgrind --track-origins=yes --suppressions=./src/valgrind.sup --show-reachable=no --show-possibly-lost=no --leak-check=full --log-file=err.txt ./src/redis-server test all --valgrind
|
valgrind --track-origins=yes --suppressions=./src/valgrind.sup --show-reachable=no --show-possibly-lost=no --leak-check=full --log-file=err.txt ./src/valkey-server test all --valgrind
|
||||||
if grep -q 0x err.txt; then cat err.txt; exit 1; fi
|
if grep -q 0x err.txt; then cat err.txt; exit 1; fi
|
||||||
|
|
||||||
test-sanitizer-address:
|
test-sanitizer-address:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: |
|
if: |
|
||||||
(github.event_name == 'workflow_dispatch' || (github.event_name != 'workflow_dispatch' && github.repository == 'redis/redis')) &&
|
(github.event_name == 'workflow_dispatch' || (github.event_name != 'workflow_dispatch' && github.repository == 'valkey-io/valkey')) &&
|
||||||
!contains(github.event.inputs.skipjobs, 'sanitizer')
|
!contains(github.event.inputs.skipjobs, 'sanitizer')
|
||||||
timeout-minutes: 14400
|
timeout-minutes: 14400
|
||||||
strategy:
|
strategy:
|
||||||
@ -587,7 +587,7 @@ jobs:
|
|||||||
repository: ${{ env.GITHUB_REPOSITORY }}
|
repository: ${{ env.GITHUB_REPOSITORY }}
|
||||||
ref: ${{ env.GITHUB_HEAD_REF }}
|
ref: ${{ env.GITHUB_HEAD_REF }}
|
||||||
- name: make
|
- name: make
|
||||||
run: make SANITIZER=address REDIS_CFLAGS='-DREDIS_TEST -Werror'
|
run: make SANITIZER=address SERVER_CFLAGS='-DREDIS_TEST -Werror'
|
||||||
- name: testprep
|
- name: testprep
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
@ -606,12 +606,12 @@ jobs:
|
|||||||
run: ./runtest-cluster ${{github.event.inputs.cluster_test_args}}
|
run: ./runtest-cluster ${{github.event.inputs.cluster_test_args}}
|
||||||
- name: unittest
|
- name: unittest
|
||||||
if: true && !contains(github.event.inputs.skiptests, 'unittest')
|
if: true && !contains(github.event.inputs.skiptests, 'unittest')
|
||||||
run: ./src/redis-server test all
|
run: ./src/valkey-server test all
|
||||||
|
|
||||||
test-sanitizer-undefined:
|
test-sanitizer-undefined:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: |
|
if: |
|
||||||
(github.event_name == 'workflow_dispatch' || (github.event_name != 'workflow_dispatch' && github.repository == 'redis/redis')) &&
|
(github.event_name == 'workflow_dispatch' || (github.event_name != 'workflow_dispatch' && github.repository == 'valkey-io/valkey')) &&
|
||||||
!contains(github.event.inputs.skipjobs, 'sanitizer')
|
!contains(github.event.inputs.skipjobs, 'sanitizer')
|
||||||
timeout-minutes: 14400
|
timeout-minutes: 14400
|
||||||
strategy:
|
strategy:
|
||||||
@ -634,7 +634,7 @@ jobs:
|
|||||||
repository: ${{ env.GITHUB_REPOSITORY }}
|
repository: ${{ env.GITHUB_REPOSITORY }}
|
||||||
ref: ${{ env.GITHUB_HEAD_REF }}
|
ref: ${{ env.GITHUB_HEAD_REF }}
|
||||||
- name: make
|
- name: make
|
||||||
run: make SANITIZER=undefined REDIS_CFLAGS='-DREDIS_TEST -Werror' LUA_DEBUG=yes # we (ab)use this flow to also check Lua C API violations
|
run: make SANITIZER=undefined SERVER_CFLAGS='-DREDIS_TEST -Werror' LUA_DEBUG=yes # we (ab)use this flow to also check Lua C API violations
|
||||||
- name: testprep
|
- name: testprep
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
@ -653,12 +653,12 @@ jobs:
|
|||||||
run: ./runtest-cluster ${{github.event.inputs.cluster_test_args}}
|
run: ./runtest-cluster ${{github.event.inputs.cluster_test_args}}
|
||||||
- name: unittest
|
- name: unittest
|
||||||
if: true && !contains(github.event.inputs.skiptests, 'unittest')
|
if: true && !contains(github.event.inputs.skiptests, 'unittest')
|
||||||
run: ./src/redis-server test all --accurate
|
run: ./src/valkey-server test all --accurate
|
||||||
|
|
||||||
test-centos7-jemalloc:
|
test-centos7-jemalloc:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: |
|
if: |
|
||||||
(github.event_name == 'workflow_dispatch' || (github.event_name != 'workflow_dispatch' && github.repository == 'redis/redis')) &&
|
(github.event_name == 'workflow_dispatch' || (github.event_name != 'workflow_dispatch' && github.repository == 'valkey-io/valkey')) &&
|
||||||
!contains(github.event.inputs.skipjobs, 'centos')
|
!contains(github.event.inputs.skipjobs, 'centos')
|
||||||
container: centos:7
|
container: centos:7
|
||||||
timeout-minutes: 14400
|
timeout-minutes: 14400
|
||||||
@ -679,7 +679,7 @@ jobs:
|
|||||||
- name: make
|
- name: make
|
||||||
run: |
|
run: |
|
||||||
yum -y install gcc make
|
yum -y install gcc make
|
||||||
make REDIS_CFLAGS='-Werror'
|
make SERVER_CFLAGS='-Werror'
|
||||||
- name: testprep
|
- name: testprep
|
||||||
run: yum -y install which tcl tclx
|
run: yum -y install which tcl tclx
|
||||||
- name: test
|
- name: test
|
||||||
@ -698,7 +698,7 @@ jobs:
|
|||||||
test-centos7-tls-module:
|
test-centos7-tls-module:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: |
|
if: |
|
||||||
(github.event_name == 'workflow_dispatch' || (github.event_name != 'workflow_dispatch' && github.repository == 'redis/redis')) &&
|
(github.event_name == 'workflow_dispatch' || (github.event_name != 'workflow_dispatch' && github.repository == 'valkey-io/valkey')) &&
|
||||||
!contains(github.event.inputs.skipjobs, 'tls')
|
!contains(github.event.inputs.skipjobs, 'tls')
|
||||||
container: centos:7
|
container: centos:7
|
||||||
timeout-minutes: 14400
|
timeout-minutes: 14400
|
||||||
@ -720,7 +720,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
yum -y install centos-release-scl epel-release
|
yum -y install centos-release-scl epel-release
|
||||||
yum -y install devtoolset-7 openssl-devel openssl
|
yum -y install devtoolset-7 openssl-devel openssl
|
||||||
scl enable devtoolset-7 "make BUILD_TLS=module REDIS_CFLAGS='-Werror'"
|
scl enable devtoolset-7 "make BUILD_TLS=module SERVER_CFLAGS='-Werror'"
|
||||||
- name: testprep
|
- name: testprep
|
||||||
run: |
|
run: |
|
||||||
yum -y install tcl tcltls tclx
|
yum -y install tcl tcltls tclx
|
||||||
@ -745,7 +745,7 @@ jobs:
|
|||||||
test-centos7-tls-module-no-tls:
|
test-centos7-tls-module-no-tls:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: |
|
if: |
|
||||||
(github.event_name == 'workflow_dispatch' || (github.event_name != 'workflow_dispatch' && github.repository == 'redis/redis')) &&
|
(github.event_name == 'workflow_dispatch' || (github.event_name != 'workflow_dispatch' && github.repository == 'valkey-io/valkey')) &&
|
||||||
!contains(github.event.inputs.skipjobs, 'tls')
|
!contains(github.event.inputs.skipjobs, 'tls')
|
||||||
container: centos:7
|
container: centos:7
|
||||||
timeout-minutes: 14400
|
timeout-minutes: 14400
|
||||||
@ -767,7 +767,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
yum -y install centos-release-scl epel-release
|
yum -y install centos-release-scl epel-release
|
||||||
yum -y install devtoolset-7 openssl-devel openssl
|
yum -y install devtoolset-7 openssl-devel openssl
|
||||||
scl enable devtoolset-7 "make BUILD_TLS=module REDIS_CFLAGS='-Werror'"
|
scl enable devtoolset-7 "make BUILD_TLS=module SERVER_CFLAGS='-Werror'"
|
||||||
- name: testprep
|
- name: testprep
|
||||||
run: |
|
run: |
|
||||||
yum -y install tcl tcltls tclx
|
yum -y install tcl tcltls tclx
|
||||||
@ -792,7 +792,7 @@ jobs:
|
|||||||
test-macos-latest:
|
test-macos-latest:
|
||||||
runs-on: macos-latest
|
runs-on: macos-latest
|
||||||
if: |
|
if: |
|
||||||
(github.event_name == 'workflow_dispatch' || (github.event_name != 'workflow_dispatch' && github.repository == 'redis/redis')) &&
|
(github.event_name == 'workflow_dispatch' || (github.event_name != 'workflow_dispatch' && github.repository == 'valkey-io/valkey')) &&
|
||||||
!contains(github.event.inputs.skipjobs, 'macos') && !(contains(github.event.inputs.skiptests, 'redis') && contains(github.event.inputs.skiptests, 'modules'))
|
!contains(github.event.inputs.skipjobs, 'macos') && !(contains(github.event.inputs.skiptests, 'redis') && contains(github.event.inputs.skiptests, 'modules'))
|
||||||
timeout-minutes: 14400
|
timeout-minutes: 14400
|
||||||
steps:
|
steps:
|
||||||
@ -810,7 +810,7 @@ jobs:
|
|||||||
repository: ${{ env.GITHUB_REPOSITORY }}
|
repository: ${{ env.GITHUB_REPOSITORY }}
|
||||||
ref: ${{ env.GITHUB_HEAD_REF }}
|
ref: ${{ env.GITHUB_HEAD_REF }}
|
||||||
- name: make
|
- name: make
|
||||||
run: make REDIS_CFLAGS='-Werror'
|
run: make SERVER_CFLAGS='-Werror'
|
||||||
- name: test
|
- name: test
|
||||||
if: true && !contains(github.event.inputs.skiptests, 'redis')
|
if: true && !contains(github.event.inputs.skiptests, 'redis')
|
||||||
run: ./runtest --accurate --verbose --verbose --clients 1 --no-latency --dump-logs ${{github.event.inputs.test_args}}
|
run: ./runtest --accurate --verbose --verbose --clients 1 --no-latency --dump-logs ${{github.event.inputs.test_args}}
|
||||||
@ -821,7 +821,7 @@ jobs:
|
|||||||
test-macos-latest-sentinel:
|
test-macos-latest-sentinel:
|
||||||
runs-on: macos-latest
|
runs-on: macos-latest
|
||||||
if: |
|
if: |
|
||||||
(github.event_name == 'workflow_dispatch' || (github.event_name != 'workflow_dispatch' && github.repository == 'redis/redis')) &&
|
(github.event_name == 'workflow_dispatch' || (github.event_name != 'workflow_dispatch' && github.repository == 'valkey-io/valkey')) &&
|
||||||
!contains(github.event.inputs.skipjobs, 'macos') && !contains(github.event.inputs.skiptests, 'sentinel')
|
!contains(github.event.inputs.skipjobs, 'macos') && !contains(github.event.inputs.skiptests, 'sentinel')
|
||||||
timeout-minutes: 14400
|
timeout-minutes: 14400
|
||||||
steps:
|
steps:
|
||||||
@ -839,7 +839,7 @@ jobs:
|
|||||||
repository: ${{ env.GITHUB_REPOSITORY }}
|
repository: ${{ env.GITHUB_REPOSITORY }}
|
||||||
ref: ${{ env.GITHUB_HEAD_REF }}
|
ref: ${{ env.GITHUB_HEAD_REF }}
|
||||||
- name: make
|
- name: make
|
||||||
run: make REDIS_CFLAGS='-Werror'
|
run: make SERVER_CFLAGS='-Werror'
|
||||||
- name: sentinel tests
|
- name: sentinel tests
|
||||||
if: true && !contains(github.event.inputs.skiptests, 'sentinel')
|
if: true && !contains(github.event.inputs.skiptests, 'sentinel')
|
||||||
run: ./runtest-sentinel ${{github.event.inputs.cluster_test_args}}
|
run: ./runtest-sentinel ${{github.event.inputs.cluster_test_args}}
|
||||||
@ -847,7 +847,7 @@ jobs:
|
|||||||
test-macos-latest-cluster:
|
test-macos-latest-cluster:
|
||||||
runs-on: macos-latest
|
runs-on: macos-latest
|
||||||
if: |
|
if: |
|
||||||
(github.event_name == 'workflow_dispatch' || (github.event_name != 'workflow_dispatch' && github.repository == 'redis/redis')) &&
|
(github.event_name == 'workflow_dispatch' || (github.event_name != 'workflow_dispatch' && github.repository == 'valkey-io/valkey')) &&
|
||||||
!contains(github.event.inputs.skipjobs, 'macos') && !contains(github.event.inputs.skiptests, 'cluster')
|
!contains(github.event.inputs.skipjobs, 'macos') && !contains(github.event.inputs.skiptests, 'cluster')
|
||||||
timeout-minutes: 14400
|
timeout-minutes: 14400
|
||||||
steps:
|
steps:
|
||||||
@ -865,7 +865,7 @@ jobs:
|
|||||||
repository: ${{ env.GITHUB_REPOSITORY }}
|
repository: ${{ env.GITHUB_REPOSITORY }}
|
||||||
ref: ${{ env.GITHUB_HEAD_REF }}
|
ref: ${{ env.GITHUB_HEAD_REF }}
|
||||||
- name: make
|
- name: make
|
||||||
run: make REDIS_CFLAGS='-Werror'
|
run: make SERVER_CFLAGS='-Werror'
|
||||||
- name: cluster tests
|
- name: cluster tests
|
||||||
if: true && !contains(github.event.inputs.skiptests, 'cluster')
|
if: true && !contains(github.event.inputs.skiptests, 'cluster')
|
||||||
run: ./runtest-cluster ${{github.event.inputs.cluster_test_args}}
|
run: ./runtest-cluster ${{github.event.inputs.cluster_test_args}}
|
||||||
@ -873,7 +873,7 @@ jobs:
|
|||||||
test-freebsd:
|
test-freebsd:
|
||||||
runs-on: macos-12
|
runs-on: macos-12
|
||||||
if: |
|
if: |
|
||||||
(github.event_name == 'workflow_dispatch' || (github.event_name != 'workflow_dispatch' && github.repository == 'redis/redis')) &&
|
(github.event_name == 'workflow_dispatch' || (github.event_name != 'workflow_dispatch' && github.repository == 'valkey-io/valkey')) &&
|
||||||
!contains(github.event.inputs.skipjobs, 'freebsd') && !(contains(github.event.inputs.skiptests, 'redis') && contains(github.event.inputs.skiptests, 'modules'))
|
!contains(github.event.inputs.skipjobs, 'freebsd') && !(contains(github.event.inputs.skiptests, 'redis') && contains(github.event.inputs.skiptests, 'modules'))
|
||||||
timeout-minutes: 14400
|
timeout-minutes: 14400
|
||||||
steps:
|
steps:
|
||||||
@ -905,7 +905,7 @@ jobs:
|
|||||||
test-freebsd-sentinel:
|
test-freebsd-sentinel:
|
||||||
runs-on: macos-12
|
runs-on: macos-12
|
||||||
if: |
|
if: |
|
||||||
(github.event_name == 'workflow_dispatch' || (github.event_name != 'workflow_dispatch' && github.repository == 'redis/redis')) &&
|
(github.event_name == 'workflow_dispatch' || (github.event_name != 'workflow_dispatch' && github.repository == 'valkey-io/valkey')) &&
|
||||||
!contains(github.event.inputs.skipjobs, 'freebsd') && !contains(github.event.inputs.skiptests, 'sentinel')
|
!contains(github.event.inputs.skipjobs, 'freebsd') && !contains(github.event.inputs.skiptests, 'sentinel')
|
||||||
timeout-minutes: 14400
|
timeout-minutes: 14400
|
||||||
steps:
|
steps:
|
||||||
@ -936,7 +936,7 @@ jobs:
|
|||||||
test-freebsd-cluster:
|
test-freebsd-cluster:
|
||||||
runs-on: macos-12
|
runs-on: macos-12
|
||||||
if: |
|
if: |
|
||||||
(github.event_name == 'workflow_dispatch' || (github.event_name != 'workflow_dispatch' && github.repository == 'redis/redis')) &&
|
(github.event_name == 'workflow_dispatch' || (github.event_name != 'workflow_dispatch' && github.repository == 'valkey-io/valkey')) &&
|
||||||
!contains(github.event.inputs.skipjobs, 'freebsd') && !contains(github.event.inputs.skiptests, 'cluster')
|
!contains(github.event.inputs.skipjobs, 'freebsd') && !contains(github.event.inputs.skiptests, 'cluster')
|
||||||
timeout-minutes: 14400
|
timeout-minutes: 14400
|
||||||
steps:
|
steps:
|
||||||
@ -967,7 +967,7 @@ jobs:
|
|||||||
test-alpine-jemalloc:
|
test-alpine-jemalloc:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: |
|
if: |
|
||||||
(github.event_name == 'workflow_dispatch' || (github.event_name != 'workflow_dispatch' && github.repository == 'redis/redis')) &&
|
(github.event_name == 'workflow_dispatch' || (github.event_name != 'workflow_dispatch' && github.repository == 'valkey-io/valkey')) &&
|
||||||
!contains(github.event.inputs.skipjobs, 'alpine')
|
!contains(github.event.inputs.skipjobs, 'alpine')
|
||||||
container: alpine:latest
|
container: alpine:latest
|
||||||
steps:
|
steps:
|
||||||
@ -987,7 +987,7 @@ jobs:
|
|||||||
- name: make
|
- name: make
|
||||||
run: |
|
run: |
|
||||||
apk add build-base
|
apk add build-base
|
||||||
make REDIS_CFLAGS='-Werror'
|
make SERVER_CFLAGS='-Werror'
|
||||||
- name: testprep
|
- name: testprep
|
||||||
run: apk add tcl procps tclx
|
run: apk add tcl procps tclx
|
||||||
- name: test
|
- name: test
|
||||||
@ -1006,7 +1006,7 @@ jobs:
|
|||||||
test-alpine-libc-malloc:
|
test-alpine-libc-malloc:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: |
|
if: |
|
||||||
(github.event_name == 'workflow_dispatch' || (github.event_name != 'workflow_dispatch' && github.repository == 'redis/redis')) &&
|
(github.event_name == 'workflow_dispatch' || (github.event_name != 'workflow_dispatch' && github.repository == 'valkey-io/valkey')) &&
|
||||||
!contains(github.event.inputs.skipjobs, 'alpine')
|
!contains(github.event.inputs.skipjobs, 'alpine')
|
||||||
container: alpine:latest
|
container: alpine:latest
|
||||||
steps:
|
steps:
|
||||||
@ -1026,7 +1026,7 @@ jobs:
|
|||||||
- name: make
|
- name: make
|
||||||
run: |
|
run: |
|
||||||
apk add build-base
|
apk add build-base
|
||||||
make REDIS_CFLAGS='-Werror' USE_JEMALLOC=no CFLAGS=-DUSE_MALLOC_USABLE_SIZE
|
make SERVER_CFLAGS='-Werror' USE_JEMALLOC=no CFLAGS=-DUSE_MALLOC_USABLE_SIZE
|
||||||
- name: testprep
|
- name: testprep
|
||||||
run: apk add tcl procps tclx
|
run: apk add tcl procps tclx
|
||||||
- name: test
|
- name: test
|
||||||
@ -1046,7 +1046,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
timeout-minutes: 14400
|
timeout-minutes: 14400
|
||||||
if: |
|
if: |
|
||||||
(github.event_name == 'workflow_dispatch' || (github.event_name != 'workflow_dispatch' && github.repository == 'redis/redis')) &&
|
(github.event_name == 'workflow_dispatch' || (github.event_name != 'workflow_dispatch' && github.repository == 'valkey-io/valkey')) &&
|
||||||
!contains(github.event.inputs.skipjobs, 'reply-schema')
|
!contains(github.event.inputs.skipjobs, 'reply-schema')
|
||||||
steps:
|
steps:
|
||||||
- name: prep
|
- name: prep
|
||||||
@ -1063,7 +1063,7 @@ jobs:
|
|||||||
repository: ${{ env.GITHUB_REPOSITORY }}
|
repository: ${{ env.GITHUB_REPOSITORY }}
|
||||||
ref: ${{ env.GITHUB_HEAD_REF }}
|
ref: ${{ env.GITHUB_HEAD_REF }}
|
||||||
- name: make
|
- name: make
|
||||||
run: make REDIS_CFLAGS='-Werror -DLOG_REQ_RES'
|
run: make SERVER_CFLAGS='-Werror -DLOG_REQ_RES'
|
||||||
- name: testprep
|
- name: testprep
|
||||||
run: sudo apt-get install tcl8.6 tclx
|
run: sudo apt-get install tcl8.6 tclx
|
||||||
- name: test
|
- name: test
|
||||||
|
59
.github/workflows/external.yml
vendored
59
.github/workflows/external.yml
vendored
@ -1,82 +1,85 @@
|
|||||||
name: External Server Tests
|
name: External Server Tests
|
||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
push:
|
push:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '0 0 * * *'
|
- cron: '0 0 * * *'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test-external-standalone:
|
test-external-standalone:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: github.event_name != 'schedule' || github.repository == 'redis/redis'
|
if: github.event_name != 'schedule' || github.repository == 'valkey-io/valkey'
|
||||||
timeout-minutes: 14400
|
timeout-minutes: 14400
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- name: Build
|
- name: Build
|
||||||
run: make REDIS_CFLAGS=-Werror
|
run: make SERVER_CFLAGS=-Werror
|
||||||
- name: Start redis-server
|
- name: Start valkey-server
|
||||||
run: |
|
run: |
|
||||||
./src/redis-server --daemonize yes --save "" --logfile external-redis.log \
|
./src/valkey-server --daemonize yes --save "" --logfile external-server.log \
|
||||||
--enable-protected-configs yes --enable-debug-command yes --enable-module-command yes
|
--enable-protected-configs yes --enable-debug-command yes --enable-module-command yes
|
||||||
- name: Run external test
|
- name: Run external test
|
||||||
run: |
|
run: |
|
||||||
./runtest \
|
./runtest \
|
||||||
--host 127.0.0.1 --port 6379 \
|
--host 127.0.0.1 --port 6379 \
|
||||||
|
--verbose \
|
||||||
--tags -slow
|
--tags -slow
|
||||||
- name: Archive redis log
|
- name: Archive server log
|
||||||
if: ${{ failure() }}
|
if: ${{ failure() }}
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: test-external-redis-log
|
name: test-external-server-log
|
||||||
path: external-redis.log
|
path: external-server.log
|
||||||
|
|
||||||
test-external-cluster:
|
test-external-cluster:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: github.event_name != 'schedule' || github.repository == 'redis/redis'
|
if: github.event_name != 'schedule' || github.repository == 'valkey-io/valkey'
|
||||||
timeout-minutes: 14400
|
timeout-minutes: 14400
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- name: Build
|
- name: Build
|
||||||
run: make REDIS_CFLAGS=-Werror
|
run: make SERVER_CFLAGS=-Werror
|
||||||
- name: Start redis-server
|
- name: Start valkey-server
|
||||||
run: |
|
run: |
|
||||||
./src/redis-server --cluster-enabled yes --daemonize yes --save "" --logfile external-redis.log \
|
./src/valkey-server --cluster-enabled yes --daemonize yes --save "" --logfile external-server.log \
|
||||||
--enable-protected-configs yes --enable-debug-command yes --enable-module-command yes
|
--enable-protected-configs yes --enable-debug-command yes --enable-module-command yes
|
||||||
- name: Create a single node cluster
|
- name: Create a single node cluster
|
||||||
run: ./src/redis-cli cluster addslots $(for slot in {0..16383}; do echo $slot; done); sleep 5
|
run: ./src/valkey-cli cluster addslots $(for slot in {0..16383}; do echo $slot; done); sleep 5
|
||||||
- name: Run external test
|
- name: Run external test
|
||||||
run: |
|
run: |
|
||||||
./runtest \
|
./runtest \
|
||||||
--host 127.0.0.1 --port 6379 \
|
--host 127.0.0.1 --port 6379 \
|
||||||
|
--verbose \
|
||||||
--cluster-mode \
|
--cluster-mode \
|
||||||
--tags -slow
|
--tags -slow
|
||||||
- name: Archive redis log
|
- name: Archive server log
|
||||||
if: ${{ failure() }}
|
if: ${{ failure() }}
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: test-external-cluster-log
|
name: test-external-cluster-log
|
||||||
path: external-redis.log
|
path: external-server.log
|
||||||
|
|
||||||
test-external-nodebug:
|
test-external-nodebug:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: github.event_name != 'schedule' || github.repository == 'redis/redis'
|
if: github.event_name != 'schedule' || github.repository == 'valkey-io/valkey'
|
||||||
timeout-minutes: 14400
|
timeout-minutes: 14400
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- name: Build
|
- name: Build
|
||||||
run: make REDIS_CFLAGS=-Werror
|
run: make SERVER_CFLAGS=-Werror
|
||||||
- name: Start redis-server
|
- name: Start valkey-server
|
||||||
run: |
|
run: |
|
||||||
./src/redis-server --daemonize yes --save "" --logfile external-redis.log
|
./src/valkey-server --daemonize yes --save "" --logfile external-server.log
|
||||||
- name: Run external test
|
- name: Run external test
|
||||||
run: |
|
run: |
|
||||||
./runtest \
|
./runtest \
|
||||||
--host 127.0.0.1 --port 6379 \
|
--host 127.0.0.1 --port 6379 \
|
||||||
|
--verbose \
|
||||||
--tags "-slow -needs:debug"
|
--tags "-slow -needs:debug"
|
||||||
- name: Archive redis log
|
- name: Archive server log
|
||||||
if: ${{ failure() }}
|
if: ${{ failure() }}
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: test-external-redis-log
|
name: test-external-server-log
|
||||||
path: external-redis.log
|
path: external-server.log
|
14
.gitignore
vendored
14
.gitignore
vendored
@ -5,13 +5,13 @@
|
|||||||
*.d
|
*.d
|
||||||
*.log
|
*.log
|
||||||
dump.rdb
|
dump.rdb
|
||||||
redis-benchmark
|
*-benchmark
|
||||||
redis-check-aof
|
*-check-aof
|
||||||
redis-check-rdb
|
*-check-rdb
|
||||||
redis-check-dump
|
*-check-dump
|
||||||
redis-cli
|
*-cli
|
||||||
redis-sentinel
|
*-sentinel
|
||||||
redis-server
|
*-server
|
||||||
doc-tools
|
doc-tools
|
||||||
release
|
release
|
||||||
misc/*
|
misc/*
|
||||||
|
58
src/Makefile
58
src/Makefile
@ -6,8 +6,8 @@
|
|||||||
# what is needed for Redis plus the standard CFLAGS and LDFLAGS passed.
|
# what is needed for Redis plus the standard CFLAGS and LDFLAGS passed.
|
||||||
# However when building the dependencies (Jemalloc, Lua, Hiredis, ...)
|
# However when building the dependencies (Jemalloc, Lua, Hiredis, ...)
|
||||||
# CFLAGS and LDFLAGS are propagated to the dependencies, so to pass
|
# CFLAGS and LDFLAGS are propagated to the dependencies, so to pass
|
||||||
# flags only to be used when compiling / linking Redis itself REDIS_CFLAGS
|
# flags only to be used when compiling / linking Redis itself SERVER_CFLAGS
|
||||||
# and REDIS_LDFLAGS are used instead (this is the case of 'make gcov').
|
# and SERVER_LDFLAGS are used instead (this is the case of 'make gcov').
|
||||||
#
|
#
|
||||||
# Dependencies are stored in the Makefile.dep file. To rebuild this file
|
# Dependencies are stored in the Makefile.dep file. To rebuild this file
|
||||||
# Just use 'make dep', but this is only needed by developers.
|
# Just use 'make dep', but this is only needed by developers.
|
||||||
@ -19,11 +19,11 @@ CLANG := $(findstring clang,$(shell sh -c '$(CC) --version | head -1'))
|
|||||||
OPTIMIZATION?=-O3
|
OPTIMIZATION?=-O3
|
||||||
ifeq ($(OPTIMIZATION),-O3)
|
ifeq ($(OPTIMIZATION),-O3)
|
||||||
ifeq (clang,$(CLANG))
|
ifeq (clang,$(CLANG))
|
||||||
REDIS_CFLAGS+=-flto
|
SERVER_CFLAGS+=-flto
|
||||||
else
|
else
|
||||||
REDIS_CFLAGS+=-flto=auto
|
SERVER_CFLAGS+=-flto=auto
|
||||||
endif
|
endif
|
||||||
REDIS_LDFLAGS+=-O3 -flto
|
SERVER_LDFLAGS+=-O3 -flto
|
||||||
endif
|
endif
|
||||||
DEPENDENCY_TARGETS=hiredis linenoise lua hdr_histogram fpconv
|
DEPENDENCY_TARGETS=hiredis linenoise lua hdr_histogram fpconv
|
||||||
NODEPS:=clean distclean
|
NODEPS:=clean distclean
|
||||||
@ -116,8 +116,8 @@ endif
|
|||||||
# Override default settings if possible
|
# Override default settings if possible
|
||||||
-include .make-settings
|
-include .make-settings
|
||||||
|
|
||||||
FINAL_CFLAGS=$(STD) $(WARN) $(OPT) $(DEBUG) $(CFLAGS) $(REDIS_CFLAGS)
|
FINAL_CFLAGS=$(STD) $(WARN) $(OPT) $(DEBUG) $(CFLAGS) $(SERVER_CFLAGS)
|
||||||
FINAL_LDFLAGS=$(LDFLAGS) $(REDIS_LDFLAGS) $(DEBUG)
|
FINAL_LDFLAGS=$(LDFLAGS) $(SERVER_LDFLAGS) $(DEBUG)
|
||||||
FINAL_LIBS=-lm
|
FINAL_LIBS=-lm
|
||||||
DEBUG=-g -ggdb
|
DEBUG=-g -ggdb
|
||||||
|
|
||||||
@ -297,7 +297,7 @@ ifeq ($(BUILD_TLS),yes)
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
TLS_MODULE=
|
TLS_MODULE=
|
||||||
TLS_MODULE_NAME:=redis-tls$(PROG_SUFFIX).so
|
TLS_MODULE_NAME:=valkey-tls$(PROG_SUFFIX).so
|
||||||
TLS_MODULE_CFLAGS:=$(FINAL_CFLAGS)
|
TLS_MODULE_CFLAGS:=$(FINAL_CFLAGS)
|
||||||
ifeq ($(BUILD_TLS),module)
|
ifeq ($(BUILD_TLS),module)
|
||||||
FINAL_CFLAGS+=-DUSE_OPENSSL=$(BUILD_MODULE) $(OPENSSL_CFLAGS)
|
FINAL_CFLAGS+=-DUSE_OPENSSL=$(BUILD_MODULE) $(OPENSSL_CFLAGS)
|
||||||
@ -335,7 +335,7 @@ QUIET_LINK = @printf ' %b %b\n' $(LINKCOLOR)LINK$(ENDCOLOR) $(BINCOLOR)$@$(EN
|
|||||||
QUIET_INSTALL = @printf ' %b %b\n' $(LINKCOLOR)INSTALL$(ENDCOLOR) $(BINCOLOR)$@$(ENDCOLOR) 1>&2;
|
QUIET_INSTALL = @printf ' %b %b\n' $(LINKCOLOR)INSTALL$(ENDCOLOR) $(BINCOLOR)$@$(ENDCOLOR) 1>&2;
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifneq (, $(findstring LOG_REQ_RES, $(REDIS_CFLAGS)))
|
ifneq (, $(findstring LOG_REQ_RES, $(SERVER_CFLAGS)))
|
||||||
COMMANDS_DEF_FILENAME=commands_with_reply_schema
|
COMMANDS_DEF_FILENAME=commands_with_reply_schema
|
||||||
GEN_COMMANDS_FLAGS=--with-reply-schema
|
GEN_COMMANDS_FLAGS=--with-reply-schema
|
||||||
else
|
else
|
||||||
@ -343,15 +343,15 @@ else
|
|||||||
GEN_COMMANDS_FLAGS=
|
GEN_COMMANDS_FLAGS=
|
||||||
endif
|
endif
|
||||||
|
|
||||||
REDIS_SERVER_NAME=redis-server$(PROG_SUFFIX)
|
REDIS_SERVER_NAME=valkey-server$(PROG_SUFFIX)
|
||||||
REDIS_SENTINEL_NAME=redis-sentinel$(PROG_SUFFIX)
|
REDIS_SENTINEL_NAME=valkey-sentinel$(PROG_SUFFIX)
|
||||||
REDIS_SERVER_OBJ=adlist.o quicklist.o ae.o anet.o dict.o server.o sds.o zmalloc.o lzf_c.o lzf_d.o pqsort.o zipmap.o sha1.o ziplist.o release.o networking.o util.o object.o db.o replication.o rdb.o t_string.o t_list.o t_set.o t_zset.o t_hash.o config.o aof.o pubsub.o multi.o debug.o sort.o intset.o syncio.o cluster.o crc16.o endianconv.o slowlog.o eval.o bio.o rio.o rand.o memtest.o syscheck.o crcspeed.o crc64.o bitops.o sentinel.o notify.o setproctitle.o blocked.o hyperloglog.o latency.o sparkline.o redis-check-rdb.o redis-check-aof.o geo.o lazyfree.o module.o evict.o expire.o geohash.o geohash_helper.o childinfo.o defrag.o siphash.o rax.o t_stream.o listpack.o localtime.o lolwut.o lolwut5.o lolwut6.o acl.o tracking.o socket.o tls.o sha256.o timeout.o setcpuaffinity.o monotonic.o mt19937-64.o resp_parser.o call_reply.o script_lua.o script.o functions.o function_lua.o commands.o strl.o connection.o unix.o logreqres.o
|
REDIS_SERVER_OBJ=adlist.o quicklist.o ae.o anet.o dict.o server.o sds.o zmalloc.o lzf_c.o lzf_d.o pqsort.o zipmap.o sha1.o ziplist.o release.o networking.o util.o object.o db.o replication.o rdb.o t_string.o t_list.o t_set.o t_zset.o t_hash.o config.o aof.o pubsub.o multi.o debug.o sort.o intset.o syncio.o cluster.o crc16.o endianconv.o slowlog.o eval.o bio.o rio.o rand.o memtest.o syscheck.o crcspeed.o crc64.o bitops.o sentinel.o notify.o setproctitle.o blocked.o hyperloglog.o latency.o sparkline.o valkey-check-rdb.o valkey-check-aof.o geo.o lazyfree.o module.o evict.o expire.o geohash.o geohash_helper.o childinfo.o defrag.o siphash.o rax.o t_stream.o listpack.o localtime.o lolwut.o lolwut5.o lolwut6.o acl.o tracking.o socket.o tls.o sha256.o timeout.o setcpuaffinity.o monotonic.o mt19937-64.o resp_parser.o call_reply.o script_lua.o script.o functions.o function_lua.o commands.o strl.o connection.o unix.o logreqres.o
|
||||||
REDIS_CLI_NAME=redis-cli$(PROG_SUFFIX)
|
REDIS_CLI_NAME=valkey-cli$(PROG_SUFFIX)
|
||||||
REDIS_CLI_OBJ=anet.o adlist.o dict.o redis-cli.o zmalloc.o release.o ae.o redisassert.o crcspeed.o crc64.o siphash.o crc16.o monotonic.o cli_common.o mt19937-64.o strl.o cli_commands.o
|
REDIS_CLI_OBJ=anet.o adlist.o dict.o valkey-cli.o zmalloc.o release.o ae.o redisassert.o crcspeed.o crc64.o siphash.o crc16.o monotonic.o cli_common.o mt19937-64.o strl.o cli_commands.o
|
||||||
REDIS_BENCHMARK_NAME=redis-benchmark$(PROG_SUFFIX)
|
REDIS_BENCHMARK_NAME=valkey-benchmark$(PROG_SUFFIX)
|
||||||
REDIS_BENCHMARK_OBJ=ae.o anet.o redis-benchmark.o adlist.o dict.o zmalloc.o redisassert.o release.o crcspeed.o crc64.o siphash.o crc16.o monotonic.o cli_common.o mt19937-64.o strl.o
|
REDIS_BENCHMARK_OBJ=ae.o anet.o valkey-benchmark.o adlist.o dict.o zmalloc.o redisassert.o release.o crcspeed.o crc64.o siphash.o crc16.o monotonic.o cli_common.o mt19937-64.o strl.o
|
||||||
REDIS_CHECK_RDB_NAME=redis-check-rdb$(PROG_SUFFIX)
|
REDIS_CHECK_RDB_NAME=valkey-check-rdb$(PROG_SUFFIX)
|
||||||
REDIS_CHECK_AOF_NAME=redis-check-aof$(PROG_SUFFIX)
|
REDIS_CHECK_AOF_NAME=valkey-check-aof$(PROG_SUFFIX)
|
||||||
ALL_SOURCES=$(sort $(patsubst %.o,%.c,$(REDIS_SERVER_OBJ) $(REDIS_CLI_OBJ) $(REDIS_BENCHMARK_OBJ)))
|
ALL_SOURCES=$(sort $(patsubst %.o,%.c,$(REDIS_SERVER_OBJ) $(REDIS_CLI_OBJ) $(REDIS_BENCHMARK_OBJ)))
|
||||||
|
|
||||||
all: $(REDIS_SERVER_NAME) $(REDIS_SENTINEL_NAME) $(REDIS_CLI_NAME) $(REDIS_BENCHMARK_NAME) $(REDIS_CHECK_RDB_NAME) $(REDIS_CHECK_AOF_NAME) $(TLS_MODULE)
|
all: $(REDIS_SERVER_NAME) $(REDIS_SENTINEL_NAME) $(REDIS_CLI_NAME) $(REDIS_BENCHMARK_NAME) $(REDIS_CHECK_RDB_NAME) $(REDIS_CHECK_AOF_NAME) $(TLS_MODULE)
|
||||||
@ -377,8 +377,8 @@ persist-settings: distclean
|
|||||||
echo USE_SYSTEMD=$(USE_SYSTEMD) >> .make-settings
|
echo USE_SYSTEMD=$(USE_SYSTEMD) >> .make-settings
|
||||||
echo CFLAGS=$(CFLAGS) >> .make-settings
|
echo CFLAGS=$(CFLAGS) >> .make-settings
|
||||||
echo LDFLAGS=$(LDFLAGS) >> .make-settings
|
echo LDFLAGS=$(LDFLAGS) >> .make-settings
|
||||||
echo REDIS_CFLAGS=$(REDIS_CFLAGS) >> .make-settings
|
echo SERVER_CFLAGS=$(SERVER_CFLAGS) >> .make-settings
|
||||||
echo REDIS_LDFLAGS=$(REDIS_LDFLAGS) >> .make-settings
|
echo SERVER_LDFLAGS=$(SERVER_LDFLAGS) >> .make-settings
|
||||||
echo PREV_FINAL_CFLAGS=$(FINAL_CFLAGS) >> .make-settings
|
echo PREV_FINAL_CFLAGS=$(FINAL_CFLAGS) >> .make-settings
|
||||||
echo PREV_FINAL_LDFLAGS=$(FINAL_LDFLAGS) >> .make-settings
|
echo PREV_FINAL_LDFLAGS=$(FINAL_LDFLAGS) >> .make-settings
|
||||||
-(cd ../deps && $(MAKE) $(DEPENDENCY_TARGETS))
|
-(cd ../deps && $(MAKE) $(DEPENDENCY_TARGETS))
|
||||||
@ -398,31 +398,31 @@ ifneq ($(strip $(PREV_FINAL_LDFLAGS)), $(strip $(FINAL_LDFLAGS)))
|
|||||||
.make-prerequisites: persist-settings
|
.make-prerequisites: persist-settings
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# redis-server
|
# valkey-server
|
||||||
$(REDIS_SERVER_NAME): $(REDIS_SERVER_OBJ)
|
$(REDIS_SERVER_NAME): $(REDIS_SERVER_OBJ)
|
||||||
$(REDIS_LD) -o $@ $^ ../deps/hiredis/libhiredis.a ../deps/lua/src/liblua.a ../deps/hdr_histogram/libhdrhistogram.a ../deps/fpconv/libfpconv.a $(FINAL_LIBS)
|
$(REDIS_LD) -o $@ $^ ../deps/hiredis/libhiredis.a ../deps/lua/src/liblua.a ../deps/hdr_histogram/libhdrhistogram.a ../deps/fpconv/libfpconv.a $(FINAL_LIBS)
|
||||||
|
|
||||||
# redis-sentinel
|
# valkey-sentinel
|
||||||
$(REDIS_SENTINEL_NAME): $(REDIS_SERVER_NAME)
|
$(REDIS_SENTINEL_NAME): $(REDIS_SERVER_NAME)
|
||||||
$(REDIS_INSTALL) $(REDIS_SERVER_NAME) $(REDIS_SENTINEL_NAME)
|
$(REDIS_INSTALL) $(REDIS_SERVER_NAME) $(REDIS_SENTINEL_NAME)
|
||||||
|
|
||||||
# redis-check-rdb
|
# valkey-check-rdb
|
||||||
$(REDIS_CHECK_RDB_NAME): $(REDIS_SERVER_NAME)
|
$(REDIS_CHECK_RDB_NAME): $(REDIS_SERVER_NAME)
|
||||||
$(REDIS_INSTALL) $(REDIS_SERVER_NAME) $(REDIS_CHECK_RDB_NAME)
|
$(REDIS_INSTALL) $(REDIS_SERVER_NAME) $(REDIS_CHECK_RDB_NAME)
|
||||||
|
|
||||||
# redis-check-aof
|
# valkey-check-aof
|
||||||
$(REDIS_CHECK_AOF_NAME): $(REDIS_SERVER_NAME)
|
$(REDIS_CHECK_AOF_NAME): $(REDIS_SERVER_NAME)
|
||||||
$(REDIS_INSTALL) $(REDIS_SERVER_NAME) $(REDIS_CHECK_AOF_NAME)
|
$(REDIS_INSTALL) $(REDIS_SERVER_NAME) $(REDIS_CHECK_AOF_NAME)
|
||||||
|
|
||||||
# redis-tls.so
|
# valkey-tls.so
|
||||||
$(TLS_MODULE_NAME): $(REDIS_SERVER_NAME)
|
$(TLS_MODULE_NAME): $(REDIS_SERVER_NAME)
|
||||||
$(QUIET_CC)$(CC) -o $@ tls.c -shared -fPIC $(TLS_MODULE_CFLAGS) $(TLS_CLIENT_LIBS)
|
$(QUIET_CC)$(CC) -o $@ tls.c -shared -fPIC $(TLS_MODULE_CFLAGS) $(TLS_CLIENT_LIBS)
|
||||||
|
|
||||||
# redis-cli
|
# valkey-cli
|
||||||
$(REDIS_CLI_NAME): $(REDIS_CLI_OBJ)
|
$(REDIS_CLI_NAME): $(REDIS_CLI_OBJ)
|
||||||
$(REDIS_LD) -o $@ $^ ../deps/hiredis/libhiredis.a ../deps/linenoise/linenoise.o $(FINAL_LIBS) $(TLS_CLIENT_LIBS)
|
$(REDIS_LD) -o $@ $^ ../deps/hiredis/libhiredis.a ../deps/linenoise/linenoise.o $(FINAL_LIBS) $(TLS_CLIENT_LIBS)
|
||||||
|
|
||||||
# redis-benchmark
|
# valkey-benchmark
|
||||||
$(REDIS_BENCHMARK_NAME): $(REDIS_BENCHMARK_OBJ)
|
$(REDIS_BENCHMARK_NAME): $(REDIS_BENCHMARK_OBJ)
|
||||||
$(REDIS_LD) -o $@ $^ ../deps/hiredis/libhiredis.a ../deps/hdr_histogram/libhdrhistogram.a $(FINAL_LIBS) $(TLS_CLIENT_LIBS)
|
$(REDIS_LD) -o $@ $^ ../deps/hiredis/libhiredis.a ../deps/hdr_histogram/libhdrhistogram.a $(FINAL_LIBS) $(TLS_CLIENT_LIBS)
|
||||||
|
|
||||||
@ -490,7 +490,7 @@ bench: $(REDIS_BENCHMARK_NAME)
|
|||||||
$(MAKE) CFLAGS="-m32" LDFLAGS="-m32"
|
$(MAKE) CFLAGS="-m32" LDFLAGS="-m32"
|
||||||
|
|
||||||
gcov:
|
gcov:
|
||||||
$(MAKE) REDIS_CFLAGS="-fprofile-arcs -ftest-coverage -DCOVERAGE_TEST" REDIS_LDFLAGS="-fprofile-arcs -ftest-coverage"
|
$(MAKE) SERVER_CFLAGS="-fprofile-arcs -ftest-coverage -DCOVERAGE_TEST" SERVER_LDFLAGS="-fprofile-arcs -ftest-coverage"
|
||||||
|
|
||||||
noopt:
|
noopt:
|
||||||
$(MAKE) OPTIMIZATION="-O0"
|
$(MAKE) OPTIMIZATION="-O0"
|
||||||
@ -499,7 +499,7 @@ valgrind:
|
|||||||
$(MAKE) OPTIMIZATION="-O0" MALLOC="libc"
|
$(MAKE) OPTIMIZATION="-O0" MALLOC="libc"
|
||||||
|
|
||||||
helgrind:
|
helgrind:
|
||||||
$(MAKE) OPTIMIZATION="-O0" MALLOC="libc" CFLAGS="-D__ATOMIC_VAR_FORCE_SYNC_MACROS" REDIS_CFLAGS="-I/usr/local/include" REDIS_LDFLAGS="-L/usr/local/lib"
|
$(MAKE) OPTIMIZATION="-O0" MALLOC="libc" CFLAGS="-D__ATOMIC_VAR_FORCE_SYNC_MACROS" SERVER_CFLAGS="-I/usr/local/include" SERVER_LDFLAGS="-L/usr/local/lib"
|
||||||
|
|
||||||
install: all
|
install: all
|
||||||
@mkdir -p $(INSTALL_BIN)
|
@mkdir -p $(INSTALL_BIN)
|
||||||
|
@ -251,7 +251,7 @@ void aofLoadManifestFromDisk(void) {
|
|||||||
sdsfree(am_filepath);
|
sdsfree(am_filepath);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Generic manifest loading function, used in `aofLoadManifestFromDisk` and redis-check-aof tool. */
|
/* Generic manifest loading function, used in `aofLoadManifestFromDisk` and valkey-check-aof tool. */
|
||||||
#define MANIFEST_MAX_LINE 1024
|
#define MANIFEST_MAX_LINE 1024
|
||||||
aofManifest *aofLoadManifestFromFile(sds am_filepath) {
|
aofManifest *aofLoadManifestFromFile(sds am_filepath) {
|
||||||
const char *err = NULL;
|
const char *err = NULL;
|
||||||
@ -1625,14 +1625,14 @@ uxeof: /* Unexpected AOF end of file. */
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
serverLog(LL_WARNING, "Unexpected end of file reading the append only file %s. You can: "
|
serverLog(LL_WARNING, "Unexpected end of file reading the append only file %s. You can: "
|
||||||
"1) Make a backup of your AOF file, then use ./redis-check-aof --fix <filename.manifest>. "
|
"1) Make a backup of your AOF file, then use ./valkey-check-aof --fix <filename.manifest>. "
|
||||||
"2) Alternatively you can set the 'aof-load-truncated' configuration option to yes and restart the server.", filename);
|
"2) Alternatively you can set the 'aof-load-truncated' configuration option to yes and restart the server.", filename);
|
||||||
ret = AOF_FAILED;
|
ret = AOF_FAILED;
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
fmterr: /* Format error. */
|
fmterr: /* Format error. */
|
||||||
serverLog(LL_WARNING, "Bad file format reading the append only file %s: "
|
serverLog(LL_WARNING, "Bad file format reading the append only file %s: "
|
||||||
"make a backup of your AOF file, then use ./redis-check-aof --fix <filename.manifest>", filename);
|
"make a backup of your AOF file, then use ./valkey-check-aof --fix <filename.manifest>", filename);
|
||||||
ret = AOF_FAILED;
|
ret = AOF_FAILED;
|
||||||
/* fall through to cleanup. */
|
/* fall through to cleanup. */
|
||||||
|
|
||||||
|
@ -7129,9 +7129,9 @@ int main(int argc, char **argv) {
|
|||||||
/* Check if we need to start in redis-check-rdb/aof mode. We just execute
|
/* Check if we need to start in redis-check-rdb/aof mode. We just execute
|
||||||
* the program main. However the program is part of the Redis executable
|
* the program main. However the program is part of the Redis executable
|
||||||
* so that we can easily execute an RDB check on loading errors. */
|
* so that we can easily execute an RDB check on loading errors. */
|
||||||
if (strstr(exec_name,"redis-check-rdb") != NULL)
|
if (strstr(exec_name,"valkey-check-rdb") != NULL)
|
||||||
redis_check_rdb_main(argc,argv,NULL);
|
redis_check_rdb_main(argc,argv,NULL);
|
||||||
else if (strstr(exec_name,"redis-check-aof") != NULL)
|
else if (strstr(exec_name,"valkey-check-aof") != NULL)
|
||||||
redis_check_aof_main(argc,argv);
|
redis_check_aof_main(argc,argv);
|
||||||
|
|
||||||
if (argc >= 2) {
|
if (argc >= 2) {
|
||||||
|
@ -199,7 +199,7 @@ int processAnnotations(FILE *fp, char *filename, int last_file) {
|
|||||||
printf("Failed to truncate AOF %s to timestamp %ld to offset %ld because it is not the last file.\n",
|
printf("Failed to truncate AOF %s to timestamp %ld to offset %ld because it is not the last file.\n",
|
||||||
filename, to_timestamp, (long int)epos);
|
filename, to_timestamp, (long int)epos);
|
||||||
printf("If you insist, please delete all files after this file according to the manifest "
|
printf("If you insist, please delete all files after this file according to the manifest "
|
||||||
"file and delete the corresponding records in manifest file manually. Then re-run redis-check-aof.\n");
|
"file and delete the corresponding records in manifest file manually. Then re-run valkey-check-aof.\n");
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
/* Truncate remaining AOF if exceeding 'to_timestamp' */
|
/* Truncate remaining AOF if exceeding 'to_timestamp' */
|
||||||
@ -416,7 +416,7 @@ int fileIsManifest(char *filepath) {
|
|||||||
* AOF_RDB_PREAMBLE: Old-style RDB-preamble AOF
|
* AOF_RDB_PREAMBLE: Old-style RDB-preamble AOF
|
||||||
* AOF_MULTI_PART: manifest in Multi Part AOF
|
* AOF_MULTI_PART: manifest in Multi Part AOF
|
||||||
*
|
*
|
||||||
* redis-check-aof tool will automatically perform different
|
* valkey-check-aof tool will automatically perform different
|
||||||
* verification logic according to different file formats.
|
* verification logic according to different file formats.
|
||||||
* */
|
* */
|
||||||
input_file_type getInputFileType(char *filepath) {
|
input_file_type getInputFileType(char *filepath) {
|
@ -84,7 +84,7 @@ test "Cluster consistency during live resharding" {
|
|||||||
flush stdout
|
flush stdout
|
||||||
set target [dict get [get_myself [randomInt 5]] id]
|
set target [dict get [get_myself [randomInt 5]] id]
|
||||||
set tribpid [lindex [exec \
|
set tribpid [lindex [exec \
|
||||||
../../../src/redis-cli --cluster reshard \
|
../../../src/valkey-cli --cluster reshard \
|
||||||
127.0.0.1:[get_instance_attrib redis 0 port] \
|
127.0.0.1:[get_instance_attrib redis 0 port] \
|
||||||
--cluster-from all \
|
--cluster-from all \
|
||||||
--cluster-to $target \
|
--cluster-to $target \
|
||||||
|
@ -38,7 +38,7 @@ test "Set allow-replica-migration yes" {
|
|||||||
set master0_id [dict get [get_myself 0] id]
|
set master0_id [dict get [get_myself 0] id]
|
||||||
test "Resharding all the master #0 slots away from it" {
|
test "Resharding all the master #0 slots away from it" {
|
||||||
set output [exec \
|
set output [exec \
|
||||||
../../../src/redis-cli --cluster rebalance \
|
../../../src/valkey-cli --cluster rebalance \
|
||||||
127.0.0.1:[get_instance_attrib redis 0 port] \
|
127.0.0.1:[get_instance_attrib redis 0 port] \
|
||||||
{*}[rediscli_tls_config "../../../tests"] \
|
{*}[rediscli_tls_config "../../../tests"] \
|
||||||
--cluster-weight ${master0_id}=0 >@ stdout ]
|
--cluster-weight ${master0_id}=0 >@ stdout ]
|
||||||
@ -59,7 +59,7 @@ test "Resharding back some slot to master #0" {
|
|||||||
# new resharding.
|
# new resharding.
|
||||||
after 10000
|
after 10000
|
||||||
set output [exec \
|
set output [exec \
|
||||||
../../../src/redis-cli --cluster rebalance \
|
../../../src/valkey-cli --cluster rebalance \
|
||||||
127.0.0.1:[get_instance_attrib redis 0 port] \
|
127.0.0.1:[get_instance_attrib redis 0 port] \
|
||||||
{*}[rediscli_tls_config "../../../tests"] \
|
{*}[rediscli_tls_config "../../../tests"] \
|
||||||
--cluster-weight ${master0_id}=.01 \
|
--cluster-weight ${master0_id}=.01 \
|
||||||
|
@ -37,7 +37,7 @@ test "Set allow-replica-migration no" {
|
|||||||
set master0_id [dict get [get_myself 0] id]
|
set master0_id [dict get [get_myself 0] id]
|
||||||
test "Resharding all the master #0 slots away from it" {
|
test "Resharding all the master #0 slots away from it" {
|
||||||
set output [exec \
|
set output [exec \
|
||||||
../../../src/redis-cli --cluster rebalance \
|
../../../src/valkey-cli --cluster rebalance \
|
||||||
127.0.0.1:[get_instance_attrib redis 0 port] \
|
127.0.0.1:[get_instance_attrib redis 0 port] \
|
||||||
{*}[rediscli_tls_config "../../../tests"] \
|
{*}[rediscli_tls_config "../../../tests"] \
|
||||||
--cluster-weight ${master0_id}=0 >@ stdout ]
|
--cluster-weight ${master0_id}=0 >@ stdout ]
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
# Read the standard input and only shows dots in the output, filtering out
|
# Read the standard input and only shows dots in the output, filtering out
|
||||||
# all the other characters. Designed to avoid bufferization so that when
|
# all the other characters. Designed to avoid bufferization so that when
|
||||||
# we get the output of redis-trib and want to show just the dots, we'll see
|
# we get the output of valkey-trib and want to show just the dots, we'll see
|
||||||
# the dots as soon as redis-trib will output them.
|
# the dots as soon as valkey-trib will output them.
|
||||||
|
|
||||||
fconfigure stdin -buffering none
|
fconfigure stdin -buffering none
|
||||||
|
|
||||||
|
@ -8,25 +8,25 @@ proc config_set_all_nodes {keyword value} {
|
|||||||
|
|
||||||
proc fix_cluster {addr} {
|
proc fix_cluster {addr} {
|
||||||
set code [catch {
|
set code [catch {
|
||||||
exec ../../../src/redis-cli {*}[rediscli_tls_config "../../../tests"] --cluster fix $addr << yes
|
exec ../../../src/valkey-cli {*}[rediscli_tls_config "../../../tests"] --cluster fix $addr << yes
|
||||||
} result]
|
} result]
|
||||||
if {$code != 0} {
|
if {$code != 0} {
|
||||||
puts "redis-cli --cluster fix returns non-zero exit code, output below:\n$result"
|
puts "valkey-cli --cluster fix returns non-zero exit code, output below:\n$result"
|
||||||
}
|
}
|
||||||
# Note: redis-cli --cluster fix may return a non-zero exit code if nodes don't agree,
|
# Note: valkey-cli --cluster fix may return a non-zero exit code if nodes don't agree,
|
||||||
# but we can ignore that and rely on the check below.
|
# but we can ignore that and rely on the check below.
|
||||||
assert_cluster_state ok
|
assert_cluster_state ok
|
||||||
wait_for_condition 100 100 {
|
wait_for_condition 100 100 {
|
||||||
[catch {exec ../../../src/redis-cli {*}[rediscli_tls_config "../../../tests"] --cluster check $addr} result] == 0
|
[catch {exec ../../../src/valkey-cli {*}[rediscli_tls_config "../../../tests"] --cluster check $addr} result] == 0
|
||||||
} else {
|
} else {
|
||||||
puts "redis-cli --cluster check returns non-zero exit code, output below:\n$result"
|
puts "valkey-cli --cluster check returns non-zero exit code, output below:\n$result"
|
||||||
fail "Cluster could not settle with configuration"
|
fail "Cluster could not settle with configuration"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
proc wait_cluster_stable {} {
|
proc wait_cluster_stable {} {
|
||||||
wait_for_condition 1000 50 {
|
wait_for_condition 1000 50 {
|
||||||
[catch {exec ../../../src/redis-cli --cluster \
|
[catch {exec ../../../src/valkey-cli --cluster \
|
||||||
check 127.0.0.1:[get_instance_attrib redis 0 port] \
|
check 127.0.0.1:[get_instance_attrib redis 0 port] \
|
||||||
{*}[rediscli_tls_config "../../../tests"] \
|
{*}[rediscli_tls_config "../../../tests"] \
|
||||||
}] == 0
|
}] == 0
|
||||||
|
@ -48,9 +48,9 @@ if {[catch {cd tmp}]} {
|
|||||||
# the provided configuration file. Returns the PID of the process.
|
# the provided configuration file. Returns the PID of the process.
|
||||||
proc exec_instance {type dirname cfgfile} {
|
proc exec_instance {type dirname cfgfile} {
|
||||||
if {$type eq "redis"} {
|
if {$type eq "redis"} {
|
||||||
set prgname redis-server
|
set prgname valkey-server
|
||||||
} elseif {$type eq "sentinel"} {
|
} elseif {$type eq "sentinel"} {
|
||||||
set prgname redis-sentinel
|
set prgname valkey-sentinel
|
||||||
} else {
|
} else {
|
||||||
error "Unknown instance type."
|
error "Unknown instance type."
|
||||||
}
|
}
|
||||||
@ -87,7 +87,7 @@ proc spawn_instance {type base_port count {conf {}} {base_conf_file ""}} {
|
|||||||
|
|
||||||
if {$::tls} {
|
if {$::tls} {
|
||||||
if {$::tls_module} {
|
if {$::tls_module} {
|
||||||
puts $cfg [format "loadmodule %s/../../../src/redis-tls.so" [pwd]]
|
puts $cfg [format "loadmodule %s/../../../src/valkey-tls.so" [pwd]]
|
||||||
}
|
}
|
||||||
|
|
||||||
puts $cfg "tls-port $port"
|
puts $cfg "tls-port $port"
|
||||||
@ -342,7 +342,7 @@ proc pause_on_error {} {
|
|||||||
set cmd [lindex $argv 0]
|
set cmd [lindex $argv 0]
|
||||||
if {$cmd eq {continue}} {
|
if {$cmd eq {continue}} {
|
||||||
break
|
break
|
||||||
} elseif {$cmd eq {show-redis-logs}} {
|
} elseif {$cmd eq {show-valkey-logs}} {
|
||||||
set count 10
|
set count 10
|
||||||
if {[lindex $argv 1] ne {}} {set count [lindex $argv 1]}
|
if {[lindex $argv 1] ne {}} {set count [lindex $argv 1]}
|
||||||
foreach_redis_id id {
|
foreach_redis_id id {
|
||||||
@ -393,7 +393,7 @@ proc pause_on_error {} {
|
|||||||
} elseif {$cmd eq {help}} {
|
} elseif {$cmd eq {help}} {
|
||||||
puts "ls List Sentinel and Redis instances."
|
puts "ls List Sentinel and Redis instances."
|
||||||
puts "show-sentinel-logs \[N\] Show latest N lines of logs."
|
puts "show-sentinel-logs \[N\] Show latest N lines of logs."
|
||||||
puts "show-redis-logs \[N\] Show latest N lines of logs."
|
puts "show-valkey-logs \[N\] Show latest N lines of logs."
|
||||||
puts "S <id> cmd ... arg Call command in Sentinel <id>."
|
puts "S <id> cmd ... arg Call command in Sentinel <id>."
|
||||||
puts "R <id> cmd ... arg Call command in Redis <id>."
|
puts "R <id> cmd ... arg Call command in Redis <id>."
|
||||||
puts "SI <id> <field> Show Sentinel <id> INFO <field>."
|
puts "SI <id> <field> Show Sentinel <id> INFO <field>."
|
||||||
|
@ -8,7 +8,7 @@ tags {"aof external:skip"} {
|
|||||||
# was subsequently appended to the new AOF, resulting in duplicate commands.
|
# was subsequently appended to the new AOF, resulting in duplicate commands.
|
||||||
start_server_aof [list dir $server_path] {
|
start_server_aof [list dir $server_path] {
|
||||||
set client [redis [dict get $srv host] [dict get $srv port] 0 $::tls]
|
set client [redis [dict get $srv host] [dict get $srv port] 0 $::tls]
|
||||||
set bench [open "|src/redis-benchmark -q -s [dict get $srv unixsocket] -c 20 -n 20000 incr foo" "r+"]
|
set bench [open "|src/valkey-benchmark -q -s [dict get $srv unixsocket] -c 20 -n 20000 incr foo" "r+"]
|
||||||
|
|
||||||
wait_for_condition 100 1 {
|
wait_for_condition 100 1 {
|
||||||
[$client get foo] > 0
|
[$client get foo] > 0
|
||||||
|
@ -140,10 +140,10 @@ tags {"aof external:skip"} {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
## Test that redis-check-aof indeed sees this AOF is not valid
|
## Test that valkey-check-aof indeed sees this AOF is not valid
|
||||||
test "Short read: Utility should confirm the AOF is not valid" {
|
test "Short read: Utility should confirm the AOF is not valid" {
|
||||||
catch {
|
catch {
|
||||||
exec src/redis-check-aof $aof_manifest_file
|
exec src/valkey-check-aof $aof_manifest_file
|
||||||
} result
|
} result
|
||||||
assert_match "*not valid*" $result
|
assert_match "*not valid*" $result
|
||||||
}
|
}
|
||||||
@ -155,13 +155,13 @@ tags {"aof external:skip"} {
|
|||||||
}
|
}
|
||||||
|
|
||||||
catch {
|
catch {
|
||||||
exec src/redis-check-aof $aof_manifest_file
|
exec src/valkey-check-aof $aof_manifest_file
|
||||||
} result
|
} result
|
||||||
assert_match "*ok_up_to_line=8*" $result
|
assert_match "*ok_up_to_line=8*" $result
|
||||||
}
|
}
|
||||||
|
|
||||||
test "Short read: Utility should be able to fix the AOF" {
|
test "Short read: Utility should be able to fix the AOF" {
|
||||||
set result [exec src/redis-check-aof --fix $aof_manifest_file << "y\n"]
|
set result [exec src/valkey-check-aof --fix $aof_manifest_file << "y\n"]
|
||||||
assert_match "*Successfully truncated AOF*" $result
|
assert_match "*Successfully truncated AOF*" $result
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -445,7 +445,7 @@ tags {"aof external:skip"} {
|
|||||||
|
|
||||||
test {Truncate AOF to specific timestamp} {
|
test {Truncate AOF to specific timestamp} {
|
||||||
# truncate to timestamp 1628217473
|
# truncate to timestamp 1628217473
|
||||||
exec src/redis-check-aof --truncate-to-timestamp 1628217473 $aof_manifest_file
|
exec src/valkey-check-aof --truncate-to-timestamp 1628217473 $aof_manifest_file
|
||||||
start_server_aof [list dir $server_path] {
|
start_server_aof [list dir $server_path] {
|
||||||
set c [redis [dict get $srv host] [dict get $srv port] 0 $::tls]
|
set c [redis [dict get $srv host] [dict get $srv port] 0 $::tls]
|
||||||
wait_done_loading $c
|
wait_done_loading $c
|
||||||
@ -455,7 +455,7 @@ tags {"aof external:skip"} {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# truncate to timestamp 1628217471
|
# truncate to timestamp 1628217471
|
||||||
exec src/redis-check-aof --truncate-to-timestamp 1628217471 $aof_manifest_file
|
exec src/valkey-check-aof --truncate-to-timestamp 1628217471 $aof_manifest_file
|
||||||
start_server_aof [list dir $server_path] {
|
start_server_aof [list dir $server_path] {
|
||||||
set c [redis [dict get $srv host] [dict get $srv port] 0 $::tls]
|
set c [redis [dict get $srv host] [dict get $srv port] 0 $::tls]
|
||||||
wait_done_loading $c
|
wait_done_loading $c
|
||||||
@ -465,7 +465,7 @@ tags {"aof external:skip"} {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# truncate to timestamp 1628217470
|
# truncate to timestamp 1628217470
|
||||||
exec src/redis-check-aof --truncate-to-timestamp 1628217470 $aof_manifest_file
|
exec src/valkey-check-aof --truncate-to-timestamp 1628217470 $aof_manifest_file
|
||||||
start_server_aof [list dir $server_path] {
|
start_server_aof [list dir $server_path] {
|
||||||
set c [redis [dict get $srv host] [dict get $srv port] 0 $::tls]
|
set c [redis [dict get $srv host] [dict get $srv port] 0 $::tls]
|
||||||
wait_done_loading $c
|
wait_done_loading $c
|
||||||
@ -474,7 +474,7 @@ tags {"aof external:skip"} {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# truncate to timestamp 1628217469
|
# truncate to timestamp 1628217469
|
||||||
catch {exec src/redis-check-aof --truncate-to-timestamp 1628217469 $aof_manifest_file} e
|
catch {exec src/valkey-check-aof --truncate-to-timestamp 1628217469 $aof_manifest_file} e
|
||||||
assert_match {*aborting*} $e
|
assert_match {*aborting*} $e
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -517,26 +517,26 @@ tags {"aof external:skip"} {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
test {Test redis-check-aof for old style resp AOF} {
|
test {Test valkey-check-aof for old style resp AOF} {
|
||||||
create_aof $aof_dirpath $aof_file {
|
create_aof $aof_dirpath $aof_file {
|
||||||
append_to_aof [formatCommand set foo hello]
|
append_to_aof [formatCommand set foo hello]
|
||||||
append_to_aof [formatCommand set bar world]
|
append_to_aof [formatCommand set bar world]
|
||||||
}
|
}
|
||||||
|
|
||||||
catch {
|
catch {
|
||||||
exec src/redis-check-aof $aof_file
|
exec src/valkey-check-aof $aof_file
|
||||||
} result
|
} result
|
||||||
assert_match "*Start checking Old-Style AOF*is valid*" $result
|
assert_match "*Start checking Old-Style AOF*is valid*" $result
|
||||||
}
|
}
|
||||||
|
|
||||||
test {Test redis-check-aof for old style rdb-preamble AOF} {
|
test {Test valkey-check-aof for old style rdb-preamble AOF} {
|
||||||
catch {
|
catch {
|
||||||
exec src/redis-check-aof tests/assets/rdb-preamble.aof
|
exec src/valkey-check-aof tests/assets/rdb-preamble.aof
|
||||||
} result
|
} result
|
||||||
assert_match "*Start checking Old-Style AOF*RDB preamble is OK, proceeding with AOF tail*is valid*" $result
|
assert_match "*Start checking Old-Style AOF*RDB preamble is OK, proceeding with AOF tail*is valid*" $result
|
||||||
}
|
}
|
||||||
|
|
||||||
test {Test redis-check-aof for Multi Part AOF with resp AOF base} {
|
test {Test valkey-check-aof for Multi Part AOF with resp AOF base} {
|
||||||
create_aof $aof_dirpath $aof_base_file {
|
create_aof $aof_dirpath $aof_base_file {
|
||||||
append_to_aof [formatCommand set foo hello]
|
append_to_aof [formatCommand set foo hello]
|
||||||
append_to_aof [formatCommand set bar world]
|
append_to_aof [formatCommand set bar world]
|
||||||
@ -553,12 +553,12 @@ tags {"aof external:skip"} {
|
|||||||
}
|
}
|
||||||
|
|
||||||
catch {
|
catch {
|
||||||
exec src/redis-check-aof $aof_manifest_file
|
exec src/valkey-check-aof $aof_manifest_file
|
||||||
} result
|
} result
|
||||||
assert_match "*Start checking Multi Part AOF*Start to check BASE AOF (RESP format)*BASE AOF*is valid*Start to check INCR files*INCR AOF*is valid*All AOF files and manifest are valid*" $result
|
assert_match "*Start checking Multi Part AOF*Start to check BASE AOF (RESP format)*BASE AOF*is valid*Start to check INCR files*INCR AOF*is valid*All AOF files and manifest are valid*" $result
|
||||||
}
|
}
|
||||||
|
|
||||||
test {Test redis-check-aof for Multi Part AOF with rdb-preamble AOF base} {
|
test {Test valkey-check-aof for Multi Part AOF with rdb-preamble AOF base} {
|
||||||
exec cp tests/assets/rdb-preamble.aof $aof_base_file
|
exec cp tests/assets/rdb-preamble.aof $aof_base_file
|
||||||
|
|
||||||
create_aof $aof_dirpath $aof_file {
|
create_aof $aof_dirpath $aof_file {
|
||||||
@ -572,12 +572,12 @@ tags {"aof external:skip"} {
|
|||||||
}
|
}
|
||||||
|
|
||||||
catch {
|
catch {
|
||||||
exec src/redis-check-aof $aof_manifest_file
|
exec src/valkey-check-aof $aof_manifest_file
|
||||||
} result
|
} result
|
||||||
assert_match "*Start checking Multi Part AOF*Start to check BASE AOF (RDB format)*DB preamble is OK, proceeding with AOF tail*BASE AOF*is valid*Start to check INCR files*INCR AOF*is valid*All AOF files and manifest are valid*" $result
|
assert_match "*Start checking Multi Part AOF*Start to check BASE AOF (RDB format)*DB preamble is OK, proceeding with AOF tail*BASE AOF*is valid*Start to check INCR files*INCR AOF*is valid*All AOF files and manifest are valid*" $result
|
||||||
}
|
}
|
||||||
|
|
||||||
test {Test redis-check-aof only truncates the last file for Multi Part AOF in fix mode} {
|
test {Test valkey-check-aof only truncates the last file for Multi Part AOF in fix mode} {
|
||||||
create_aof $aof_dirpath $aof_base_file {
|
create_aof $aof_dirpath $aof_base_file {
|
||||||
append_to_aof [formatCommand set foo hello]
|
append_to_aof [formatCommand set foo hello]
|
||||||
append_to_aof [formatCommand multi]
|
append_to_aof [formatCommand multi]
|
||||||
@ -595,17 +595,17 @@ tags {"aof external:skip"} {
|
|||||||
}
|
}
|
||||||
|
|
||||||
catch {
|
catch {
|
||||||
exec src/redis-check-aof $aof_manifest_file
|
exec src/valkey-check-aof $aof_manifest_file
|
||||||
} result
|
} result
|
||||||
assert_match "*not valid*" $result
|
assert_match "*not valid*" $result
|
||||||
|
|
||||||
catch {
|
catch {
|
||||||
exec src/redis-check-aof --fix $aof_manifest_file
|
exec src/valkey-check-aof --fix $aof_manifest_file
|
||||||
} result
|
} result
|
||||||
assert_match "*Failed to truncate AOF*because it is not the last file*" $result
|
assert_match "*Failed to truncate AOF*because it is not the last file*" $result
|
||||||
}
|
}
|
||||||
|
|
||||||
test {Test redis-check-aof only truncates the last file for Multi Part AOF in truncate-to-timestamp mode} {
|
test {Test valkey-check-aof only truncates the last file for Multi Part AOF in truncate-to-timestamp mode} {
|
||||||
create_aof $aof_dirpath $aof_base_file {
|
create_aof $aof_dirpath $aof_base_file {
|
||||||
append_to_aof "#TS:1628217470\r\n"
|
append_to_aof "#TS:1628217470\r\n"
|
||||||
append_to_aof [formatCommand set foo1 bar1]
|
append_to_aof [formatCommand set foo1 bar1]
|
||||||
@ -628,7 +628,7 @@ tags {"aof external:skip"} {
|
|||||||
}
|
}
|
||||||
|
|
||||||
catch {
|
catch {
|
||||||
exec src/redis-check-aof --truncate-to-timestamp 1628217473 $aof_manifest_file
|
exec src/valkey-check-aof --truncate-to-timestamp 1628217473 $aof_manifest_file
|
||||||
} result
|
} result
|
||||||
assert_match "*Failed to truncate AOF*to timestamp*because it is not the last file*" $result
|
assert_match "*Failed to truncate AOF*to timestamp*because it is not the last file*" $result
|
||||||
}
|
}
|
||||||
|
@ -10,7 +10,7 @@ if {$system_name eq {darwin}} {
|
|||||||
# Avoid the test on libmusl, which does not support backtrace
|
# Avoid the test on libmusl, which does not support backtrace
|
||||||
# and on static binaries (ldd exit code 1) where we can't detect libmusl
|
# and on static binaries (ldd exit code 1) where we can't detect libmusl
|
||||||
catch {
|
catch {
|
||||||
set ldd [exec ldd src/redis-server]
|
set ldd [exec ldd src/valkey-server]
|
||||||
if {![string match {*libc.*musl*} $ldd]} {
|
if {![string match {*libc.*musl*} $ldd]} {
|
||||||
set backtrace_supported 1
|
set backtrace_supported 1
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
# Issue 3899 regression test.
|
# Issue 3899 regression test.
|
||||||
# We create a chain of three instances: master -> slave -> slave2
|
# We create a chain of three instances: master -> slave -> slave2
|
||||||
# and continuously break the link while traffic is generated by
|
# and continuously break the link while traffic is generated by
|
||||||
# redis-benchmark. At the end we check that the data is the same
|
# valkey-benchmark. At the end we check that the data is the same
|
||||||
# everywhere.
|
# everywhere.
|
||||||
|
|
||||||
start_server {tags {"psync2 external:skip"}} {
|
start_server {tags {"psync2 external:skip"}} {
|
||||||
@ -40,7 +40,7 @@ start_server {} {
|
|||||||
}
|
}
|
||||||
|
|
||||||
set cycle_start_time [clock milliseconds]
|
set cycle_start_time [clock milliseconds]
|
||||||
set bench_pid [exec src/redis-benchmark -s $R_unixsocket(0) -n 10000000 -r 1000 incr __rand_int__ > /dev/null &]
|
set bench_pid [exec src/valkey-benchmark -s $R_unixsocket(0) -n 10000000 -r 1000 incr __rand_int__ > /dev/null &]
|
||||||
while 1 {
|
while 1 {
|
||||||
set elapsed [expr {[clock milliseconds]-$cycle_start_time}]
|
set elapsed [expr {[clock milliseconds]-$cycle_start_time}]
|
||||||
if {$elapsed > $duration*1000} break
|
if {$elapsed > $duration*1000} break
|
||||||
|
@ -5,14 +5,14 @@ proc cmdstat {cmd} {
|
|||||||
return [cmdrstat $cmd r]
|
return [cmdrstat $cmd r]
|
||||||
}
|
}
|
||||||
|
|
||||||
# common code to reset stats, flush the db and run redis-benchmark
|
# common code to reset stats, flush the db and run valkey-benchmark
|
||||||
proc common_bench_setup {cmd} {
|
proc common_bench_setup {cmd} {
|
||||||
r config resetstat
|
r config resetstat
|
||||||
r flushall
|
r flushall
|
||||||
if {[catch { exec {*}$cmd } error]} {
|
if {[catch { exec {*}$cmd } error]} {
|
||||||
set first_line [lindex [split $error "\n"] 0]
|
set first_line [lindex [split $error "\n"] 0]
|
||||||
puts [colorstr red "redis-benchmark non zero code. first line: $first_line"]
|
puts [colorstr red "valkey-benchmark non zero code. first line: $first_line"]
|
||||||
fail "redis-benchmark non zero code. first line: $first_line"
|
fail "valkey-benchmark non zero code. first line: $first_line"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -156,8 +156,8 @@ start_server {tags {"benchmark network external:skip logreqres:skip"}} {
|
|||||||
puts "Skipping test, TLSv1.3 not supported."
|
puts "Skipping test, TLSv1.3 not supported."
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
puts [colorstr red "redis-benchmark non zero code. first line: $first_line"]
|
puts [colorstr red "valkey-benchmark non zero code. first line: $first_line"]
|
||||||
fail "redis-benchmark non zero code. first line: $first_line"
|
fail "valkey-benchmark non zero code. first line: $first_line"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if {$ciphersuites_supported} {
|
if {$ciphersuites_supported} {
|
@ -509,7 +509,7 @@ if {!$::tls} { ;# fake_redis_node doesn't support TLS
|
|||||||
wait_for_condition 500 100 {
|
wait_for_condition 500 100 {
|
||||||
[string match {*slave0:*state=online*} [r info]]
|
[string match {*slave0:*state=online*} [r info]]
|
||||||
} else {
|
} else {
|
||||||
fail "redis-cli --replica did not connect"
|
fail "valkey-cli --replica did not connect"
|
||||||
}
|
}
|
||||||
|
|
||||||
for {set i 0} {$i < 100} {incr i} {
|
for {set i 0} {$i < 100} {incr i} {
|
||||||
@ -519,7 +519,7 @@ if {!$::tls} { ;# fake_redis_node doesn't support TLS
|
|||||||
wait_for_condition 500 100 {
|
wait_for_condition 500 100 {
|
||||||
[string match {*test-value-99*} [read_cli $fd]]
|
[string match {*test-value-99*} [read_cli $fd]]
|
||||||
} else {
|
} else {
|
||||||
fail "redis-cli --replica didn't read commands"
|
fail "valkey-cli --replica didn't read commands"
|
||||||
}
|
}
|
||||||
|
|
||||||
fconfigure $fd -blocking true
|
fconfigure $fd -blocking true
|
@ -12,21 +12,21 @@ proc redisbenchmark_tls_config {testsdir} {
|
|||||||
}
|
}
|
||||||
|
|
||||||
proc redisbenchmark {host port {opts {}}} {
|
proc redisbenchmark {host port {opts {}}} {
|
||||||
set cmd [list src/redis-benchmark -h $host -p $port]
|
set cmd [list src/valkey-benchmark -h $host -p $port]
|
||||||
lappend cmd {*}[redisbenchmark_tls_config "tests"]
|
lappend cmd {*}[redisbenchmark_tls_config "tests"]
|
||||||
lappend cmd {*}$opts
|
lappend cmd {*}$opts
|
||||||
return $cmd
|
return $cmd
|
||||||
}
|
}
|
||||||
|
|
||||||
proc redisbenchmarkuri {host port {opts {}}} {
|
proc redisbenchmarkuri {host port {opts {}}} {
|
||||||
set cmd [list src/redis-benchmark -u redis://$host:$port]
|
set cmd [list src/valkey-benchmark -u redis://$host:$port]
|
||||||
lappend cmd {*}[redisbenchmark_tls_config "tests"]
|
lappend cmd {*}[redisbenchmark_tls_config "tests"]
|
||||||
lappend cmd {*}$opts
|
lappend cmd {*}$opts
|
||||||
return $cmd
|
return $cmd
|
||||||
}
|
}
|
||||||
|
|
||||||
proc redisbenchmarkuriuserpass {host port user pass {opts {}}} {
|
proc redisbenchmarkuriuserpass {host port user pass {opts {}}} {
|
||||||
set cmd [list src/redis-benchmark -u redis://$user:$pass@$host:$port]
|
set cmd [list src/valkey-benchmark -u redis://$user:$pass@$host:$port]
|
||||||
lappend cmd {*}[redisbenchmark_tls_config "tests"]
|
lappend cmd {*}[redisbenchmark_tls_config "tests"]
|
||||||
lappend cmd {*}$opts
|
lappend cmd {*}$opts
|
||||||
return $cmd
|
return $cmd
|
||||||
|
@ -11,20 +11,20 @@ proc rediscli_tls_config {testsdir} {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# Returns command line for executing redis-cli
|
# Returns command line for executing valkey-cli
|
||||||
proc rediscli {host port {opts {}}} {
|
proc rediscli {host port {opts {}}} {
|
||||||
set cmd [list src/redis-cli -h $host -p $port]
|
set cmd [list src/valkey-cli -h $host -p $port]
|
||||||
lappend cmd {*}[rediscli_tls_config "tests"]
|
lappend cmd {*}[rediscli_tls_config "tests"]
|
||||||
lappend cmd {*}$opts
|
lappend cmd {*}$opts
|
||||||
return $cmd
|
return $cmd
|
||||||
}
|
}
|
||||||
|
|
||||||
# Returns command line for executing redis-cli with a unix socket address
|
# Returns command line for executing valkey-cli with a unix socket address
|
||||||
proc rediscli_unixsocket {unixsocket {opts {}}} {
|
proc rediscli_unixsocket {unixsocket {opts {}}} {
|
||||||
return [list src/redis-cli -s $unixsocket {*}$opts]
|
return [list src/valkey-cli -s $unixsocket {*}$opts]
|
||||||
}
|
}
|
||||||
|
|
||||||
# Run redis-cli with specified args on the server of specified level.
|
# Run valkey-cli with specified args on the server of specified level.
|
||||||
# Returns output broken down into individual lines.
|
# Returns output broken down into individual lines.
|
||||||
proc rediscli_exec {level args} {
|
proc rediscli_exec {level args} {
|
||||||
set cmd [rediscli_unixsocket [srv $level unixsocket] $args]
|
set cmd [rediscli_unixsocket [srv $level unixsocket] $args]
|
||||||
|
@ -272,7 +272,7 @@ proc create_server_config_file {filename config config_lines} {
|
|||||||
}
|
}
|
||||||
|
|
||||||
proc spawn_server {config_file stdout stderr args} {
|
proc spawn_server {config_file stdout stderr args} {
|
||||||
set cmd [list src/redis-server $config_file]
|
set cmd [list src/valkey-server $config_file]
|
||||||
set args {*}$args
|
set args {*}$args
|
||||||
if {[llength $args] > 0} {
|
if {[llength $args] > 0} {
|
||||||
lappend cmd {*}$args
|
lappend cmd {*}$args
|
||||||
@ -471,7 +471,7 @@ proc start_server {options {code undefined}} {
|
|||||||
set config {}
|
set config {}
|
||||||
if {$::tls} {
|
if {$::tls} {
|
||||||
if {$::tls_module} {
|
if {$::tls_module} {
|
||||||
lappend config_lines [list "loadmodule" [format "%s/src/redis-tls.so" [pwd]]]
|
lappend config_lines [list "loadmodule" [format "%s/src/valkey-tls.so" [pwd]]]
|
||||||
}
|
}
|
||||||
dict set config "tls-cert-file" [format "%s/tests/tls/server.crt" [pwd]]
|
dict set config "tls-cert-file" [format "%s/tests/tls/server.crt" [pwd]]
|
||||||
dict set config "tls-key-file" [format "%s/tests/tls/server.key" [pwd]]
|
dict set config "tls-key-file" [format "%s/tests/tls/server.key" [pwd]]
|
||||||
|
@ -258,7 +258,7 @@ proc test {name code {okpattern undefined} {tags {}}} {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if {$::traceleaks} {
|
if {$::traceleaks} {
|
||||||
set output [exec leaks redis-server]
|
set output [exec leaks valkey-server]
|
||||||
if {![string match {*0 leaks*} $output]} {
|
if {![string match {*0 leaks*} $output]} {
|
||||||
send_data_packet $::test_server_fd err "Detected a memory leak in test '$name': $output"
|
send_data_packet $::test_server_fd err "Detected a memory leak in test '$name': $output"
|
||||||
}
|
}
|
||||||
|
@ -64,8 +64,8 @@ set ::all_tests {
|
|||||||
integration/psync2-pingoff
|
integration/psync2-pingoff
|
||||||
integration/psync2-master-restart
|
integration/psync2-master-restart
|
||||||
integration/failover
|
integration/failover
|
||||||
integration/redis-cli
|
integration/valkey-cli
|
||||||
integration/redis-benchmark
|
integration/valkey-benchmark
|
||||||
integration/dismiss-mem
|
integration/dismiss-mem
|
||||||
unit/pubsub
|
unit/pubsub
|
||||||
unit/pubsubshard
|
unit/pubsubshard
|
||||||
|
@ -1154,10 +1154,10 @@ start_server [list overrides [list "dir" $server_path "aclfile" "user.acl"] tags
|
|||||||
}
|
}
|
||||||
|
|
||||||
test {Test loading duplicate users in config on startup} {
|
test {Test loading duplicate users in config on startup} {
|
||||||
catch {exec src/redis-server --user foo --user foo} err
|
catch {exec src/valkey-server --user foo --user foo} err
|
||||||
assert_match {*Duplicate user*} $err
|
assert_match {*Duplicate user*} $err
|
||||||
|
|
||||||
catch {exec src/redis-server --user default --user default} err
|
catch {exec src/valkey-server --user default --user default} err
|
||||||
assert_match {*Duplicate user*} $err
|
assert_match {*Duplicate user*} $err
|
||||||
} {} {external:skip}
|
} {} {external:skip}
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Primitive tests on cluster-enabled redis using redis-cli
|
# Primitive tests on cluster-enabled redis using valkey-cli
|
||||||
|
|
||||||
source tests/support/cli.tcl
|
source tests/support/cli.tcl
|
||||||
|
|
||||||
@ -20,7 +20,7 @@ start_multiple_servers 3 [list overrides $base_conf] {
|
|||||||
set node3_rd [redis_deferring_client -2]
|
set node3_rd [redis_deferring_client -2]
|
||||||
|
|
||||||
test {Create 3 node cluster} {
|
test {Create 3 node cluster} {
|
||||||
exec src/redis-cli --cluster-yes --cluster create \
|
exec src/valkey-cli --cluster-yes --cluster create \
|
||||||
127.0.0.1:[srv 0 port] \
|
127.0.0.1:[srv 0 port] \
|
||||||
127.0.0.1:[srv -1 port] \
|
127.0.0.1:[srv -1 port] \
|
||||||
127.0.0.1:[srv -2 port]
|
127.0.0.1:[srv -2 port]
|
||||||
@ -47,7 +47,7 @@ start_multiple_servers 3 [list overrides $base_conf] {
|
|||||||
}
|
}
|
||||||
|
|
||||||
test "Perform a Resharding" {
|
test "Perform a Resharding" {
|
||||||
exec src/redis-cli --cluster-yes --cluster reshard 127.0.0.1:[srv -2 port] \
|
exec src/valkey-cli --cluster-yes --cluster reshard 127.0.0.1:[srv -2 port] \
|
||||||
--cluster-to [$node1 cluster myid] \
|
--cluster-to [$node1 cluster myid] \
|
||||||
--cluster-from [$node3 cluster myid] \
|
--cluster-from [$node3 cluster myid] \
|
||||||
--cluster-slots 1
|
--cluster-slots 1
|
||||||
@ -68,9 +68,9 @@ start_multiple_servers 3 [list overrides $base_conf] {
|
|||||||
# waiting for cluster_state to be okay is an independent check that all the
|
# waiting for cluster_state to be okay is an independent check that all the
|
||||||
# nodes actually believe each other are healthy, prevent cluster down error.
|
# nodes actually believe each other are healthy, prevent cluster down error.
|
||||||
wait_for_condition 1000 50 {
|
wait_for_condition 1000 50 {
|
||||||
[catch {exec src/redis-cli --cluster check 127.0.0.1:[srv 0 port]}] == 0 &&
|
[catch {exec src/valkey-cli --cluster check 127.0.0.1:[srv 0 port]}] == 0 &&
|
||||||
[catch {exec src/redis-cli --cluster check 127.0.0.1:[srv -1 port]}] == 0 &&
|
[catch {exec src/valkey-cli --cluster check 127.0.0.1:[srv -1 port]}] == 0 &&
|
||||||
[catch {exec src/redis-cli --cluster check 127.0.0.1:[srv -2 port]}] == 0 &&
|
[catch {exec src/valkey-cli --cluster check 127.0.0.1:[srv -2 port]}] == 0 &&
|
||||||
[CI 0 cluster_state] eq {ok} &&
|
[CI 0 cluster_state] eq {ok} &&
|
||||||
[CI 1 cluster_state] eq {ok} &&
|
[CI 1 cluster_state] eq {ok} &&
|
||||||
[CI 2 cluster_state] eq {ok}
|
[CI 2 cluster_state] eq {ok}
|
||||||
@ -87,13 +87,13 @@ start_multiple_servers 3 [list overrides $base_conf] {
|
|||||||
set endpoint_type_before_set [lindex [split [$node1 CONFIG GET cluster-preferred-endpoint-type] " "] 1]
|
set endpoint_type_before_set [lindex [split [$node1 CONFIG GET cluster-preferred-endpoint-type] " "] 1]
|
||||||
$node1 CONFIG SET cluster-preferred-endpoint-type unknown-endpoint
|
$node1 CONFIG SET cluster-preferred-endpoint-type unknown-endpoint
|
||||||
|
|
||||||
# when redis-cli not in cluster mode, return MOVE with empty host
|
# when valkey-cli not in cluster mode, return MOVE with empty host
|
||||||
set slot_for_foo [$node1 CLUSTER KEYSLOT foo]
|
set slot_for_foo [$node1 CLUSTER KEYSLOT foo]
|
||||||
assert_error "*MOVED $slot_for_foo :*" {$node1 set foo bar}
|
assert_error "*MOVED $slot_for_foo :*" {$node1 set foo bar}
|
||||||
|
|
||||||
# when in cluster mode, redirect using previous hostip
|
# when in cluster mode, redirect using previous hostip
|
||||||
assert_equal "[exec src/redis-cli -h 127.0.0.1 -p [srv 0 port] -c set foo bar]" {OK}
|
assert_equal "[exec src/valkey-cli -h 127.0.0.1 -p [srv 0 port] -c set foo bar]" {OK}
|
||||||
assert_match "[exec src/redis-cli -h 127.0.0.1 -p [srv 0 port] -c get foo]" {bar}
|
assert_match "[exec src/valkey-cli -h 127.0.0.1 -p [srv 0 port] -c get foo]" {bar}
|
||||||
|
|
||||||
assert_equal [$node1 CONFIG SET cluster-preferred-endpoint-type "$endpoint_type_before_set"] {OK}
|
assert_equal [$node1 CONFIG SET cluster-preferred-endpoint-type "$endpoint_type_before_set"] {OK}
|
||||||
}
|
}
|
||||||
@ -156,15 +156,15 @@ start_multiple_servers 3 [list overrides $base_conf] {
|
|||||||
|
|
||||||
} ;# stop servers
|
} ;# stop servers
|
||||||
|
|
||||||
# Test redis-cli -- cluster create, add-node, call.
|
# Test valkey-cli -- cluster create, add-node, call.
|
||||||
# Test that functions are propagated on add-node
|
# Test that functions are propagated on add-node
|
||||||
start_multiple_servers 5 [list overrides $base_conf] {
|
start_multiple_servers 5 [list overrides $base_conf] {
|
||||||
|
|
||||||
set node4_rd [redis_client -3]
|
set node4_rd [redis_client -3]
|
||||||
set node5_rd [redis_client -4]
|
set node5_rd [redis_client -4]
|
||||||
|
|
||||||
test {Functions are added to new node on redis-cli cluster add-node} {
|
test {Functions are added to new node on valkey-cli cluster add-node} {
|
||||||
exec src/redis-cli --cluster-yes --cluster create \
|
exec src/valkey-cli --cluster-yes --cluster create \
|
||||||
127.0.0.1:[srv 0 port] \
|
127.0.0.1:[srv 0 port] \
|
||||||
127.0.0.1:[srv -1 port] \
|
127.0.0.1:[srv -1 port] \
|
||||||
127.0.0.1:[srv -2 port]
|
127.0.0.1:[srv -2 port]
|
||||||
@ -179,13 +179,13 @@ start_multiple_servers 5 [list overrides $base_conf] {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# upload a function to all the cluster
|
# upload a function to all the cluster
|
||||||
exec src/redis-cli --cluster-yes --cluster call 127.0.0.1:[srv 0 port] \
|
exec src/valkey-cli --cluster-yes --cluster call 127.0.0.1:[srv 0 port] \
|
||||||
FUNCTION LOAD {#!lua name=TEST
|
FUNCTION LOAD {#!lua name=TEST
|
||||||
redis.register_function('test', function() return 'hello' end)
|
redis.register_function('test', function() return 'hello' end)
|
||||||
}
|
}
|
||||||
|
|
||||||
# adding node to the cluster
|
# adding node to the cluster
|
||||||
exec src/redis-cli --cluster-yes --cluster add-node \
|
exec src/valkey-cli --cluster-yes --cluster add-node \
|
||||||
127.0.0.1:[srv -3 port] \
|
127.0.0.1:[srv -3 port] \
|
||||||
127.0.0.1:[srv 0 port]
|
127.0.0.1:[srv 0 port]
|
||||||
|
|
||||||
@ -213,7 +213,7 @@ start_multiple_servers 5 [list overrides $base_conf] {
|
|||||||
|
|
||||||
# adding node 5 to the cluster should failed because it already contains the 'test' function
|
# adding node 5 to the cluster should failed because it already contains the 'test' function
|
||||||
catch {
|
catch {
|
||||||
exec src/redis-cli --cluster-yes --cluster add-node \
|
exec src/valkey-cli --cluster-yes --cluster add-node \
|
||||||
127.0.0.1:[srv -4 port] \
|
127.0.0.1:[srv -4 port] \
|
||||||
127.0.0.1:[srv 0 port]
|
127.0.0.1:[srv 0 port]
|
||||||
} e
|
} e
|
||||||
@ -221,13 +221,13 @@ start_multiple_servers 5 [list overrides $base_conf] {
|
|||||||
}
|
}
|
||||||
} ;# stop servers
|
} ;# stop servers
|
||||||
|
|
||||||
# Test redis-cli --cluster create, add-node.
|
# Test valkey-cli --cluster create, add-node.
|
||||||
# Test that one slot can be migrated to and then away from the new node.
|
# Test that one slot can be migrated to and then away from the new node.
|
||||||
test {Migrate the last slot away from a node using redis-cli} {
|
test {Migrate the last slot away from a node using valkey-cli} {
|
||||||
start_multiple_servers 4 [list overrides $base_conf] {
|
start_multiple_servers 4 [list overrides $base_conf] {
|
||||||
|
|
||||||
# Create a cluster of 3 nodes
|
# Create a cluster of 3 nodes
|
||||||
exec src/redis-cli --cluster-yes --cluster create \
|
exec src/valkey-cli --cluster-yes --cluster create \
|
||||||
127.0.0.1:[srv 0 port] \
|
127.0.0.1:[srv 0 port] \
|
||||||
127.0.0.1:[srv -1 port] \
|
127.0.0.1:[srv -1 port] \
|
||||||
127.0.0.1:[srv -2 port]
|
127.0.0.1:[srv -2 port]
|
||||||
@ -241,11 +241,11 @@ test {Migrate the last slot away from a node using redis-cli} {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Insert some data
|
# Insert some data
|
||||||
assert_equal OK [exec src/redis-cli -c -p [srv 0 port] SET foo bar]
|
assert_equal OK [exec src/valkey-cli -c -p [srv 0 port] SET foo bar]
|
||||||
set slot [exec src/redis-cli -c -p [srv 0 port] CLUSTER KEYSLOT foo]
|
set slot [exec src/valkey-cli -c -p [srv 0 port] CLUSTER KEYSLOT foo]
|
||||||
|
|
||||||
# Add new node to the cluster
|
# Add new node to the cluster
|
||||||
exec src/redis-cli --cluster-yes --cluster add-node \
|
exec src/valkey-cli --cluster-yes --cluster add-node \
|
||||||
127.0.0.1:[srv -3 port] \
|
127.0.0.1:[srv -3 port] \
|
||||||
127.0.0.1:[srv 0 port]
|
127.0.0.1:[srv 0 port]
|
||||||
|
|
||||||
@ -283,10 +283,10 @@ test {Migrate the last slot away from a node using redis-cli} {
|
|||||||
# Using --cluster check make sure we won't get `Not all slots are covered by nodes`.
|
# Using --cluster check make sure we won't get `Not all slots are covered by nodes`.
|
||||||
# Wait for the cluster to become stable make sure the cluster is up during MIGRATE.
|
# Wait for the cluster to become stable make sure the cluster is up during MIGRATE.
|
||||||
wait_for_condition 1000 50 {
|
wait_for_condition 1000 50 {
|
||||||
[catch {exec src/redis-cli --cluster check 127.0.0.1:[srv 0 port]}] == 0 &&
|
[catch {exec src/valkey-cli --cluster check 127.0.0.1:[srv 0 port]}] == 0 &&
|
||||||
[catch {exec src/redis-cli --cluster check 127.0.0.1:[srv -1 port]}] == 0 &&
|
[catch {exec src/valkey-cli --cluster check 127.0.0.1:[srv -1 port]}] == 0 &&
|
||||||
[catch {exec src/redis-cli --cluster check 127.0.0.1:[srv -2 port]}] == 0 &&
|
[catch {exec src/valkey-cli --cluster check 127.0.0.1:[srv -2 port]}] == 0 &&
|
||||||
[catch {exec src/redis-cli --cluster check 127.0.0.1:[srv -3 port]}] == 0 &&
|
[catch {exec src/valkey-cli --cluster check 127.0.0.1:[srv -3 port]}] == 0 &&
|
||||||
[CI 0 cluster_state] eq {ok} &&
|
[CI 0 cluster_state] eq {ok} &&
|
||||||
[CI 1 cluster_state] eq {ok} &&
|
[CI 1 cluster_state] eq {ok} &&
|
||||||
[CI 2 cluster_state] eq {ok} &&
|
[CI 2 cluster_state] eq {ok} &&
|
||||||
@ -295,8 +295,8 @@ test {Migrate the last slot away from a node using redis-cli} {
|
|||||||
fail "Cluster doesn't stabilize"
|
fail "Cluster doesn't stabilize"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Move the only slot back to original node using redis-cli
|
# Move the only slot back to original node using valkey-cli
|
||||||
exec src/redis-cli --cluster reshard 127.0.0.1:[srv -3 port] \
|
exec src/valkey-cli --cluster reshard 127.0.0.1:[srv -3 port] \
|
||||||
--cluster-from $newnode_id \
|
--cluster-from $newnode_id \
|
||||||
--cluster-to $owner_id \
|
--cluster-to $owner_id \
|
||||||
--cluster-slots 1 \
|
--cluster-slots 1 \
|
||||||
@ -327,7 +327,7 @@ test {Migrate the last slot away from a node using redis-cli} {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# Test redis-cli --cluster create, add-node with cluster-port.
|
# Test valkey-cli --cluster create, add-node with cluster-port.
|
||||||
# Create five nodes, three with custom cluster_port and two with default values.
|
# Create five nodes, three with custom cluster_port and two with default values.
|
||||||
start_server [list overrides [list cluster-enabled yes cluster-node-timeout 1 cluster-port [find_available_port $::baseport $::portcount]]] {
|
start_server [list overrides [list cluster-enabled yes cluster-node-timeout 1 cluster-port [find_available_port $::baseport $::portcount]]] {
|
||||||
start_server [list overrides [list cluster-enabled yes cluster-node-timeout 1]] {
|
start_server [list overrides [list cluster-enabled yes cluster-node-timeout 1]] {
|
||||||
@ -343,8 +343,8 @@ start_server [list overrides [list cluster-enabled yes cluster-node-timeout 1 cl
|
|||||||
set node4_rd [redis_client -3]
|
set node4_rd [redis_client -3]
|
||||||
set node5_rd [redis_client -4]
|
set node5_rd [redis_client -4]
|
||||||
|
|
||||||
test {redis-cli --cluster create with cluster-port} {
|
test {valkey-cli --cluster create with cluster-port} {
|
||||||
exec src/redis-cli --cluster-yes --cluster create \
|
exec src/valkey-cli --cluster-yes --cluster create \
|
||||||
127.0.0.1:[srv 0 port] \
|
127.0.0.1:[srv 0 port] \
|
||||||
127.0.0.1:[srv -1 port] \
|
127.0.0.1:[srv -1 port] \
|
||||||
127.0.0.1:[srv -2 port]
|
127.0.0.1:[srv -2 port]
|
||||||
@ -363,9 +363,9 @@ start_server [list overrides [list cluster-enabled yes cluster-node-timeout 1 cl
|
|||||||
assert_equal 3 [CI 2 cluster_known_nodes]
|
assert_equal 3 [CI 2 cluster_known_nodes]
|
||||||
}
|
}
|
||||||
|
|
||||||
test {redis-cli --cluster add-node with cluster-port} {
|
test {valkey-cli --cluster add-node with cluster-port} {
|
||||||
# Adding node to the cluster (without cluster-port)
|
# Adding node to the cluster (without cluster-port)
|
||||||
exec src/redis-cli --cluster-yes --cluster add-node \
|
exec src/valkey-cli --cluster-yes --cluster add-node \
|
||||||
127.0.0.1:[srv -3 port] \
|
127.0.0.1:[srv -3 port] \
|
||||||
127.0.0.1:[srv 0 port]
|
127.0.0.1:[srv 0 port]
|
||||||
|
|
||||||
@ -381,7 +381,7 @@ start_server [list overrides [list cluster-enabled yes cluster-node-timeout 1 cl
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Adding node to the cluster (with cluster-port)
|
# Adding node to the cluster (with cluster-port)
|
||||||
exec src/redis-cli --cluster-yes --cluster add-node \
|
exec src/valkey-cli --cluster-yes --cluster add-node \
|
||||||
127.0.0.1:[srv -4 port] \
|
127.0.0.1:[srv -4 port] \
|
||||||
127.0.0.1:[srv 0 port]
|
127.0.0.1:[srv 0 port]
|
||||||
|
|
||||||
|
@ -630,57 +630,57 @@ start_server {tags {"introspection"}} {
|
|||||||
assert {[dict exists $res bind]}
|
assert {[dict exists $res bind]}
|
||||||
}
|
}
|
||||||
|
|
||||||
test {redis-server command line arguments - error cases} {
|
test {valkey-server command line arguments - error cases} {
|
||||||
# Take '--invalid' as the option.
|
# Take '--invalid' as the option.
|
||||||
catch {exec src/redis-server --invalid} err
|
catch {exec src/valkey-server --invalid} err
|
||||||
assert_match {*Bad directive or wrong number of arguments*} $err
|
assert_match {*Bad directive or wrong number of arguments*} $err
|
||||||
|
|
||||||
catch {exec src/redis-server --port} err
|
catch {exec src/valkey-server --port} err
|
||||||
assert_match {*'port'*wrong number of arguments*} $err
|
assert_match {*'port'*wrong number of arguments*} $err
|
||||||
|
|
||||||
catch {exec src/redis-server --port 6380 --loglevel} err
|
catch {exec src/valkey-server --port 6380 --loglevel} err
|
||||||
assert_match {*'loglevel'*wrong number of arguments*} $err
|
assert_match {*'loglevel'*wrong number of arguments*} $err
|
||||||
|
|
||||||
# Take `6379` and `6380` as the port option value.
|
# Take `6379` and `6380` as the port option value.
|
||||||
catch {exec src/redis-server --port 6379 6380} err
|
catch {exec src/valkey-server --port 6379 6380} err
|
||||||
assert_match {*'port "6379" "6380"'*wrong number of arguments*} $err
|
assert_match {*'port "6379" "6380"'*wrong number of arguments*} $err
|
||||||
|
|
||||||
# Take `--loglevel` and `verbose` as the port option value.
|
# Take `--loglevel` and `verbose` as the port option value.
|
||||||
catch {exec src/redis-server --port --loglevel verbose} err
|
catch {exec src/valkey-server --port --loglevel verbose} err
|
||||||
assert_match {*'port "--loglevel" "verbose"'*wrong number of arguments*} $err
|
assert_match {*'port "--loglevel" "verbose"'*wrong number of arguments*} $err
|
||||||
|
|
||||||
# Take `--bla` as the port option value.
|
# Take `--bla` as the port option value.
|
||||||
catch {exec src/redis-server --port --bla --loglevel verbose} err
|
catch {exec src/valkey-server --port --bla --loglevel verbose} err
|
||||||
assert_match {*'port "--bla"'*argument couldn't be parsed into an integer*} $err
|
assert_match {*'port "--bla"'*argument couldn't be parsed into an integer*} $err
|
||||||
|
|
||||||
# Take `--bla` as the loglevel option value.
|
# Take `--bla` as the loglevel option value.
|
||||||
catch {exec src/redis-server --logfile --my--log--file --loglevel --bla} err
|
catch {exec src/valkey-server --logfile --my--log--file --loglevel --bla} err
|
||||||
assert_match {*'loglevel "--bla"'*argument(s) must be one of the following*} $err
|
assert_match {*'loglevel "--bla"'*argument(s) must be one of the following*} $err
|
||||||
|
|
||||||
# Using MULTI_ARG's own check, empty option value
|
# Using MULTI_ARG's own check, empty option value
|
||||||
catch {exec src/redis-server --shutdown-on-sigint} err
|
catch {exec src/valkey-server --shutdown-on-sigint} err
|
||||||
assert_match {*'shutdown-on-sigint'*argument(s) must be one of the following*} $err
|
assert_match {*'shutdown-on-sigint'*argument(s) must be one of the following*} $err
|
||||||
catch {exec src/redis-server --shutdown-on-sigint "now force" --shutdown-on-sigterm} err
|
catch {exec src/valkey-server --shutdown-on-sigint "now force" --shutdown-on-sigterm} err
|
||||||
assert_match {*'shutdown-on-sigterm'*argument(s) must be one of the following*} $err
|
assert_match {*'shutdown-on-sigterm'*argument(s) must be one of the following*} $err
|
||||||
|
|
||||||
# Something like `redis-server --some-config --config-value1 --config-value2 --loglevel debug` would break,
|
# Something like `valkey-server --some-config --config-value1 --config-value2 --loglevel debug` would break,
|
||||||
# because if you want to pass a value to a config starting with `--`, it can only be a single value.
|
# because if you want to pass a value to a config starting with `--`, it can only be a single value.
|
||||||
catch {exec src/redis-server --replicaof 127.0.0.1 abc} err
|
catch {exec src/valkey-server --replicaof 127.0.0.1 abc} err
|
||||||
assert_match {*'replicaof "127.0.0.1" "abc"'*Invalid master port*} $err
|
assert_match {*'replicaof "127.0.0.1" "abc"'*Invalid master port*} $err
|
||||||
catch {exec src/redis-server --replicaof --127.0.0.1 abc} err
|
catch {exec src/valkey-server --replicaof --127.0.0.1 abc} err
|
||||||
assert_match {*'replicaof "--127.0.0.1" "abc"'*Invalid master port*} $err
|
assert_match {*'replicaof "--127.0.0.1" "abc"'*Invalid master port*} $err
|
||||||
catch {exec src/redis-server --replicaof --127.0.0.1 --abc} err
|
catch {exec src/valkey-server --replicaof --127.0.0.1 --abc} err
|
||||||
assert_match {*'replicaof "--127.0.0.1"'*wrong number of arguments*} $err
|
assert_match {*'replicaof "--127.0.0.1"'*wrong number of arguments*} $err
|
||||||
} {} {external:skip}
|
} {} {external:skip}
|
||||||
|
|
||||||
test {redis-server command line arguments - allow passing option name and option value in the same arg} {
|
test {valkey-server command line arguments - allow passing option name and option value in the same arg} {
|
||||||
start_server {config "default.conf" args {"--maxmemory 700mb" "--maxmemory-policy volatile-lru"}} {
|
start_server {config "default.conf" args {"--maxmemory 700mb" "--maxmemory-policy volatile-lru"}} {
|
||||||
assert_match [r config get maxmemory] {maxmemory 734003200}
|
assert_match [r config get maxmemory] {maxmemory 734003200}
|
||||||
assert_match [r config get maxmemory-policy] {maxmemory-policy volatile-lru}
|
assert_match [r config get maxmemory-policy] {maxmemory-policy volatile-lru}
|
||||||
}
|
}
|
||||||
} {} {external:skip}
|
} {} {external:skip}
|
||||||
|
|
||||||
test {redis-server command line arguments - wrong usage that we support anyway} {
|
test {valkey-server command line arguments - wrong usage that we support anyway} {
|
||||||
start_server {config "default.conf" args {loglevel verbose "--maxmemory '700mb'" "--maxmemory-policy 'volatile-lru'"}} {
|
start_server {config "default.conf" args {loglevel verbose "--maxmemory '700mb'" "--maxmemory-policy 'volatile-lru'"}} {
|
||||||
assert_match [r config get loglevel] {loglevel verbose}
|
assert_match [r config get loglevel] {loglevel verbose}
|
||||||
assert_match [r config get maxmemory] {maxmemory 734003200}
|
assert_match [r config get maxmemory] {maxmemory 734003200}
|
||||||
@ -688,21 +688,21 @@ start_server {tags {"introspection"}} {
|
|||||||
}
|
}
|
||||||
} {} {external:skip}
|
} {} {external:skip}
|
||||||
|
|
||||||
test {redis-server command line arguments - allow option value to use the `--` prefix} {
|
test {valkey-server command line arguments - allow option value to use the `--` prefix} {
|
||||||
start_server {config "default.conf" args {--proc-title-template --my--title--template --loglevel verbose}} {
|
start_server {config "default.conf" args {--proc-title-template --my--title--template --loglevel verbose}} {
|
||||||
assert_match [r config get proc-title-template] {proc-title-template --my--title--template}
|
assert_match [r config get proc-title-template] {proc-title-template --my--title--template}
|
||||||
assert_match [r config get loglevel] {loglevel verbose}
|
assert_match [r config get loglevel] {loglevel verbose}
|
||||||
}
|
}
|
||||||
} {} {external:skip}
|
} {} {external:skip}
|
||||||
|
|
||||||
test {redis-server command line arguments - option name and option value in the same arg and `--` prefix} {
|
test {valkey-server command line arguments - option name and option value in the same arg and `--` prefix} {
|
||||||
start_server {config "default.conf" args {"--proc-title-template --my--title--template" "--loglevel verbose"}} {
|
start_server {config "default.conf" args {"--proc-title-template --my--title--template" "--loglevel verbose"}} {
|
||||||
assert_match [r config get proc-title-template] {proc-title-template --my--title--template}
|
assert_match [r config get proc-title-template] {proc-title-template --my--title--template}
|
||||||
assert_match [r config get loglevel] {loglevel verbose}
|
assert_match [r config get loglevel] {loglevel verbose}
|
||||||
}
|
}
|
||||||
} {} {external:skip}
|
} {} {external:skip}
|
||||||
|
|
||||||
test {redis-server command line arguments - save with empty input} {
|
test {valkey-server command line arguments - save with empty input} {
|
||||||
start_server {config "default.conf" args {--save --loglevel verbose}} {
|
start_server {config "default.conf" args {--save --loglevel verbose}} {
|
||||||
assert_match [r config get save] {save {}}
|
assert_match [r config get save] {save {}}
|
||||||
assert_match [r config get loglevel] {loglevel verbose}
|
assert_match [r config get loglevel] {loglevel verbose}
|
||||||
@ -731,7 +731,7 @@ start_server {tags {"introspection"}} {
|
|||||||
|
|
||||||
} {} {external:skip}
|
} {} {external:skip}
|
||||||
|
|
||||||
test {redis-server command line arguments - take one bulk string with spaces for MULTI_ARG configs parsing} {
|
test {valkey-server command line arguments - take one bulk string with spaces for MULTI_ARG configs parsing} {
|
||||||
start_server {config "default.conf" args {--shutdown-on-sigint nosave force now --shutdown-on-sigterm "nosave force"}} {
|
start_server {config "default.conf" args {--shutdown-on-sigint nosave force now --shutdown-on-sigterm "nosave force"}} {
|
||||||
assert_match [r config get shutdown-on-sigint] {shutdown-on-sigint {nosave now force}}
|
assert_match [r config get shutdown-on-sigint] {shutdown-on-sigint {nosave now force}}
|
||||||
assert_match [r config get shutdown-on-sigterm] {shutdown-on-sigterm {nosave force}}
|
assert_match [r config get shutdown-on-sigterm] {shutdown-on-sigterm {nosave force}}
|
||||||
|
@ -43,7 +43,7 @@ start_cluster 3 0 [list config_lines $modules] {
|
|||||||
|
|
||||||
|
|
||||||
test "Perform a Resharding" {
|
test "Perform a Resharding" {
|
||||||
exec src/redis-cli --cluster-yes --cluster reshard 127.0.0.1:[srv -2 port] \
|
exec src/valkey-cli --cluster-yes --cluster reshard 127.0.0.1:[srv -2 port] \
|
||||||
--cluster-to [$node1 cluster myid] \
|
--cluster-to [$node1 cluster myid] \
|
||||||
--cluster-from [$node3 cluster myid] \
|
--cluster-from [$node3 cluster myid] \
|
||||||
--cluster-slots 1
|
--cluster-slots 1
|
||||||
@ -69,9 +69,9 @@ start_cluster 3 0 [list config_lines $modules] {
|
|||||||
|
|
||||||
test "Wait for cluster to be stable" {
|
test "Wait for cluster to be stable" {
|
||||||
wait_for_condition 1000 50 {
|
wait_for_condition 1000 50 {
|
||||||
[catch {exec src/redis-cli --cluster check 127.0.0.1:[srv 0 port]}] == 0 &&
|
[catch {exec src/valkey-cli --cluster check 127.0.0.1:[srv 0 port]}] == 0 &&
|
||||||
[catch {exec src/redis-cli --cluster check 127.0.0.1:[srv -1 port]}] == 0 &&
|
[catch {exec src/valkey-cli --cluster check 127.0.0.1:[srv -1 port]}] == 0 &&
|
||||||
[catch {exec src/redis-cli --cluster check 127.0.0.1:[srv -2 port]}] == 0 &&
|
[catch {exec src/valkey-cli --cluster check 127.0.0.1:[srv -2 port]}] == 0 &&
|
||||||
[CI 0 cluster_state] eq {ok} &&
|
[CI 0 cluster_state] eq {ok} &&
|
||||||
[CI 1 cluster_state] eq {ok} &&
|
[CI 1 cluster_state] eq {ok} &&
|
||||||
[CI 2 cluster_state] eq {ok}
|
[CI 2 cluster_state] eq {ok}
|
||||||
|
@ -221,15 +221,15 @@ start_server {tags {"modules"}} {
|
|||||||
}
|
}
|
||||||
test {startup moduleconfigs} {
|
test {startup moduleconfigs} {
|
||||||
# No loadmodule directive
|
# No loadmodule directive
|
||||||
catch {exec src/redis-server --moduleconfigs.string "hello"} err
|
catch {exec src/valkey-server --moduleconfigs.string "hello"} err
|
||||||
assert_match {*Module Configuration detected without loadmodule directive or no ApplyConfig call: aborting*} $err
|
assert_match {*Module Configuration detected without loadmodule directive or no ApplyConfig call: aborting*} $err
|
||||||
|
|
||||||
# Bad config value
|
# Bad config value
|
||||||
catch {exec src/redis-server --loadmodule "$testmodule" --moduleconfigs.string "rejectisfreed"} err
|
catch {exec src/valkey-server --loadmodule "$testmodule" --moduleconfigs.string "rejectisfreed"} err
|
||||||
assert_match {*Issue during loading of configuration moduleconfigs.string : Cannot set string to 'rejectisfreed'*} $err
|
assert_match {*Issue during loading of configuration moduleconfigs.string : Cannot set string to 'rejectisfreed'*} $err
|
||||||
|
|
||||||
# missing LoadConfigs call
|
# missing LoadConfigs call
|
||||||
catch {exec src/redis-server --loadmodule "$testmodule" noload --moduleconfigs.string "hello"} err
|
catch {exec src/valkey-server --loadmodule "$testmodule" noload --moduleconfigs.string "hello"} err
|
||||||
assert_match {*Module Configurations were not set, likely a missing LoadConfigs call. Unloading the module.*} $err
|
assert_match {*Module Configurations were not set, likely a missing LoadConfigs call. Unloading the module.*} $err
|
||||||
|
|
||||||
# successful
|
# successful
|
||||||
|
@ -122,7 +122,7 @@ start_server {config "minimal.conf" tags {"external:skip"}} {
|
|||||||
# Make sure bind parameter is as expected and server handles binding
|
# Make sure bind parameter is as expected and server handles binding
|
||||||
# accordingly.
|
# accordingly.
|
||||||
# (it seems that rediscli_exec behaves differently in RESP3, possibly
|
# (it seems that rediscli_exec behaves differently in RESP3, possibly
|
||||||
# because CONFIG GET returns a dict instead of a list so redis-cli emits
|
# because CONFIG GET returns a dict instead of a list so valkey-cli emits
|
||||||
# it in a single line)
|
# it in a single line)
|
||||||
if {$::force_resp3} {
|
if {$::force_resp3} {
|
||||||
assert_equal {{bind }} [rediscli_exec 0 config get bind]
|
assert_equal {{bind }} [rediscli_exec 0 config get bind]
|
||||||
|
@ -401,7 +401,7 @@ start_server {tags {"other external:skip"}} {
|
|||||||
set cmdline [read_proc_title [srv 0 pid]]
|
set cmdline [read_proc_title [srv 0 pid]]
|
||||||
|
|
||||||
assert_equal "TEST" [lindex $cmdline 0]
|
assert_equal "TEST" [lindex $cmdline 0]
|
||||||
assert_match "*/redis-server" [lindex $cmdline 1]
|
assert_match "*/valkey-server" [lindex $cmdline 1]
|
||||||
|
|
||||||
if {$::tls} {
|
if {$::tls} {
|
||||||
set expect_port [srv 0 pport]
|
set expect_port [srv 0 pport]
|
||||||
|
@ -15,11 +15,11 @@ proc avg vector {
|
|||||||
|
|
||||||
set samples {}
|
set samples {}
|
||||||
while 1 {
|
while 1 {
|
||||||
exec redis-cli -p $::fail_port debug sleep $::sleep_time > /dev/null &
|
exec valkey-cli -p $::fail_port debug sleep $::sleep_time > /dev/null &
|
||||||
|
|
||||||
# Wait for fail? to appear.
|
# Wait for fail? to appear.
|
||||||
while 1 {
|
while 1 {
|
||||||
set output [exec redis-cli -p $::other_port cluster nodes]
|
set output [exec valkey-cli -p $::other_port cluster nodes]
|
||||||
if {[string match {*fail\?*} $output]} break
|
if {[string match {*fail\?*} $output]} break
|
||||||
after 100
|
after 100
|
||||||
}
|
}
|
||||||
@ -29,7 +29,7 @@ while 1 {
|
|||||||
|
|
||||||
# Wait for fail? to disappear.
|
# Wait for fail? to disappear.
|
||||||
while 1 {
|
while 1 {
|
||||||
set output [exec redis-cli -p $::other_port cluster nodes]
|
set output [exec valkey-cli -p $::other_port cluster nodes]
|
||||||
if {![string match {*fail\?*} $output]} break
|
if {![string match {*fail\?*} $output]} break
|
||||||
after 100
|
after 100
|
||||||
}
|
}
|
||||||
@ -43,7 +43,7 @@ while 1 {
|
|||||||
puts "AVG([llength $samples]): [avg $samples]"
|
puts "AVG([llength $samples]): [avg $samples]"
|
||||||
|
|
||||||
# Wait for the instance to be available again.
|
# Wait for the instance to be available again.
|
||||||
exec redis-cli -p $::fail_port ping
|
exec valkey-cli -p $::fail_port ping
|
||||||
|
|
||||||
# Wait for the fail flag to be cleared.
|
# Wait for the fail flag to be cleared.
|
||||||
after 2000
|
after 2000
|
||||||
|
@ -20,15 +20,15 @@ proc run-tests branches {
|
|||||||
exec -ignorestderr make 2> /dev/null
|
exec -ignorestderr make 2> /dev/null
|
||||||
|
|
||||||
if {$branch_id == 0} {
|
if {$branch_id == 0} {
|
||||||
puts " copy redis-benchmark from unstable to /tmp..."
|
puts " copy valkey-benchmark from unstable to /tmp..."
|
||||||
exec -ignorestderr cp ./redis-benchmark /tmp
|
exec -ignorestderr cp ./valkey-benchmark /tmp
|
||||||
incr branch_id
|
incr branch_id
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
# Start the Redis server
|
# Start the Redis server
|
||||||
puts " starting the server... [exec ./redis-server -v]"
|
puts " starting the server... [exec ./valkey-server -v]"
|
||||||
set pids [exec echo "port $::port\nloglevel warning\n" | ./redis-server - > /dev/null 2> /dev/null &]
|
set pids [exec echo "port $::port\nloglevel warning\n" | ./valkey-server - > /dev/null 2> /dev/null &]
|
||||||
puts " pids: $pids"
|
puts " pids: $pids"
|
||||||
after 1000
|
after 1000
|
||||||
puts " running the benchmark"
|
puts " running the benchmark"
|
||||||
@ -38,7 +38,7 @@ proc run-tests branches {
|
|||||||
puts " redis INFO shows version: [lindex [split $i] 0]"
|
puts " redis INFO shows version: [lindex [split $i] 0]"
|
||||||
$r close
|
$r close
|
||||||
|
|
||||||
set output [exec /tmp/redis-benchmark -n $::requests -t $::tests -d $::datasize --csv -p $::port]
|
set output [exec /tmp/valkey-benchmark -n $::requests -t $::tests -d $::datasize --csv -p $::port]
|
||||||
lappend runs $b $output
|
lappend runs $b $output
|
||||||
puts " killing server..."
|
puts " killing server..."
|
||||||
catch {exec kill -9 [lindex $pids 0]}
|
catch {exec kill -9 [lindex $pids 0]}
|
||||||
@ -83,7 +83,7 @@ proc combine-results {results} {
|
|||||||
}
|
}
|
||||||
|
|
||||||
proc main {} {
|
proc main {} {
|
||||||
# Note: the first branch is only used in order to get the redis-benchmark
|
# Note: the first branch is only used in order to get the valkey-benchmark
|
||||||
# executable. Tests are performed starting from the second branch.
|
# executable. Tests are performed starting from the second branch.
|
||||||
set branches {
|
set branches {
|
||||||
slowset 2.2.0 2.4.0 unstable slowset
|
slowset 2.2.0 2.4.0 unstable slowset
|
||||||
|
Loading…
x
Reference in New Issue
Block a user