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
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
12 changed files with 17 additions and 58 deletions

View File

@ -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

View File

@ -947,12 +947,10 @@ jobs:
run: dnf -y install epel-release
- name: make
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'
- name: testprep
uses: ./.github/actions/rpm-distros-tcl8
with:
matrix_name: ${{ matrix.name }}
run: dnf -y install tcl tcltls
- name: test
if: true && !contains(github.event.inputs.skiptests, 'valkey')
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
make -j BUILD_TLS=module SERVER_CFLAGS='-Werror'
- name: testprep
uses: ./.github/actions/rpm-distros-tcl8
with:
matrix_name: ${{ matrix.name }}
run: |
dnf -y install tcl tcltls
./utils/gen-test-certs.sh
- name: test
if: true && !contains(github.event.inputs.skiptests, 'valkey')
run: |
@ -1090,9 +1088,9 @@ jobs:
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'
- name: testprep
uses: ./.github/actions/rpm-distros-tcl8
with:
matrix_name: ${{ matrix.name }}
run: |
dnf -y install tcl tcltls
./utils/gen-test-certs.sh
- name: test
if: true && !contains(github.event.inputs.skiptests, 'valkey')
run: |

View File

@ -1,5 +1,5 @@
#!/bin/sh
TCL_VERSIONS="8.5 8.6 8.7"
TCL_VERSIONS="8.5 8.6 9.0"
TCLSH=""
for VERSION in $TCL_VERSIONS; do

View File

@ -1,5 +1,5 @@
#!/bin/sh
TCL_VERSIONS="8.5 8.6 8.7"
TCL_VERSIONS="8.5 8.6 9.0"
TCLSH=""
for VERSION in $TCL_VERSIONS; do

View File

@ -1,5 +1,5 @@
#!/bin/sh
TCL_VERSIONS="8.5 8.6 8.7"
TCL_VERSIONS="8.5 8.6 9.0"
TCLSH=""
[ -z "$MAKE" ] && MAKE=make

View File

@ -1,5 +1,5 @@
#!/bin/sh
TCL_VERSIONS="8.5 8.6 8.7"
TCL_VERSIONS="8.5 8.6 9.0"
TCLSH=""
for VERSION in $TCL_VERSIONS; do

View File

@ -7,8 +7,6 @@
# This software is released under the BSD License. See the COPYING file for
# more information.
package require Tcl 8.5
set tcl_precision 17
source ../support/valkey.tcl
source ../support/util.tcl
@ -293,7 +291,7 @@ proc parse_options {} {
incr j
set ::host ${val}
} elseif {$opt eq {--tls} || $opt eq {--tls-module}} {
package require tls 1.6
package require tls
::tls::init \
-cafile "$::tlsdir/ca.crt" \
-certfile "$::tlsdir/client.crt" \

View File

@ -9,7 +9,6 @@
# $c get foo
# $c close
package require Tcl 8.5
package provide valkey_cluster 0.1
namespace eval valkey_cluster {}

View File

@ -14,8 +14,6 @@
# changes in many files) we decided to transform the response to RESP2
# when running with --force-resp3
package require Tcl 8.5
namespace eval response_transformers {}
# Transform a map response into an array of tuples (tuple = array with 2 elements)

View File

@ -25,7 +25,6 @@
#
# vwait forever
package require Tcl 8.5
package provide valkey 0.1
source [file join [file dirname [info script]] "response_transformers.tcl"]

View File

@ -2,8 +2,6 @@
# This software is released under the BSD License. See the COPYING file for
# more information.
package require Tcl 8.5
set tcl_precision 17
source tests/support/valkey.tcl
source tests/support/aofmanifest.tcl
@ -419,7 +417,7 @@ proc test_server_cron {} {
}
proc accept_test_clients {fd addr port} {
fconfigure $fd -encoding binary
fconfigure $fd -translation binary
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.
proc test_client_main 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]
while 1 {
set bytes [gets $::test_server_fd]
@ -755,7 +753,7 @@ for {set j 0} {$j < [llength $argv]} {incr j} {
} elseif {$opt eq {--io-threads}} {
set ::io_threads 1
} elseif {$opt eq {--tls} || $opt eq {--tls-module}} {
package require tls 1.6
package require tls
set ::tls 1
::tls::init \
-cafile "$::tlsdir/ca.crt" \

View File

@ -216,7 +216,7 @@ start_server {tags {"other"}} {
} else {
set fd2 [socket [srv host] [srv port]]
}
fconfigure $fd2 -encoding binary -translation binary
fconfigure $fd2 -translation binary
if {!$::singledb} {
puts -nonewline $fd2 "SELECT 9\r\n"
flush $fd2