summaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorYong He <chenglang.hy@alibaba-inc.com>2019-01-15 11:14:59 -0800
committerShentubot <shentubot@google.com>2019-01-15 11:16:10 -0800
commit6c117a01e97b5604dc474cf02269cf03fc797af8 (patch)
treee5d5918940915a847d6482d6151a6998941c6678 /test
parentdc8450b5676d4c4ac9bcfa23cabd862e0060527d (diff)
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
Diffstat (limited to 'test')
-rw-r--r--test/syscalls/syscall_test_runner.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/syscalls/syscall_test_runner.go b/test/syscalls/syscall_test_runner.go
index 0149afd60..1f2ff9864 100644
--- a/test/syscalls/syscall_test_runner.go
+++ b/test/syscalls/syscall_test_runner.go
@@ -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