2008-12-25 Miguel de Icaza <[email protected]>
* ProcessTest.cs: Created a test case from bug 459450.
2008-12-25 Leszek Ciesielski <[email protected]>
* System.Diagnostics/Process.cs: Raise the
Process.OutputDataReceived and Process.ErrorDataReceived with null
arguments at the end. This is the documented behavior:
http://msdn.microsoft.com/en-us/library/system.diagnostics.datareceivedeventargs.data.aspx
And CruiseControl.NET depended on this. Bug #459450.
* Microsoft.CSharp/CSharpCodeCompiler.cs: Fix the code, as it
depened on the previous broken behavior.
svn path=/trunk/mcs/; revision=122125
* DelimitedTraceListener.cs: Changed accessibility of
GetSupportedAttributes to protected internal.
* DiagnosticsConfigurationHandler.cs: Use GetSupportedAttributes to
allow custom attributes on tracelisteners. Fixes bug #413203.
* TraceListener.cs: Changed accessibility of GetSupportedAttributes
to protected internal. Removed MonoTODO on GetSupportedAttributes and
Attributes. Fixed line endings.
svn path=/trunk/mcs/; revision=109500
2008-06-21 Robert Jordan <[email protected]>
* Process.cs (Start_common): UserName may be null or empty.
Fixes bug #350543.
In Test/System.Diagnostics:
2008-06-21 Robert Jordan <[email protected]>
* ProcessTest.cs (Start_UseShellExecuteWithEmptyUserName):
add test for bug #350543.
svn path=/trunk/mcs/; revision=106452
* FileVersionInfoTest.cs : disabled all English-Windows-dependent
tests. They all fail on Windows whose language is not English.
In general, be careful to compare language-dependent strings.
svn path=/trunk/mcs/; revision=105572
FileVersionInfo, and indirectly also for AssemblyBuilder.
* FileVersionInfo.cs (GetVersionInfo): Resolve filename to absolute
path, and throw FileNotFoundException if it does not exist.
* System_test.dll.sources: Added FileVersionInfoTest.cs.
svn path=/trunk/mcs/; revision=93643
valid and remove LAMESPEC since the documentation has been corrected
for .NET 3.5. Code formatting.
* ProcessTest.cs: Added tests for PriorityClass.
svn path=/trunk/mcs/; revision=91804
value is set to null, instead of ArgumentException. Remove check if
file name is rooted and exists when UseShellExecute is false, and let
runtime handle this. Fixes bug #345565. When a process cannot be started, do
not access ProcessStartInfo.EnvironmentVariables since that would not allow us
to re-use the instance when changing UseShellExecute. Added argument check in
Start (ProcessStartInfo). Code formatting.
* ProcessTest.cs: Added tests for Start overloads.
svn path=/trunk/mcs/; revision=90693
* ProcessTest.cs (TestRedirectedOutputIsAsync):
Comment out the failing asserts until I've found out why they are
failing.
svn path=/trunk/mcs/; revision=88725
* ProcessTest.cs (TestRedirectedOutputIsAsync):
Replace the generated script with a simple one (command line based).
Add additional assert for Process.ExitCode == 0.
svn path=/trunk/mcs/; revision=88688
2007-10-30 Robert Jordan <[email protected]>
* ProcessTest.cs: Add tests for bug #319829.
In System.Diagnostics:
2007-10-30 Robert Jordan <[email protected]>
* Process.cs: Wrap the redirected streams with a stream
that provides real async Begin/Read|Write operations.
Fixes bug #319829.
In System.IO:
2007-10-30 Robert Jordan <[email protected]>
* MonoSyncFileStream.cs: Add.
svn path=/trunk/mcs/; revision=88491
deprecated Assertion class. Code formatting. On 2.0 profile, allow
non-integral values for switches.
* BooleanSwitch.cs: Use base ctor for default value.
* Switch.cs: On 2.0 profile, store default value and use it if no
value is set in config file.
* SourceSwitch.cs: Use null to signal that there's no default value.
svn path=/trunk/mcs/; revision=86220
when setting the same value for EnableRaisingEvents, and only modify
value of field when enable/disable succeeded. Treats log name case
insensitively on all platforms, and perform reset when the log name
is changed. Validate new machine name in property, and treat it
case-insensitively. Perform reset when source is modified, and log
name was not explicitly set. When EventLog is closed, also disable
event watcher.
* LocalEventLog.cs: In Close, clean-up the FileSystemWatcher. Add
locking to Created eventhandler to avoid duplicate notifications.
* Win32EventLog.cs: Cache handle for reading from eventlog. In Close,
close the read handle. Implement support for watching win32 eventlog.
Fixes bug #82436.
* EventLogTest.cs: Added tests for validity of machine name. Added
tests for case-insensitivity of Source, Log and MachineName.
svn path=/trunk/mcs/; revision=84049
* System.dll.sources : added XmlWriterTraceListener.cs.
* System_test.dll.sources : added TraceListenerTest.cs and
XmlWriterTraceListenerTest.cs.
* XmlWriterTraceListener.cs : new file, implementated.
* TraceListener.cs : implemented 2.0 members.
* TraceListenerTest.cs : new test.
* XmlWriterTraceListenerTest.cs : new test (but disabled since they
are too instance dependent).
svn path=/trunk/mcs/; revision=75960
* Process.cs: Allow GetProcesses and GetProcessById overloads with
machine name to work for local machine.
* System_test.dll.sources: Added ProcessTest.cs.
svn path=/trunk/mcs/; revision=70366
* EventLogImpl.cs: Moved GetEventLogs implementation to base class.
Added abstract GetLogNames method. Added ValidateCustomerLogName
method which should be called by eventlog providers when creating a
new log to ensure the significant part of the log name is unique, does
not match any of the special log names and does not match an exist event
source.
* Win32EventLog.cs: Validate customer log name when creating new log.
Moved GetEventLogs implementation to base class. Added GetLogNames
method.
* LocalFileEventLog.cs: Merged CreateLogStore into CreateEventSource.
Validate customer log name when creating new log. Moved GetEventLogs
implementation to base class. Added GetLogNames method.
* EventLogTest.cs: Added tests for log name validation in
CreateEventSource.
svn path=/trunk/mcs/; revision=64429
* EventLogEntry.cs: Added InstanceId property (2.0 only). Moved
Obsolete attribute to correct property.
* EventSourceCreationData.cs: Updated copyright. For internal ctor,
set log name to "Application" if value is null or zero-length string.
* EventLogImpl.cs: EventImpl now acts as base class for event log
implemenations.
* NullEventLog.cs: Modified to implement new abstract methods of base
class. Removed factory class.
* EventLog.cs: EventLog implementation that delegates just about
everything to individual eventlog providers. To specify the event log
implementation to use, the MONO_EVENTLOG_TYPE environment variable can
be used. Possible values are:
- win32 : read/write entries using the native win32 eventlog
- local[:path] : read/write entries as files to a local directory
- null : silently ignore all entries
The default is "null" on unix (and versions of Windows before NT,
meaning Windows 98, ...), and "win32" on Windows NT (and higher).
When "the local" implementation is used, the directory in which to
store the event logs, event sources and entries can be specified as
part of MONO_EVENTLOG_TYPE environment variable using the syntax
"local:<path>" (eg. local:/home/myuser/mono/eventlog).
* LocalFileEventLog.cs: Event log implementation which uses a local
file store. The directory to use for persistence can be specified
as part of the MONO_EVENTLOG_TYPE environment variable (see above).
If that directory is not explicitly set, then the following directory
will be used for storing eventlog entries:
- windows : %APPDATA%\mono\eventlog
- unix : /var/lib/mono/eventlog
On unix, the directory permission for individual eventlog log
directories will be set to 777 (with +t bit) allowing everyone to
read and write eventlog entries while only allowing entries to be
deleted by the user(s) that created them.
Format of log files was modified to allow it contain all necessary
information for an event log entry.
* Win32EventLog.cs: Event log implementation for Windows NT and
higher which uses the Win32 native event log for reading/writing
eventlog entries, and which uses the registry to store event log and
event source registration information.
* EventLogEntryCollection.cs: Delegate implementation to event log
implementation. Use lazy init for enumerating entries. Cache current
item in 2.0 profile.
* EventLogTest.cs: Enable tests. On 2.0 profile, set MONO_EVENTLOG_TYPE
environment variable to force local file implementation to be used for
unit tests. This avoids permission issues for the unit tests, and
allows us to clean up the files/directory that are created during the
test run. Skip tests that cannot pass when the null implementation is
active (on 1.0 profile). Added tests for all WriteEntry and WriteEvent
(2.0 only) overloads, Clear, Entries, Exists and LogNameFromSourceName.
svn path=/trunk/mcs/; revision=64088
bug which still needs to be tracked, and which would cause temporary
registry entries to be left behind by running tests.
* EventLogEntry.cs: Added InstanceId property (2.0 only). Moved
Obsolete attribute to correct property.
* EventSourceCreationData.cs: Updated copyright. For internal ctor,
set log name to "Application" if value is null or zero-length string.
* EventLogImpl.cs: EventImpl now acts as base class for event log
implemenations. Added NullEventLog implementation, which is not used
at the moment.
* EventLog.cs: EventLog implementation that uses registry for
keeping track of logs and sources to match .NET (and Windows). When
running on Windows NT (and higher), event entries are written to
the native win32 event log. Reading event entries is not yet working
for Windows. On linux, we use a local file store (based on patch by
Atsushi).
* UnixEventLog.cs: Event log implementation for linux which uses a
local file store.
* Win32EventLog.cs: Event log implementation for Windows NT and
higher which uses the Win32 native event log.
* EventLogEntryCollection.cs: Delegate implementation to event log
implemenation. Use lazy init for enumerating entries.
* System.dll.sources: Added UnixEventLog.cs and Win32EventLog.cs.
* System_test.dll.sources: Added EventLogTest.cs.
svn path=/trunk/mcs/; revision=63633
* EventSourceCreationDataTest.cs: new test.
* EventSourceCreationData.cs: Marked ctor internal, and removed ctor.
Throw ArgumentOutOfRangeException if negative value for CategoryCount
is set.
svn path=/trunk/mcs/; revision=63530
* SettingsPropertyCollection.cs : implemented some synchronization
releated members. Actually it can never be synchronized by itself.
* SettingsBase.cs : Synchronized() just returns the same instance,
marking it as IsSynchronized = true. Fixed bug #78430.
* LocalFileSettingsProviderTest.cs : commented some lines in
Initialized() as they don't work under .NET.
* ApplicationSettingsBaseTest.cs : added Synchronized(), test for
bug #78430.
* SwitchesTest.cs : Ignore NewSwitch under 2.0 as it fails under
.NET.
svn path=/trunk/mcs/; revision=60792
* System.dll.sources: added DataReceivedEventArgs.cs and
DataReceivedEventHandler.cs.
* System_test.dll.sources : added StopwatchTest.cs.
* Stopwatch.cs:
Zoltan was quicker to add it, here I put my implementation ;-)
* Process.cs :
Added some missing long members (not implemented anyways).
* DataReceivedEventHandler.cs DataReceivedEventArgs.cs :
added new 2.0 types.
* StopwatchTest.cs : new test.
svn path=/trunk/mcs/; revision=58989
* EventLogPermissionAttributeTest.cs: Character #133 is refused into
machine names for 2.0.
* EventLogPermissionTest.csFx 2.0 now has better arguments checking
(i.e. FDBK15131 was fixed).
* PerformanceCounterPermissionAttributeTest.cs
* PerformanceCounterPermissionTest.cs: Fx 2.0 now has better arguments
checking (i.e. FDBK15131 was fixed).
svn path=/trunk/mcs/; revision=45253
More Thread-safety fixes. I have to lock on
Listeners.SyncRoot as we're traversing the collection and can't let the
collection change from underneath us while we're iterating over it
(alternately, we could clone the collection and iterate over the clone
without having locking issues -- assuming we had a lock-free clone --
but this would kill the GC). Fixes 69964. Only define lock_ if we're
using the lock-free initialization routine; it's not used otherwise.
* System/Test/System.Diagnostics/TraceTest.cs Add multi-thread test for #69964.
svn path=/trunk/mcs/; revision=41065
* EventLogPermissionTest.cs: Now works on both Fx 1.1 / 2.0.
* PerformanceCounterPermissionTest.cs: Now works on both Fx 1.1 / 2.0.
svn path=/trunk/mcs/; revision=39172
/system.diagnostics/switch/add/@value attribute only contain numeric data and
some other fixes (thread-safety in the Debug- and Trace-related classes).
* System/System.Diagnostics/DiagnosticsConfigurationHandler.cs
(DiagnosticsConfiguration): Don't read the .config file from the
static ctor (again), as if it fails we'll get a TypeLoadException -- bad! Instead, lazy-read the .config file.
* System/System.Diagnostics/DiagnosticsConfigurationHandler.cs
(DiagnosticsConfigurationHandler): Require that the /switch/add/@value
attribute contains only numeric values.
* System/System.Diagnostics/DiagnosticsConfigurationHandler.cs:
* System/System.Diagnostics/TraceImpl.cs: Don't initialize everything in
the static ctor, as if it fails (due to an invalid .confg file) we get a
TypeLoadException, while .NET generates a ConfigurationException.
Instead, initialize everything the first time the Listeners property is
accessed, which allows the static ctor to run without chance of failure,
avoiding the TypeLoadException.
* System/System.Diagnostics/TraceListenerCollection.cs: This should be
thread-safe, as it's accessible from a static member of TraceImpl
(available through the public Debug and Trace classes).
* System/System.Diagnostics/Switch.cs: Leave the original switch value alone.
If it isn't valid (i.e. numeric), the DiagnosticsConfigurationHandler
will catch it.
* System/Test/test-config-file: Remove "string-value" switch, as it causes
ConfigurationExceptions under .NET 1.1 (the value attribute can't be
non-numeric), and Mono now follows this behavior. Add a "custom-switch"
value, which is used in the regression tests.
* System/Test/System.Diagnostics/DiagnosticsConfigurationHandlerTest.cs:
.NET 1.1 requires that the value attribute be a numeric value; check for
that and update the success test so that they'll actually pass.
* System/Test/System.Diagnostics/SwitchesTest.cs: TestNewSwitch reads
"custom-switch" now, and the switches value is now "42", not "0".
Remove warning about unused variable.
svn path=/trunk/mcs/; revision=39090
configuration element /switches/add/@value attribute is now *required*, not
optional (as it was under .NET 1.0).
* System/System.Diagnostics/DiagnosticsConfigurationHandler.cs:
The /switch/add/@value attribute isn't optional under .NET 1.1, so make
sure it exists.
* System/Test/test-config-file: Remove <add/> elements lacking a value
attribute. .NET 1.1 doesn't support this anymore, and neither does Mono.
* System/Test/System.Diagnostics/DiagnosticsConfigurationHandlerTest.cs:
.NET 1.1 doesn't permit <add/> elements without a value attribute.
Assert the same under Mono.
svn path=/trunk/mcs/; revision=39046
them as [Category ("NotDotNet")]; Fix the TraceTag_Listeners example (it
was passing invalid XML in a "valid" test).
svn path=/trunk/mcs/; revision=39042
* EventLogPermissionTest.cs: New. Unit tests for EventLogPermission.
* PerformanceCounterPermissionTest.cs: New. Unit tests for
PerformanceCounterPermission.
svn path=/trunk/mcs/; revision=33761
* EventLogPermissionAttributeTest.cs: New. Unit tests for
EventLogPermissionAttribute.
* PerformanceCounterPermissionAttributeTest.cs: New. Unit tests for
PerformanceCounterPermissionAttribute.
svn path=/trunk/mcs/; revision=33718