mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
Set end of subslice as begin of next subslice
syscall test split testcase via shard count, reset high bound as begin of next subslice, cause the slice is half-open range. Change-Id: I1954f57c93cbfd9be518153315da305a2de377a0 PiperOrigin-RevId: 229405199
This commit is contained in:
@@ -271,7 +271,8 @@ func main() {
|
||||
// Calculate subslice of tests to run.
|
||||
shardSize := int(math.Ceil(float64(len(testCases)) / float64(total)))
|
||||
begin := index * shardSize
|
||||
end := ((index + 1) * shardSize) - 1
|
||||
// Set end as begin of next subslice.
|
||||
end := ((index + 1) * shardSize)
|
||||
if begin > len(testCases) {
|
||||
// Nothing to run.
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user