diff options
author | Aleksey Kliger <aleksey@xamarin.com> | 2016-08-01 23:13:00 +0300 |
---|---|---|
committer | Aleksey Kliger <aleksey@xamarin.com> | 2016-08-01 23:13:00 +0300 |
commit | e5dfc41368a615fbf2d113a88a5a45c7338dfc8a (patch) | |
tree | 22aedf3f072986eb7ab1971f9c5ff1bc797189a2 /mcs/class/Mono.Debugger.Soft | |
parent | fcf5c93cc4b50c92ddc61c8c6a92eedea2554567 (diff) |
[test] Fix sporadic Mono.Debugger.Soft ThreadpoolIOsinglestep failure.
ReadAsync size arg should not be greater than array.Length - offset.
Diffstat (limited to 'mcs/class/Mono.Debugger.Soft')
-rw-r--r-- | mcs/class/Mono.Debugger.Soft/Test/dtest-app.cs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/mcs/class/Mono.Debugger.Soft/Test/dtest-app.cs b/mcs/class/Mono.Debugger.Soft/Test/dtest-app.cs index 6587c37c0b5..6617c146f6e 100644 --- a/mcs/class/Mono.Debugger.Soft/Test/dtest-app.cs +++ b/mcs/class/Mono.Debugger.Soft/Test/dtest-app.cs @@ -1570,8 +1570,11 @@ public class Tests : TestsBase, ITest2 var streamIn = c.GetStream (); var bs = new byte[nbytes]; int nread = 0; + int nremain = nbytes; while (nread < nbytes) { - nread += await streamIn.ReadAsync (bs, nread, nbytes); + int r = await streamIn.ReadAsync (bs, nread, nremain); + nread += r; + nremain -= r; } streamIn.Close (); return bs; |