Imported Upstream version 4.0.3.19

Former-commit-id: 3869fd58d5153302a2708e2cc3f80e000b19c35c
This commit is contained in:
Xamarin Public Jenkins 2015-07-24 04:03:39 -04:00
parent 2c051c3d51
commit 5d55bfa52c
28 changed files with 627 additions and 33 deletions

View File

@ -85,7 +85,7 @@ DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
$(srcdir)/config.h.in mkinstalldirs \
$(srcdir)/mono-core.spec.in $(srcdir)/mono-uninstalled.pc.in \
AUTHORS COPYING.LIB ChangeLog NEWS compile config.guess \
config.rpath config.sub install-sh missing ltmain.sh
config.rpath config.sub depcomp install-sh missing ltmain.sh
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/iconv.m4 \
$(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \

View File

@ -274,7 +274,6 @@ namespace System.IO {
started = false;
inDispatch = false;
fsw.EnableRaisingEvents = false;
throw exc;
}
if (exc != null)
fsw.DispatchErrorEvents (new ErrorEventArgs (exc));
@ -382,6 +381,10 @@ namespace System.IO {
}
if ((kevt.fflags & FilterFlags.VNodeDelete) == FilterFlags.VNodeDelete || (kevt.fflags & FilterFlags.VNodeRevoke) == FilterFlags.VNodeRevoke) {
if (pathData.Path == fullPathNoLastSlash)
//The root path is deleted; exit silently
return;
removeQueue.Add (pathData);
continue;
}

View File

@ -1 +1 @@
b4bd1fc94e2f39c65a9cc3f1224e45a1e8fb3e37
2cb9b879f6aba233292087d703c0ca56add6db17

View File

@ -1 +1 @@
7bfd852fe1e8dfccebc97bc42d66f587b73fc941
9504cf171139c47f31f12dfde2eb65a18e4e699d

View File

@ -1 +1 @@
e1a7446b92066e58218a67fdb7c41ceeaac06ba1
d19fae1ffb537f031ff1756bb9275552cbf66ff3

View File

@ -1 +1 @@
d1e78ca363e0bc43ca096886c4e79ff83563cc31
67edc999c07a3cf2122b9feb803a81ed15a182fc

View File

@ -1 +1 @@
af5a7726c9961fd49e771b276c914cee6dd7ca85
45697c8527dbebf164126f53cd5691ea40a03eab

View File

@ -661,15 +661,15 @@ rcheck: mono $(regtests)
if NACL_CODEGEN
for i in $(regtests); do echo "running test $$i"; $(RUNTIME) $$i --exclude 'NaClDisable' || exit 1; done
else
-($(RUNTIME) --regression $(regtests); echo $$? > regressionexitcode.out) | ./emitnunit.pl
-($(RUNTIME) --regression $(regtests); echo $$? > regressionexitcode.out) | $(srcdir)/emitnunit.pl
exit $$(cat regressionexitcode.out)
endif
check-seq-points: mono $(regtests)
rm -f TestResults_op_il_seq_point.xml
for i in $(regtests); do ./test_op_il_seq_point.sh $$i || (./test_op_il_seq_point_headerfooter.sh; exit 1) || exit 1; done
for i in $(regtests); do ./test_op_il_seq_point.sh $$i --aot || (./test_op_il_seq_point_headerfooter.sh; exit 1) || exit 1; done
./test_op_il_seq_point_headerfooter.sh
for i in $(regtests); do $(srcdir)/test_op_il_seq_point.sh $$i || ($(srcdir)/test_op_il_seq_point_headerfooter.sh; exit 1) || exit 1; done
for i in $(regtests); do $(srcdir)/test_op_il_seq_point.sh $$i --aot || ($(srcdir)/test_op_il_seq_point_headerfooter.sh; exit 1) || exit 1; done
$(srcdir)/test_op_il_seq_point_headerfooter.sh
gctest: mono gc-test.exe
MONO_DEBUG_OPTIONS=clear-nursery-at-gc $(RUNTIME) --regression gc-test.exe
@ -740,6 +740,7 @@ BUILT_SOURCES = version.h $(arch_built)
CLEANFILES= $(BUILT_SOURCES) *.exe *.dll
EXTRA_DIST = TestDriver.cs ldscript ldscript.mono \
genmdesc.pl \
emitnunit.pl \
$(test_sources) \
$(x86_sources) cpu-x86.md \
$(amd64_sources) cpu-amd64.md \
@ -758,7 +759,7 @@ EXTRA_DIST = TestDriver.cs ldscript ldscript.mono \
Makefile.am.in
version.h: Makefile
echo "#define FULL_VERSION \"Stable 4.0.3.13/429313d\"" > version.h
echo "#define FULL_VERSION \"Stable 4.0.3.19/e4f44c1\"" > version.h
# Utility target for patching libtool to speed up linking
patch-libtool:

View File

@ -661,15 +661,15 @@ rcheck: mono $(regtests)
if NACL_CODEGEN
for i in $(regtests); do echo "running test $$i"; $(RUNTIME) $$i --exclude 'NaClDisable' || exit 1; done
else
-($(RUNTIME) --regression $(regtests); echo $$? > regressionexitcode.out) | ./emitnunit.pl
-($(RUNTIME) --regression $(regtests); echo $$? > regressionexitcode.out) | $(srcdir)/emitnunit.pl
exit $$(cat regressionexitcode.out)
endif
check-seq-points: mono $(regtests)
rm -f TestResults_op_il_seq_point.xml
for i in $(regtests); do ./test_op_il_seq_point.sh $$i || (./test_op_il_seq_point_headerfooter.sh; exit 1) || exit 1; done
for i in $(regtests); do ./test_op_il_seq_point.sh $$i --aot || (./test_op_il_seq_point_headerfooter.sh; exit 1) || exit 1; done
./test_op_il_seq_point_headerfooter.sh
for i in $(regtests); do $(srcdir)/test_op_il_seq_point.sh $$i || ($(srcdir)/test_op_il_seq_point_headerfooter.sh; exit 1) || exit 1; done
for i in $(regtests); do $(srcdir)/test_op_il_seq_point.sh $$i --aot || ($(srcdir)/test_op_il_seq_point_headerfooter.sh; exit 1) || exit 1; done
$(srcdir)/test_op_il_seq_point_headerfooter.sh
gctest: mono gc-test.exe
MONO_DEBUG_OPTIONS=clear-nursery-at-gc $(RUNTIME) --regression gc-test.exe
@ -740,6 +740,7 @@ BUILT_SOURCES = version.h $(arch_built)
CLEANFILES= $(BUILT_SOURCES) *.exe *.dll
EXTRA_DIST = TestDriver.cs ldscript ldscript.mono \
genmdesc.pl \
emitnunit.pl \
$(test_sources) \
$(x86_sources) cpu-x86.md \
$(amd64_sources) cpu-amd64.md \
@ -758,7 +759,7 @@ EXTRA_DIST = TestDriver.cs ldscript ldscript.mono \
Makefile.am.in
version.h: Makefile
echo "#define FULL_VERSION \"Stable 4.0.3.13/429313d\"" > version.h
echo "#define FULL_VERSION \"Stable 4.0.3.19/e4f44c1\"" > version.h
# Utility target for patching libtool to speed up linking
patch-libtool:

View File

@ -1 +1 @@
69eae9968f7637f83f0e9f91850e8f2a9d4c4ad8
58f40d74960bb5ae7a567efca193f178d82bf3ac

View File

@ -357,7 +357,7 @@ long_conv_to_ovf_i4_2: dest:i src1:i src2:i len:36
vcall2: len:20 clob:c
vcall2_reg: src1:i len:8 clob:c
vcall2_membase: src1:b len:12 clob:c
dyn_call: src1:i src2:i len:120 clob:c
dyn_call: src1:i src2:i len:136 clob:c
# This is different from the original JIT opcodes
float_beq: len:32

76
mono/mini/emitnunit.pl Executable file
View File

@ -0,0 +1,76 @@
#!/usr/bin/perl
use strict;
use warnings;
use Cwd;
use POSIX qw(strftime uname locale_h);
use Net::Domain qw(hostname hostfqdn);
use locale;
my $line;
foreach $line (<STDIN>) {
chomp ($line);
print "$line\n";
if ($line =~ /^Overall results:/) {
# do magic nunit emission here
# failures look like:
# Overall results: tests: 19992, failed: 48, opt combinations: 24 (pass: 99.76%)
# passes look like:
# Overall results: tests: 20928, 100% pass, opt combinations: 24
my @words = split (/ /, $line);
my $failed;
my $successbool;
my $total = $words[3];
my $mylocale = setlocale (LC_CTYPE);
$mylocale = substr($mylocale, 0, index($mylocale, '.'));
$mylocale =~ s/_/-/;
if ($line =~ /failed:/) {
$failed = $words[5];
} else {
$failed = "0,";
}
chop ($failed);
chop ($total);
if ($failed > 0) {
$successbool = "False";
} else {
$successbool = "True";
}
open (my $nunitxml, '>', 'TestResults_regression.xml') or die "Could not write to 'TestResults_regression.xml' $!";
print $nunitxml "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"no\"?>\n";
print $nunitxml "<!--This file represents the results of running a test suite-->\n";
print $nunitxml "<test-results name=\"regression-tests.dummy\" total=\"$total\" failures=\"$failed\" not-run=\"0\" date=\"" . strftime ("%F", localtime) . "\" time=\"" . strftime ("%T", localtime) . "\">\n";
print $nunitxml " <environment nunit-version=\"2.4.8.0\" clr-version=\"4.0.30319.17020\" os-version=\"Unix " . (uname ())[2] . "\" platform=\"Unix\" cwd=\"" . getcwd . "\" machine-name=\"" . hostname . "\" user=\"" . getpwuid ($<) . "\" user-domain=\"" . hostfqdn . "\" />\n";
print $nunitxml " <culture-info current-culture=\"$mylocale\" current-uiculture=\"$mylocale\" />\n";
print $nunitxml " <test-suite name=\"regression-tests.dummy\" success=\"$successbool\" time=\"0\" asserts=\"0\">\n";
print $nunitxml " <results>\n";
print $nunitxml " <test-suite name=\"MonoTests\" success=\"$successbool\" time=\"0\" asserts=\"0\">\n";
print $nunitxml " <results>\n";
print $nunitxml " <test-suite name=\"regressions\" success=\"$successbool\" time=\"0\" asserts=\"0\">\n";
print $nunitxml " <results>\n";
print $nunitxml " <test-case name=\"MonoTests.regressions.100percentsuccess\" executed=\"True\" success=\"$successbool\" time=\"0\" asserts=\"0\"";
if ( $failed > 0) {
print $nunitxml ">\n";
print $nunitxml " <failure>\n";
print $nunitxml " <message><![CDATA[";
foreach $line (<STDIN>) {
chomp ($line);
print "$line\n";
}
print $nunitxml "]]></message>\n";
print $nunitxml " <stack-trace>\n";
print $nunitxml " </stack-trace>\n";
print $nunitxml " </failure>\n";
print $nunitxml " </test-case>\n";
} else {
print $nunitxml " />\n";
}
print $nunitxml " </results>\n";
print $nunitxml " </test-suite>\n";
print $nunitxml " </results>\n";
print $nunitxml " </test-suite>\n";
print $nunitxml " </results>\n";
print $nunitxml " </test-suite>\n";
print $nunitxml "</test-results>\n";
close $nunitxml;
}
}

View File

@ -179,7 +179,7 @@ typedef struct {
#define PARAM_REGS 4
#define DYN_CALL_STACK_ARGS 6
#define DYN_CALL_STACK_ARGS 10
typedef struct {
mgreg_t regs [PARAM_REGS + DYN_CALL_STACK_ARGS];
@ -268,7 +268,7 @@ typedef struct MonoCompileArch {
#define MONO_ARCH_GSHARED_SUPPORTED 1
#define MONO_ARCH_DYN_CALL_SUPPORTED 1
#define MONO_ARCH_DYN_CALL_PARAM_AREA 24
#define MONO_ARCH_DYN_CALL_PARAM_AREA (DYN_CALL_STACK_ARGS * sizeof (mgreg_t))
#ifndef MONO_CROSS_COMPILE
#define MONO_ARCH_SOFT_DEBUG_SUPPORTED 1

View File

@ -1 +1 @@
#define FULL_VERSION "Stable 4.0.3.13/429313d"
#define FULL_VERSION "Stable 4.0.3.19/e4f44c1"

View File

@ -667,7 +667,7 @@ TESTSI_IL=$(TEST_IL_SRC:.il=.exe)
TESTBS=$(BENCHSRC:.cs=.exe)
STRESS_TESTS=$(STRESS_TESTS_SRC:.cs=.exe)
EXTRA_DIST=test-driver $(TEST_CS_SRC_DIST) $(TEST_IL_SRC) \
EXTRA_DIST=test-driver test-runner.cs $(TEST_CS_SRC_DIST) $(TEST_IL_SRC) \
$(BENCHSRC) $(STRESS_TESTS_SRC) stress-runner.pl $(PREREQ_IL_SRC) $(PREREQ_CS_SRC)
%.exe: %.il

View File

@ -1041,11 +1041,12 @@ TESTBS = $(BENCHSRC:.cs=.exe)
STRESS_TESTS = $(STRESS_TESTS_SRC:.cs=.exe)
# Generated tests for runtime invoke
EXTRA_DIST = test-driver $(TEST_CS_SRC_DIST) $(TEST_IL_SRC) \
$(BENCHSRC) $(STRESS_TESTS_SRC) stress-runner.pl \
$(PREREQ_IL_SRC) $(PREREQ_CS_SRC) load-missing.il t-missing.cs \
load-exceptions.cs custom-attr-errors.cs \
custom-attr-errors-lib.cs reflection-load-with-context-lib.cs \
EXTRA_DIST = test-driver test-runner.cs $(TEST_CS_SRC_DIST) \
$(TEST_IL_SRC) $(BENCHSRC) $(STRESS_TESTS_SRC) \
stress-runner.pl $(PREREQ_IL_SRC) $(PREREQ_CS_SRC) \
load-missing.il t-missing.cs load-exceptions.cs \
custom-attr-errors.cs custom-attr-errors-lib.cs \
reflection-load-with-context-lib.cs \
reflection-load-with-context-second-lib.cs \
reflection-load-with-context.cs debug-casts.cs sgen-bridge.cs \
sgen-descriptors.cs sgen-gshared-vtype.cs \

469
mono/tests/test-runner.cs Normal file
View File

@ -0,0 +1,469 @@
//
// test-runner.cs
//
// Author:
// Zoltan Varga (vargaz@gmail.com)
//
// Copyright (C) 2008 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
using System.IO;
using System.Threading;
using System.Diagnostics;
using System.Collections.Generic;
using System.Globalization;
using System.Xml;
//
// This is a simple test runner with support for parallel execution
//
public class TestRunner
{
class ProcessData {
public string test;
public StreamWriter stdout, stderr;
public string stdoutFile, stderrFile;
public void CloseStreams () {
if (stdout != null) {
stdout.Close ();
stdout = null;
}
if (stderr != null) {
stderr.Close ();
stderr = null;
}
}
}
class TestInfo {
public string test, opt_set;
}
public static int Main (String[] args) {
// Defaults
int concurrency = 1;
int timeout = 2 * 60; // in seconds
DateTime test_start_time = DateTime.UtcNow;
// FIXME: Add support for runtime arguments + env variables
string disabled_tests = null;
string runtime = "mono";
var opt_sets = new List<string> ();
// Process options
int i = 0;
while (i < args.Length) {
if (args [i].StartsWith ("-")) {
if (args [i] == "-j") {
if (i + i >= args.Length) {
Console.WriteLine ("Missing argument to -j command line option.");
return 1;
}
if (args [i + 1] == "a")
concurrency = Environment.ProcessorCount;
else
concurrency = Int32.Parse (args [i + 1]);
i += 2;
} else if (args [i] == "--timeout") {
if (i + i >= args.Length) {
Console.WriteLine ("Missing argument to --timeout command line option.");
return 1;
}
timeout = Int32.Parse (args [i + 1]);
i += 2;
} else if (args [i] == "--disabled") {
if (i + i >= args.Length) {
Console.WriteLine ("Missing argument to --disabled command line option.");
return 1;
}
disabled_tests = args [i + 1];
i += 2;
} else if (args [i] == "--runtime") {
if (i + i >= args.Length) {
Console.WriteLine ("Missing argument to --runtime command line option.");
return 1;
}
runtime = args [i + 1];
i += 2;
} else if (args [i] == "--opt-sets") {
if (i + i >= args.Length) {
Console.WriteLine ("Missing argument to --opt-sets command line option.");
return 1;
}
foreach (var s in args [i + 1].Split ())
opt_sets.Add (s);
i += 2;
} else {
Console.WriteLine ("Unknown command line option: '" + args [i] + "'.");
return 1;
}
} else {
break;
}
}
var disabled = new Dictionary <string, string> ();
if (disabled_tests != null) {
foreach (string test in disabled_tests.Split ())
disabled [test] = test;
}
// The remaining arguments are the tests
var tests = new List<string> ();
for (int j = i; j < args.Length; ++j)
if (!disabled.ContainsKey (args [j]))
tests.Add (args [j]);
int npassed = 0;
int nfailed = 0;
var processes = new List<Process> ();
var passed = new List<ProcessData> ();
var failed = new List<ProcessData> ();
var process_data = new Dictionary<Process, ProcessData> ();
object monitor = new object ();
var terminated = new List<Process> ();
if (concurrency != 1)
Console.WriteLine ("Running tests: ");
var test_info = new List<TestInfo> ();
if (opt_sets.Count == 0) {
foreach (string s in tests)
test_info.Add (new TestInfo { test = s });
} else {
foreach (string opt in opt_sets) {
foreach (string s in tests)
test_info.Add (new TestInfo { test = s, opt_set = opt });
}
}
foreach (TestInfo ti in test_info) {
lock (monitor) {
while (processes.Count == concurrency) {
/* Wait for one process to terminate */
Monitor.Wait (monitor);
}
/* Cleaup terminated processes */
foreach (Process dead in terminated) {
if (process_data [dead].stdout != null)
process_data [dead].stdout.Close ();
if (process_data [dead].stderr != null)
process_data [dead].stderr.Close ();
// This is needed to avoid CreateProcess failed errors :(
dead.Close ();
}
terminated.Clear ();
}
string test = ti.test;
string opt_set = ti.opt_set;
if (concurrency == 1)
Console.Write ("Testing " + test + "... ");
/* Spawn a new process */
string process_args;
if (opt_set == null)
process_args = test;
else
process_args = "-O=" + opt_set + " " + test;
ProcessStartInfo info = new ProcessStartInfo (runtime, process_args);
info.UseShellExecute = false;
info.RedirectStandardOutput = true;
info.RedirectStandardError = true;
Process p = new Process ();
p.StartInfo = info;
p.EnableRaisingEvents = true;
ProcessData data = new ProcessData ();
data.test = test;
p.Exited += delegate (object sender, EventArgs e) {
// Anon methods share some of their state, so we can't use
// variables which change during the loop (test, p)
Process dead = (Process)sender;
lock (monitor) {
if (dead.ExitCode == 0) {
if (concurrency == 1)
Console.WriteLine ("passed.");
else
Console.Write (".");
passed.Add(process_data [dead]);
npassed ++;
} else {
if (concurrency == 1)
Console.WriteLine ("failed.");
else
Console.Write ("F");
failed.Add (process_data [dead]);
nfailed ++;
}
processes.Remove (dead);
terminated.Add (dead);
Monitor.Pulse (monitor);
}
};
string log_prefix = "";
if (opt_set != null)
log_prefix = "." + opt_set.Replace ("-", "no").Replace (",", "_");
data.stdoutFile = test + log_prefix + ".stdout";
data.stdout = new StreamWriter (new FileStream (data.stdoutFile, FileMode.Create));
data.stderrFile = test + log_prefix + ".stderr";
data.stderr = new StreamWriter (new FileStream (data.stderrFile, FileMode.Create));
p.OutputDataReceived += delegate (object sender, DataReceivedEventArgs e) {
Process p2 = (Process)sender;
StreamWriter fs;
lock (monitor) {
fs = process_data [p2].stdout;
if (String.IsNullOrEmpty (e.Data))
process_data [p2].stdout = null;
}
if (String.IsNullOrEmpty (e.Data)) {
fs.Close ();
} else {
fs.WriteLine (e.Data);
fs.Flush ();
}
};
p.ErrorDataReceived += delegate (object sender, DataReceivedEventArgs e) {
Process p2 = (Process)sender;
StreamWriter fs;
lock (monitor) {
fs = process_data [p2].stderr;
if (String.IsNullOrEmpty (e.Data))
process_data [p2].stderr = null;
}
if (String.IsNullOrEmpty (e.Data)) {
fs.Close ();
lock (monitor) {
process_data [p2].stderr = null;
}
} else {
fs.WriteLine (e.Data);
fs.Flush ();
}
};
lock (monitor) {
processes.Add (p);
process_data [p] = data;
}
p.Start ();
p.BeginOutputReadLine ();
p.BeginErrorReadLine ();
}
bool timed_out = false;
/* Wait for all processes to terminate */
while (true) {
lock (monitor) {
int nprocesses = processes.Count;
if (nprocesses == 0)
break;
bool res = Monitor.Wait (monitor, 1000 * timeout);
if (!res) {
timed_out = true;
break;
}
}
}
TimeSpan test_time = DateTime.UtcNow - test_start_time;
XmlWriterSettings xmlWriterSettings = new XmlWriterSettings ();
xmlWriterSettings.NewLineOnAttributes = true;
xmlWriterSettings.Indent = true;
using (XmlWriter writer = XmlWriter.Create ("TestResults_runtime.xml", xmlWriterSettings)) {
// <?xml version="1.0" encoding="utf-8" standalone="no"?>
writer.WriteStartDocument ();
// <!--This file represents the results of running a test suite-->
writer.WriteComment ("This file represents the results of running a test suite");
// <test-results name="/home/charlie/Dev/NUnit/nunit-2.5/work/src/bin/Debug/tests/mock-assembly.dll" total="21" errors="1" failures="1" not-run="7" inconclusive="1" ignored="4" skipped="0" invalid="3" date="2010-10-18" time="13:23:35">
writer.WriteStartElement ("test-results");
writer.WriteAttributeString ("name", "runtime-tests.dummy");
writer.WriteAttributeString ("total", (npassed + nfailed).ToString());
writer.WriteAttributeString ("failures", nfailed.ToString());
writer.WriteAttributeString ("not-run", "0");
writer.WriteAttributeString ("date", DateTime.Now.ToString ("yyyy-MM-dd"));
writer.WriteAttributeString ("time", DateTime.Now.ToString ("HH:mm:ss"));
// <environment nunit-version="2.4.8.0" clr-version="4.0.30319.17020" os-version="Unix 3.13.0.45" platform="Unix" cwd="/home/directhex/Projects/mono/mcs/class/corlib" machine-name="marceline" user="directhex" user-domain="marceline" />
writer.WriteStartElement ("environment");
writer.WriteAttributeString ("nunit-version", "2.4.8.0" );
writer.WriteAttributeString ("clr-version", Environment.Version.ToString() );
writer.WriteAttributeString ("os-version", Environment.OSVersion.ToString() );
writer.WriteAttributeString ("platform", Environment.OSVersion.Platform.ToString() );
writer.WriteAttributeString ("cwd", Environment.CurrentDirectory );
writer.WriteAttributeString ("machine-name", Environment.MachineName );
writer.WriteAttributeString ("user", Environment.UserName );
writer.WriteAttributeString ("user-domain", Environment.UserDomainName );
writer.WriteEndElement ();
// <culture-info current-culture="en-GB" current-uiculture="en-GB" />
writer.WriteStartElement ("culture-info");
writer.WriteAttributeString ("current-culture", CultureInfo.CurrentCulture.Name );
writer.WriteAttributeString ("current-uiculture", CultureInfo.CurrentUICulture.Name );
writer.WriteEndElement ();
// <test-suite name="corlib_test_net_4_5.dll" success="True" time="114.318" asserts="0">
writer.WriteStartElement ("test-suite");
writer.WriteAttributeString ("name","runtime-tests.dummy");
writer.WriteAttributeString ("success", (nfailed == 0).ToString());
writer.WriteAttributeString ("time", test_time.Seconds.ToString());
writer.WriteAttributeString ("asserts", nfailed.ToString());
// <results>
writer.WriteStartElement ("results");
// <test-suite name="MonoTests" success="True" time="114.318" asserts="0">
writer.WriteStartElement ("test-suite");
writer.WriteAttributeString ("name","MonoTests");
writer.WriteAttributeString ("success", (nfailed == 0).ToString());
writer.WriteAttributeString ("time", test_time.Seconds.ToString());
writer.WriteAttributeString ("asserts", nfailed.ToString());
// <results>
writer.WriteStartElement ("results");
// <test-suite name="MonoTests" success="True" time="114.318" asserts="0">
writer.WriteStartElement ("test-suite");
writer.WriteAttributeString ("name","runtime");
writer.WriteAttributeString ("success", (nfailed == 0).ToString());
writer.WriteAttributeString ("time", test_time.Seconds.ToString());
writer.WriteAttributeString ("asserts", nfailed.ToString());
// <results>
writer.WriteStartElement ("results");
// Dump all passing tests first
foreach (ProcessData pd in passed) {
// <test-case name="MonoTests.Microsoft.Win32.RegistryKeyTest.bug79051" executed="True" success="True" time="0.063" asserts="0" />
writer.WriteStartElement ("test-case");
writer.WriteAttributeString ("name", "MonoTests.runtime." + pd.test);
writer.WriteAttributeString ("executed", "True");
writer.WriteAttributeString ("success", "True");
writer.WriteAttributeString ("time", "0");
writer.WriteAttributeString ("asserts", "0");
writer.WriteEndElement ();
}
// Now dump all failing tests
foreach (ProcessData pd in failed) {
// <test-case name="MonoTests.Microsoft.Win32.RegistryKeyTest.bug79051" executed="True" success="True" time="0.063" asserts="0" />
writer.WriteStartElement ("test-case");
writer.WriteAttributeString ("name", "MonoTests.runtime." + pd.test);
writer.WriteAttributeString ("executed", "True");
writer.WriteAttributeString ("success", "False");
writer.WriteAttributeString ("time", "0");
writer.WriteAttributeString ("asserts", "1");
writer.WriteStartElement ("failure");
writer.WriteStartElement ("message");
writer.WriteCData (DumpPseudoTrace (pd.stdoutFile));
writer.WriteEndElement ();
writer.WriteStartElement ("stack-trace");
writer.WriteCData (DumpPseudoTrace (pd.stderrFile));
writer.WriteEndElement ();
writer.WriteEndElement ();
writer.WriteEndElement ();
}
// </results>
writer.WriteEndElement ();
// </test-suite>
writer.WriteEndElement ();
// </results>
writer.WriteEndElement ();
// </test-suite>
writer.WriteEndElement ();
// </results>
writer.WriteEndElement ();
// </test-suite>
writer.WriteEndElement ();
// </test-results>
writer.WriteEndElement ();
writer.WriteEndDocument ();
}
Console.WriteLine ();
if (timed_out) {
Console.WriteLine ("\nrunning tests timed out:\n");
Console.WriteLine (npassed + nfailed);
lock (monitor) {
foreach (Process p in processes) {
ProcessData pd = process_data [p];
pd.CloseStreams ();
Console.WriteLine (pd.test);
p.Kill ();
DumpFile (pd.stdoutFile);
DumpFile (pd.stderrFile);
}
}
return 1;
}
Console.WriteLine ("" + npassed + " test(s) passed. " + nfailed + " test(s) did not pass.");
if (nfailed > 0) {
Console.WriteLine ("\nFailed tests:\n");
foreach (ProcessData pd in failed) {
Console.WriteLine (pd.test);
DumpFile (pd.stdoutFile);
DumpFile (pd.stderrFile);
}
return 1;
} else {
return 0;
}
}
static void DumpFile (string filename) {
if (File.Exists (filename)) {
Console.WriteLine ("=============== {0} ===============", filename);
Console.WriteLine (File.ReadAllText (filename));
Console.WriteLine ("=============== EOF ===============");
}
}
static string DumpPseudoTrace (string filename) {
if (File.Exists (filename))
return File.ReadAllText (filename);
else
return string.Empty;
}
}

View File

@ -23,6 +23,13 @@
/* All OSX versions up to 10.8 */
#define TLS_VECTOR_OFFSET_CATS 0x60
#define TLS_VECTOR_OFFSET_10_9 0xe0
#define TLS_VECTOR_OFFSET_10_11 0x100
/* This is 2 slots less than the known low */
#define TLS_PROBE_LOW_WATERMARK 0x50
/* This is 28 slots above the know high, which is more than the known high-low*/
#define TLS_PROBE_HIGH_WATERMARK 0x200
static int tls_vector_offset;
@ -113,6 +120,7 @@ mono_mach_arch_get_tls_value_from_thread (pthread_t thread, guint32 key)
void
mono_mach_init (pthread_key_t key)
{
int i;
void *old_value = pthread_getspecific (key);
void *canary = (void*)0xDEADBEEFu;
@ -130,6 +138,19 @@ mono_mach_init (pthread_key_t key)
if (mono_mach_arch_get_tls_value_from_thread (pthread_self (), key) == canary)
goto ok;
tls_vector_offset = TLS_VECTOR_OFFSET_10_11;
if (mono_mach_arch_get_tls_value_from_thread (pthread_self (), key) == canary)
goto ok;
/*Fallback to scanning a large range of offsets*/
for (i = TLS_PROBE_LOW_WATERMARK; i <= TLS_PROBE_HIGH_WATERMARK; i += 4) {
tls_vector_offset = i;
if (mono_mach_arch_get_tls_value_from_thread (pthread_self (), key) == canary) {
g_warning ("Found new TLS offset at %d", i);
goto ok;
}
}
g_error ("could not discover the mach TLS offset");
ok:
pthread_setspecific (key, old_value);

View File

@ -21,6 +21,14 @@
/* All OSX versions up to 10.8 */
#define TLS_VECTOR_OFFSET_CATS 0x48
#define TLS_VECTOR_OFFSET_10_9 0xb0
#define TLS_VECTOR_OFFSET_10_11 0x100
/* This is 2 slots less than the known low */
#define TLS_PROBE_LOW_WATERMARK 0x40
/* This is 28 slots above the know high, which is more than the known high-low*/
#define TLS_PROBE_HIGH_WATERMARK 0x120
static int tls_vector_offset;
@ -111,6 +119,7 @@ mono_mach_arch_get_tls_value_from_thread (pthread_t thread, guint32 key)
void
mono_mach_init (pthread_key_t key)
{
int i;
void *old_value = pthread_getspecific (key);
void *canary = (void*)0xDEADBEEFu;
@ -128,6 +137,19 @@ mono_mach_init (pthread_key_t key)
if (mono_mach_arch_get_tls_value_from_thread (pthread_self (), key) == canary)
goto ok;
tls_vector_offset = TLS_VECTOR_OFFSET_10_11;
if (mono_mach_arch_get_tls_value_from_thread (pthread_self (), key) == canary)
goto ok;
/*Fallback to scanning a large range of offsets*/
for (i = TLS_PROBE_LOW_WATERMARK; i <= TLS_PROBE_HIGH_WATERMARK; i += 4) {
tls_vector_offset = i;
if (mono_mach_arch_get_tls_value_from_thread (pthread_self (), key) == canary) {
g_warning ("Found new TLS offset at %d", i);
goto ok;
}
}
g_error ("could not discover the mach TLS offset");
ok:
pthread_setspecific (key, old_value);

Binary file not shown.

View File

@ -1 +1 @@
4d58095efc006b4475f0937656021d3e741a9afb
6ccf8d1f9a19be2afc58ffc9436dc42a07cd44b8

Binary file not shown.

View File

@ -1 +1 @@
5a230520eaa0256c490e4344ed75646ed7f5b40e
0cdf74e477610da5b3c21f77151b80d9858a3dfb

Binary file not shown.

View File

@ -1 +1 @@
bd76d39f7b22ce7c74a5d0d77fea4d17a72d4829
3a17dd70506ad227b3c0b2c2df176cd6a6c1daca

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: mono 4.0.3\n"
"Report-Msgid-Bugs-To: http://www.mono-project.com/Bugs\n"
"POT-Creation-Date: 2015-07-20 03:19-0400\n"
"POT-Creation-Date: 2015-07-24 03:18-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"

Binary file not shown.

View File

@ -1 +1 @@
ad63cc2659816a6cd943ec3d41eeaa9d2e987c8d
05a005af7e1898d2f171ffc1f340b302e24f9063