Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksey Kliger <aleksey@xamarin.com>2016-08-01 23:13:00 +0300
committerAleksey Kliger <aleksey@xamarin.com>2016-08-01 23:13:00 +0300
commite5dfc41368a615fbf2d113a88a5a45c7338dfc8a (patch)
tree22aedf3f072986eb7ab1971f9c5ff1bc797189a2 /mcs/class/Mono.Debugger.Soft
parentfcf5c93cc4b50c92ddc61c8c6a92eedea2554567 (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.cs5
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;