Skip to content

Commit

Permalink
add debug-defrag flag for tests + debug_defarg::skip tag option for t…
Browse files Browse the repository at this point in the history
…ests

Signed-off-by: Ran Shidlansik <[email protected]>
  • Loading branch information
ranshid committed Dec 10, 2024
1 parent 51e83ad commit 5a836a1
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
5 changes: 5 additions & 0 deletions tests/support/server.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,11 @@ proc tags_acceptable {tags err_return} {
return 0
}

if {$::force_defrag && [lsearch $tags "debug_defrag:skip"] >= 0} {
set err "Not supported on server compiled with DEBUG_FORCE_DEFRAG option"
return 0
}

if {$::singledb && [lsearch $tags "singledb:skip"] >= 0} {
set err "Not supported on singledb"
return 0
Expand Down
3 changes: 3 additions & 0 deletions tests/test_helper.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -607,6 +607,7 @@ proc print_help_screen {} {
"--ignore-encoding Don't validate object encoding."
"--ignore-digest Don't use debug digest validations."
"--large-memory Run tests using over 100mb."
"--debug-defrag Indicate the test is running against server compiled with DEBUG_FORCE_DEFRAG option"
"--help Print this help screen."
} "\n"]
}
Expand Down Expand Up @@ -748,6 +749,8 @@ for {set j 0} {$j < [llength $argv]} {incr j} {
set ::ignoreencoding 1
} elseif {$opt eq {--ignore-digest}} {
set ::ignoredigest 1
} elseif {$opt eq {--debug-defrag}} {
set ::debug_defrag 1
} elseif {$opt eq {--help}} {
print_help_screen
exit 0
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/info.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ proc latency_percentiles_usec {cmd} {
return [latencyrstat_percentiles $cmd r]
}

start_server {tags {"info" "external:skip"}} {
start_server {tags {"info" "external:skip" "force_defrag:skip"}} {
start_server {} {

test {latencystats: disable/enable} {
Expand Down

0 comments on commit 5a836a1

Please sign in to comment.