Skip to content

Commit

Permalink
Value of [ThreadVar -index] depends on static/shared/gcc build (might…
Browse files Browse the repository at this point in the history
… be 2, 4 or 6). So make testcase independant from that.
  • Loading branch information
jan.nijtmans committed Jan 24, 2025
1 parent b41e9d2 commit 33d98e5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/memorymodule.test
Original file line number Diff line number Diff line change
Expand Up @@ -66,17 +66,17 @@ test memorymodule-2.2 {nexted exception} -constraints memorymoduletest -body {
NestedException
} -result 1

test memorymodule-3.0 {_tls_index} -constraints {memorymoduletest thread msvc} -body {
test memorymodule-3.0 {_tls_index} -constraints {memorymoduletest thread} -body {
set t1 [thread::create];
thread::preserve $t1
thread::send $t1 {
lappend auto_path [file join [zipfs root] memorymoduletest]
package require threadvartest
return [list [ThreadVar -index] [ThreadVar -start] [ThreadVar -end]]
return [list [expr {[ThreadVar -index] > 0}] [ThreadVar -start] [ThreadVar -end]]
} result
thread::release $t1
lappend result [ThreadVar -index] [ThreadVar -start] [ThreadVar -end]
} -result {4 0 0 4 0 0}
lappend result [expr {[ThreadVar -index] > 0}] [ThreadVar -start] [ThreadVar -end]
} -result {1 0 0 1 0 0}

# cleanup
::tcltest::cleanupTests
Expand Down

0 comments on commit 33d98e5

Please sign in to comment.