Allow TCL 9.0 for tests (#1673)

Makes our tests possible to run with TCL 9.

The latest Fedora now has TCL 9.0 and it's working now, including the
TCL TLS package. (This wasn't working earlier due to some packaging
errors for TCL packages in Fedora, which have been fixed now.)

This PR also removes the custom compilation of TCL 8 used in our Daily
jobs and uses the system default TCL version instead. The TCL version
depends on the OS. For the latest Fedora, you get 9.0, for macOS you get
8.5 and for most other OSes you get 8.6.

The checks for TCL 8.7 are removed, because 8.7 doesn't exist. It was
never released.

---------

Signed-off-by: Viktor Söderqvist <viktor.soderqvist@est.tech>
This commit is contained in:
Viktor Söderqvist
2025-10-08 11:37:15 +02:00
committed by GitHub
parent b3da88e94d
commit 3390b1e608
12 changed files with 17 additions and 58 deletions
@@ -1,31 +0,0 @@
name: 'Install TCL8'
description: 'Installs tcl8 and tcltls from source on Fedora-based or uses the system package on others.'
inputs:
matrix_name:
description: 'The name of the matrix to check for fedora'
required: true
runs:
using: "composite"
steps:
# Fedora 42 comes with Tcl 9 by default, but tcltls is currently incompatible with Tcl 9.
# As a workaround, we install Tcl 8 and manually build tcltls 1.7.22 from source.
# Once tcltls adds support for Tcl 9, this logic can be removed and system packages used instead.
- run: |
if [[ "${{ inputs.matrix_name }}" =~ "fedora" ]]; then
dnf -y install tcl8 tcl8-devel gcc make awk openssl openssl-devel
ln -s /usr/bin/tclsh8.6 /usr/bin/tclsh
curl -LO https://core.tcl-lang.org/tcltls/uv/tcltls-1.7.22.tar.gz
tar -xzf tcltls-1.7.22.tar.gz
pushd tcltls-1.7.22
./configure --with-tcl=/usr/lib64/tcl8.6
make
mkdir -p /usr/lib64/tcl8.6/tls1.7.22
cp tcltls.so pkgIndex.tcl /usr/lib64/tcl8.6/tls1.7.22/
popd
else
dnf -y install tcl tcltls
fi
./utils/gen-test-certs.sh
shell: bash
+8 -10
View File
@@ -947,12 +947,10 @@ jobs:
run: dnf -y install epel-release run: dnf -y install epel-release
- name: make - name: make
run: | run: |
dnf -y install gcc make procps-ng openssl-devel openssl which /usr/bin/kill /usr/bin/awk dnf -y install gcc make procps-ng which /usr/bin/kill /usr/bin/awk
make -j SERVER_CFLAGS='-Werror' make -j SERVER_CFLAGS='-Werror'
- name: testprep - name: testprep
uses: ./.github/actions/rpm-distros-tcl8 run: dnf -y install tcl tcltls
with:
matrix_name: ${{ matrix.name }}
- name: test - name: test
if: true && !contains(github.event.inputs.skiptests, 'valkey') if: true && !contains(github.event.inputs.skiptests, 'valkey')
run: ./runtest ${{ github.event_name != 'pull_request' && '--accurate' || '' }} --verbose --dump-logs ${{github.event.inputs.test_args}} run: ./runtest ${{ github.event_name != 'pull_request' && '--accurate' || '' }} --verbose --dump-logs ${{github.event.inputs.test_args}}
@@ -1018,9 +1016,9 @@ jobs:
dnf -y install make gcc openssl-devel openssl procps-ng which /usr/bin/kill /usr/bin/awk dnf -y install make gcc openssl-devel openssl procps-ng which /usr/bin/kill /usr/bin/awk
make -j BUILD_TLS=module SERVER_CFLAGS='-Werror' make -j BUILD_TLS=module SERVER_CFLAGS='-Werror'
- name: testprep - name: testprep
uses: ./.github/actions/rpm-distros-tcl8 run: |
with: dnf -y install tcl tcltls
matrix_name: ${{ matrix.name }} ./utils/gen-test-certs.sh
- name: test - name: test
if: true && !contains(github.event.inputs.skiptests, 'valkey') if: true && !contains(github.event.inputs.skiptests, 'valkey')
run: | run: |
@@ -1090,9 +1088,9 @@ jobs:
dnf -y install make gcc openssl-devel openssl procps-ng which /usr/bin/kill /usr/bin/awk dnf -y install make gcc openssl-devel openssl procps-ng which /usr/bin/kill /usr/bin/awk
make -j BUILD_TLS=module SERVER_CFLAGS='-Werror' make -j BUILD_TLS=module SERVER_CFLAGS='-Werror'
- name: testprep - name: testprep
uses: ./.github/actions/rpm-distros-tcl8 run: |
with: dnf -y install tcl tcltls
matrix_name: ${{ matrix.name }} ./utils/gen-test-certs.sh
- name: test - name: test
if: true && !contains(github.event.inputs.skiptests, 'valkey') if: true && !contains(github.event.inputs.skiptests, 'valkey')
run: | run: |
+1 -1
View File
@@ -1,5 +1,5 @@
#!/bin/sh #!/bin/sh
TCL_VERSIONS="8.5 8.6 8.7" TCL_VERSIONS="8.5 8.6 9.0"
TCLSH="" TCLSH=""
for VERSION in $TCL_VERSIONS; do for VERSION in $TCL_VERSIONS; do
+1 -1
View File
@@ -1,5 +1,5 @@
#!/bin/sh #!/bin/sh
TCL_VERSIONS="8.5 8.6 8.7" TCL_VERSIONS="8.5 8.6 9.0"
TCLSH="" TCLSH=""
for VERSION in $TCL_VERSIONS; do for VERSION in $TCL_VERSIONS; do
+1 -1
View File
@@ -1,5 +1,5 @@
#!/bin/sh #!/bin/sh
TCL_VERSIONS="8.5 8.6 8.7" TCL_VERSIONS="8.5 8.6 9.0"
TCLSH="" TCLSH=""
[ -z "$MAKE" ] && MAKE=make [ -z "$MAKE" ] && MAKE=make
+1 -1
View File
@@ -1,5 +1,5 @@
#!/bin/sh #!/bin/sh
TCL_VERSIONS="8.5 8.6 8.7" TCL_VERSIONS="8.5 8.6 9.0"
TCLSH="" TCLSH=""
for VERSION in $TCL_VERSIONS; do for VERSION in $TCL_VERSIONS; do
+1 -3
View File
@@ -7,8 +7,6 @@
# This software is released under the BSD License. See the COPYING file for # This software is released under the BSD License. See the COPYING file for
# more information. # more information.
package require Tcl 8.5
set tcl_precision 17 set tcl_precision 17
source ../support/valkey.tcl source ../support/valkey.tcl
source ../support/util.tcl source ../support/util.tcl
@@ -293,7 +291,7 @@ proc parse_options {} {
incr j incr j
set ::host ${val} set ::host ${val}
} elseif {$opt eq {--tls} || $opt eq {--tls-module}} { } elseif {$opt eq {--tls} || $opt eq {--tls-module}} {
package require tls 1.6 package require tls
::tls::init \ ::tls::init \
-cafile "$::tlsdir/ca.crt" \ -cafile "$::tlsdir/ca.crt" \
-certfile "$::tlsdir/client.crt" \ -certfile "$::tlsdir/client.crt" \
-1
View File
@@ -9,7 +9,6 @@
# $c get foo # $c get foo
# $c close # $c close
package require Tcl 8.5
package provide valkey_cluster 0.1 package provide valkey_cluster 0.1
namespace eval valkey_cluster {} namespace eval valkey_cluster {}
-2
View File
@@ -14,8 +14,6 @@
# changes in many files) we decided to transform the response to RESP2 # changes in many files) we decided to transform the response to RESP2
# when running with --force-resp3 # when running with --force-resp3
package require Tcl 8.5
namespace eval response_transformers {} namespace eval response_transformers {}
# Transform a map response into an array of tuples (tuple = array with 2 elements) # Transform a map response into an array of tuples (tuple = array with 2 elements)
-1
View File
@@ -25,7 +25,6 @@
# #
# vwait forever # vwait forever
package require Tcl 8.5
package provide valkey 0.1 package provide valkey 0.1
source [file join [file dirname [info script]] "response_transformers.tcl"] source [file join [file dirname [info script]] "response_transformers.tcl"]
+3 -5
View File
@@ -2,8 +2,6 @@
# This software is released under the BSD License. See the COPYING file for # This software is released under the BSD License. See the COPYING file for
# more information. # more information.
package require Tcl 8.5
set tcl_precision 17 set tcl_precision 17
source tests/support/valkey.tcl source tests/support/valkey.tcl
source tests/support/aofmanifest.tcl source tests/support/aofmanifest.tcl
@@ -419,7 +417,7 @@ proc test_server_cron {} {
} }
proc accept_test_clients {fd addr port} { proc accept_test_clients {fd addr port} {
fconfigure $fd -encoding binary fconfigure $fd -translation binary
fileevent $fd readable [list read_from_test_client $fd] fileevent $fd readable [list read_from_test_client $fd]
} }
@@ -620,7 +618,7 @@ proc the_end {} {
# to read the command, execute, reply... all this in a loop. # to read the command, execute, reply... all this in a loop.
proc test_client_main server_port { proc test_client_main server_port {
set ::test_server_fd [socket localhost $server_port] set ::test_server_fd [socket localhost $server_port]
fconfigure $::test_server_fd -encoding binary fconfigure $::test_server_fd -translation binary
send_data_packet $::test_server_fd ready [pid] send_data_packet $::test_server_fd ready [pid]
while 1 { while 1 {
set bytes [gets $::test_server_fd] set bytes [gets $::test_server_fd]
@@ -755,7 +753,7 @@ for {set j 0} {$j < [llength $argv]} {incr j} {
} elseif {$opt eq {--io-threads}} { } elseif {$opt eq {--io-threads}} {
set ::io_threads 1 set ::io_threads 1
} elseif {$opt eq {--tls} || $opt eq {--tls-module}} { } elseif {$opt eq {--tls} || $opt eq {--tls-module}} {
package require tls 1.6 package require tls
set ::tls 1 set ::tls 1
::tls::init \ ::tls::init \
-cafile "$::tlsdir/ca.crt" \ -cafile "$::tlsdir/ca.crt" \
+1 -1
View File
@@ -216,7 +216,7 @@ start_server {tags {"other"}} {
} else { } else {
set fd2 [socket [srv host] [srv port]] set fd2 [socket [srv host] [srv port]]
} }
fconfigure $fd2 -encoding binary -translation binary fconfigure $fd2 -translation binary
if {!$::singledb} { if {!$::singledb} {
puts -nonewline $fd2 "SELECT 9\r\n" puts -nonewline $fd2 "SELECT 9\r\n"
flush $fd2 flush $fd2