From 89c6f935f859f9e657d8bb6dd53866619e4bdff3 Mon Sep 17 00:00:00 2001 From: Madelyn Olson Date: Sat, 5 Dec 2026 00:53:21 +0000 Subject: [PATCH] Split list-form tags in start_server, tags and test start_server and the tags proc strip double quotes from the tags value and use what is left as the tag list. That splits {"repl external:skip"} into two tags, but [list "acl external:skip"] has the string form {acl external:skip}, whose braces survive, so it stays one tag named "acl external:skip". tags_acceptable never sees external:skip, the block runs against the external server, and CONFIG SET of an immutable override such as aclfile throws, killing the whole test client. The test proc has the same problem for both forms, since it does not strip quotes at all. Flatten the parsed list one level in all three places, so {"a b"}, {a b}, [list a b] and [list "a b"] all yield the same two tags. usercall.tcl tags its role block [list "modules usercall external:skip"], which is a single tag today. It is now skipped on an external server as intended. Signed-off-by: Madelyn Olson --- tests/support/server.tcl | 10 ++++++---- tests/support/test.tcl | 2 ++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/tests/support/server.tcl b/tests/support/server.tcl index 5fd5499bcf0..29395a87a86 100644 --- a/tests/support/server.tcl +++ b/tests/support/server.tcl @@ -307,8 +307,9 @@ proc tags_acceptable {tags err_return} { # doesn't really belong here, but highly coupled to code in start_server proc tags {tags code} { # If we 'tags' contain multiple tags, quoted and separated by spaces, - # we want to get rid of the quotes in order to have a proper list - set tags [string map { \" "" } $tags] + # we want to get rid of the quotes in order to have a proper list. + # Flatten it so {"a b"} and [list "a b"] both yield two tags. + set tags [concat {*}[string map { \" "" } $tags]] check_subtags $tags set ::tags [concat $::tags $tags] if {![tags_acceptable $::tags err]} { @@ -522,8 +523,9 @@ proc start_server {options {code undefined}} { } "tags" { # If we 'tags' contain multiple tags, quoted and separated by spaces, - # we want to get rid of the quotes in order to have a proper list - set tags [string map { \" "" } $value] + # we want to get rid of the quotes in order to have a proper list. + # Flatten it so {"a b"} and [list "a b"] both yield two tags. + set tags [concat {*}[string map { \" "" } $value]] check_subtags $tags set ::tags [concat $::tags $tags] } diff --git a/tests/support/test.tcl b/tests/support/test.tcl index de4844c60b0..09232d7b480 100644 --- a/tests/support/test.tcl +++ b/tests/support/test.tcl @@ -297,6 +297,8 @@ proc test {name code {okpattern undefined} {tags {}}} { } set old_singledb $::singledb + # Flatten so {"a b"} and [list "a b"] both yield two tags, as in start_server. + set tags [concat {*}[string map { \" "" } $tags]] check_subtags $tags set tags [concat $::tags $tags] if {![tags_acceptable $tags err]} {