"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "tests/test_helper.tcl" between
redis-6.0.7.tar.gz and redis-6.0.8.tar.gz

About: redis is an advanced key-value store. It is often referred to as a data structure server since keys can contain strings, hashes, lists, sets and sorted sets.

test_helper.tcl  (redis-6.0.7):test_helper.tcl  (redis-6.0.8)
skipping to change at line 82 skipping to change at line 82
} }
# Index to the next test to run in the ::all_tests list. # Index to the next test to run in the ::all_tests list.
set ::next_test 0 set ::next_test 0
set ::host 127.0.0.1 set ::host 127.0.0.1
set ::port 6379; # port for external server set ::port 6379; # port for external server
set ::baseport 21111; # initial port for spawned redis servers set ::baseport 21111; # initial port for spawned redis servers
set ::portcount 8000; # we don't wanna use more than 10000 to avoid collision wi th cluster bus ports set ::portcount 8000; # we don't wanna use more than 10000 to avoid collision wi th cluster bus ports
set ::traceleaks 0 set ::traceleaks 0
set ::valgrind 0 set ::valgrind 0
set ::durable 0
set ::tls 0 set ::tls 0
set ::stack_logging 0 set ::stack_logging 0
set ::verbose 0 set ::verbose 0
set ::quiet 0 set ::quiet 0
set ::denytags {} set ::denytags {}
set ::skiptests {} set ::skiptests {}
set ::skipunits {}
set ::allowtags {} set ::allowtags {}
set ::only_tests {} set ::only_tests {}
set ::single_tests {} set ::single_tests {}
set ::run_solo_tests {} set ::run_solo_tests {}
set ::skip_till "" set ::skip_till ""
set ::external 0; # If "1" this means, we are running against external instance set ::external 0; # If "1" this means, we are running against external instance
set ::file ""; # If set, runs only the tests in this comma separated list set ::file ""; # If set, runs only the tests in this comma separated list
set ::curfile ""; # Hold the filename of the current suite set ::curfile ""; # Hold the filename of the current suite
set ::accurate 0; # If true runs fuzz tests with more iterations set ::accurate 0; # If true runs fuzz tests with more iterations
set ::force_failure 0 set ::force_failure 0
skipping to change at line 426 skipping to change at line 428
} }
} }
proc lpop {listVar {count 1}} { proc lpop {listVar {count 1}} {
upvar 1 $listVar l upvar 1 $listVar l
set ele [lindex $l 0] set ele [lindex $l 0]
set l [lrange $l 1 end] set l [lrange $l 1 end]
set ele set ele
} }
proc lremove {listVar value} {
upvar 1 $listVar var
set idx [lsearch -exact $var $value]
set var [lreplace $var $idx $idx]
}
# A new client is idle. Remove it from the list of active clients and # A new client is idle. Remove it from the list of active clients and
# if there are still test units to run, launch them. # if there are still test units to run, launch them.
proc signal_idle_client fd { proc signal_idle_client fd {
# Remove this fd from the list of active clients. # Remove this fd from the list of active clients.
set ::active_clients \ set ::active_clients \
[lsearch -all -inline -not -exact $::active_clients $fd] [lsearch -all -inline -not -exact $::active_clients $fd]
# New unit to process? # New unit to process?
if {$::next_test != [llength $::all_tests]} { if {$::next_test != [llength $::all_tests]} {
if {!$::quiet} { if {!$::quiet} {
skipping to change at line 517 skipping to change at line 525
proc send_data_packet {fd status data} { proc send_data_packet {fd status data} {
set payload [list $status $data] set payload [list $status $data]
puts $fd [string length $payload] puts $fd [string length $payload]
puts -nonewline $fd $payload puts -nonewline $fd $payload
flush $fd flush $fd
} }
proc print_help_screen {} { proc print_help_screen {} {
puts [join { puts [join {
"--valgrind Run the test over valgrind." "--valgrind Run the test over valgrind."
"--durable suppress test crashes and keep running"
"--stack-logging Enable OSX leaks/malloc stack logging." "--stack-logging Enable OSX leaks/malloc stack logging."
"--accurate Run slow randomized tests for more iterations." "--accurate Run slow randomized tests for more iterations."
"--quiet Don't show individual tests." "--quiet Don't show individual tests."
"--single <unit> Just execute the specified unit (see next option). t his option can be repeated." "--single <unit> Just execute the specified unit (see next option). t his option can be repeated."
"--list-tests List all the available test units." "--list-tests List all the available test units."
"--only <test> Just execute the specified test by test name. this o ption can be repeated." "--only <test> Just execute the specified test by test name. this o ption can be repeated."
"--skip-till <unit> Skip all units until (and including) the specified o ne." "--skip-till <unit> Skip all units until (and including) the specified o ne."
"--skipunit <unit> Skip one unit."
"--clients <num> Number of test clients (default 16)." "--clients <num> Number of test clients (default 16)."
"--timeout <sec> Test timeout in seconds (default 10 min)." "--timeout <sec> Test timeout in seconds (default 10 min)."
"--force-failure Force the execution of a test that always fails." "--force-failure Force the execution of a test that always fails."
"--config <k> <v> Extra config file argument." "--config <k> <v> Extra config file argument."
"--skipfile <file> Name of a file containing test names that should be skipped (one per line)." "--skipfile <file> Name of a file containing test names that should be skipped (one per line)."
"--skiptest <name> Name of a file containing test names that should be skipped (one per line)."
"--dont-clean Don't delete redis log files after the run." "--dont-clean Don't delete redis log files after the run."
"--stop Blocks once the first test fails." "--stop Blocks once the first test fails."
"--loop Execute the specified set of tests forever." "--loop Execute the specified set of tests forever."
"--wait-server Wait after server is started (so that you can attach a debugger)." "--wait-server Wait after server is started (so that you can attach a debugger)."
"--tls Run tests in TLS mode." "--tls Run tests in TLS mode."
"--host <addr> Run tests against an external host." "--host <addr> Run tests against an external host."
"--port <port> TCP port to use against external host." "--port <port> TCP port to use against external host."
"--baseport <port> Initial port number for spawned redis servers." "--baseport <port> Initial port number for spawned redis servers."
"--portcount <num> Port range for spawned redis servers." "--portcount <num> Port range for spawned redis servers."
"--help Print this help screen." "--help Print this help screen."
skipping to change at line 566 skipping to change at line 577
set arg2 [lindex $argv [expr $j+2]] set arg2 [lindex $argv [expr $j+2]]
lappend ::global_overrides $arg lappend ::global_overrides $arg
lappend ::global_overrides $arg2 lappend ::global_overrides $arg2
incr j 2 incr j 2
} elseif {$opt eq {--skipfile}} { } elseif {$opt eq {--skipfile}} {
incr j incr j
set fp [open $arg r] set fp [open $arg r]
set file_data [read $fp] set file_data [read $fp]
close $fp close $fp
set ::skiptests [split $file_data "\n"] set ::skiptests [split $file_data "\n"]
} elseif {$opt eq {--skiptest}} {
lappend ::skiptests $arg
incr j
} elseif {$opt eq {--valgrind}} { } elseif {$opt eq {--valgrind}} {
set ::valgrind 1 set ::valgrind 1
} elseif {$opt eq {--stack-logging}} { } elseif {$opt eq {--stack-logging}} {
if {[string match {*Darwin*} [exec uname -a]]} { if {[string match {*Darwin*} [exec uname -a]]} {
set ::stack_logging 1 set ::stack_logging 1
} }
} elseif {$opt eq {--quiet}} { } elseif {$opt eq {--quiet}} {
set ::quiet 1 set ::quiet 1
} elseif {$opt eq {--tls}} { } elseif {$opt eq {--tls}} {
package require tls 1.6 package require tls 1.6
skipping to change at line 604 skipping to change at line 618
} elseif {$opt eq {--accurate}} { } elseif {$opt eq {--accurate}} {
set ::accurate 1 set ::accurate 1
} elseif {$opt eq {--force-failure}} { } elseif {$opt eq {--force-failure}} {
set ::force_failure 1 set ::force_failure 1
} elseif {$opt eq {--single}} { } elseif {$opt eq {--single}} {
lappend ::single_tests $arg lappend ::single_tests $arg
incr j incr j
} elseif {$opt eq {--only}} { } elseif {$opt eq {--only}} {
lappend ::only_tests $arg lappend ::only_tests $arg
incr j incr j
} elseif {$opt eq {--skipunit}} {
lappend ::skipunits $arg
incr j
} elseif {$opt eq {--skip-till}} { } elseif {$opt eq {--skip-till}} {
set ::skip_till $arg set ::skip_till $arg
incr j incr j
} elseif {$opt eq {--list-tests}} { } elseif {$opt eq {--list-tests}} {
foreach t $::all_tests { foreach t $::all_tests {
puts $t puts $t
} }
exit 0 exit 0
} elseif {$opt eq {--verbose}} { } elseif {$opt eq {--verbose}} {
set ::verbose 1 set ::verbose 1
} elseif {$opt eq {--client}} { } elseif {$opt eq {--client}} {
set ::client 1 set ::client 1
set ::test_server_port $arg set ::test_server_port $arg
incr j incr j
} elseif {$opt eq {--clients}} { } elseif {$opt eq {--clients}} {
set ::numclients $arg set ::numclients $arg
incr j incr j
} elseif {$opt eq {--durable}} {
set ::durable 1
} elseif {$opt eq {--dont-clean}} { } elseif {$opt eq {--dont-clean}} {
set ::dont_clean 1 set ::dont_clean 1
} elseif {$opt eq {--wait-server}} { } elseif {$opt eq {--wait-server}} {
set ::wait_server 1 set ::wait_server 1
} elseif {$opt eq {--stop}} { } elseif {$opt eq {--stop}} {
set ::stop_on_failure 1 set ::stop_on_failure 1
} elseif {$opt eq {--loop}} { } elseif {$opt eq {--loop}} {
set ::loop 1 set ::loop 1
} elseif {$opt eq {--timeout}} { } elseif {$opt eq {--timeout}} {
set ::timeout $arg set ::timeout $arg
incr j incr j
} elseif {$opt eq {--help}} { } elseif {$opt eq {--help}} {
print_help_screen print_help_screen
exit 0 exit 0
} else { } else {
puts "Wrong argument: $opt" puts "Wrong argument: $opt"
exit 1 exit 1
} }
} }
# If --skil-till option was given, we populate the list of single tests set filtered_tests {}
# Set the filtered tests to be the short list (single_tests) if exists.
# Otherwise, we start filtering all_tests
if {[llength $::single_tests] > 0} {
set filtered_tests $::single_tests
} else {
set filtered_tests $::all_tests
}
# If --skip-till option was given, we populate the list of single tests
# to run with everything *after* the specified unit. # to run with everything *after* the specified unit.
if {$::skip_till != ""} { if {$::skip_till != ""} {
set skipping 1 set skipping 1
foreach t $::all_tests { foreach t $::all_tests {
if {$skipping == 0} { if {$skipping == 1} {
lappend ::single_tests $t lremove filtered_tests $t
} }
if {$t == $::skip_till} { if {$t == $::skip_till} {
set skipping 0 set skipping 0
} }
} }
if {$skipping} { if {$skipping} {
puts "test $::skip_till not found" puts "test $::skip_till not found"
exit 0 exit 0
} }
} }
# If --skipunits option was given, we populate the list of single tests
# to run with everything *not* in the skipunits list.
if {[llength $::skipunits] > 0} {
foreach t $::all_tests {
if {[lsearch $::skipunits $t] != -1} {
lremove filtered_tests $t
}
}
}
# Override the list of tests with the specific tests we want to run # Override the list of tests with the specific tests we want to run
# in case there was some filter, that is --single or --skip-till options. # in case there was some filter, that is --single, -skipunit or --skip-till opti
if {[llength $::single_tests] > 0} { ons.
set ::all_tests $::single_tests if {[llength $filtered_tests] < [llength $::all_tests]} {
set ::all_tests $filtered_tests
} }
proc attach_to_replication_stream {} { proc attach_to_replication_stream {} {
if {$::tls} { if {$::tls} {
set s [::tls::socket [srv 0 "host"] [srv 0 "port"]] set s [::tls::socket [srv 0 "host"] [srv 0 "port"]]
} else { } else {
set s [socket [srv 0 "host"] [srv 0 "port"]] set s [socket [srv 0 "host"] [srv 0 "port"]]
} }
fconfigure $s -translation binary fconfigure $s -translation binary
puts -nonewline $s "SYNC\r\n" puts -nonewline $s "SYNC\r\n"
 End of changes. 13 change blocks. 
6 lines changed or deleted 46 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)