https://bugzilla.novell.com/show_bug.cgi?id=682537
https://bugzilla.novell.com/show_bug.cgi?id=682537#c0 Summary: System.Diagnostics.SourceSwitch doesn't filter correctly Classification: Mono Product: Mono: Class Libraries Version: 2.6.x Platform: Macintosh OS/Version: Mac OS X 10.6 Status: NEW Severity: Normal Priority: P5 - None Component: System AssignedTo: [email protected] ReportedBy: [email protected] QAContact: [email protected] Found By: Customer Blocker: --- Description of Problem: Steps to reproduce the problem: This code will assert when it shouldn't. <code> SourceSwitch ss = new SourceSwitch("Test"); ss.Level = SourceLevels.Warning; Assert.IsFalse( ss.ShouldTrace(TraceEventType.Information) ); </code> Actual Results: SourceSwitch.ShouldTrace should only return true when the trace event level is higher then the source level set. Expected Results: How often does this happen? All the time. Additional Information: The tests in SourceSwitchTest.cs only test verbose and activity tracing. They should also test various levels such as information and warning. The ShouldTrace function has a bug in it's bit operations. Currently they look like this: return (Level & SourceLevels.Critical) != 0; They shouldn't test equality to 0 but to the current level like this: return (Level & SourceLevels.Critical) != Level; This isn't enough to fix the bug, ActivityTracing is still broken. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug. You are the assignee for the bug. _______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
