[Ns-bugs] [Bug 888] Writing ascii trace to addtional tests fails
code at nsnam.ece.gatech.edu
Tue Apr 27 22:10:27 PDT 2010
--- Comment #4 from Tom Henderson <tomh at tomh.org> 2010-04-28 01:10:27 EDT ---
(In reply to comment #3)
> (In reply to comment #2)
> > (In reply to comment #1)
> > > Are there packets getting created before Simulator::Run () is called? (I would
> > > like to know why your patch works)
> > It doesn't work :) After looking at this more, simply moving the call
> > EnableAsciiAll up stops the crash, but it doesn't actually write the file
> > anymore. I will have to look some more.
> Ok, I should have moved it to just after the p2p link was installed. However,
> it still crashes. I'm guessing it doesn't like the packets that are sent from
> the first test case?
The problem is that test cases do not fully reset the simulator (no
re-initialization of statics), and if test case 1 runs without metadata
enabled, it is too late to enable it in later test cases.
The below (tested) patch should be safe to apply now, and close out this bug.
diff -r e2fe1c30eb3a src/test/ns3tcp/ns3tcp-loss-test-suite.cc
--- a/src/test/ns3tcp/ns3tcp-loss-test-suite.cc Sun Apr 25 11:37:50 2010 -0400
+++ b/src/test/ns3tcp/ns3tcp-loss-test-suite.cc Tue Apr 27 22:07:49 2010 -0700
@@ -274,6 +274,7 @@
: TestSuite ("ns3-tcp-loss", SYSTEM)
+ Packet::EnablePrinting (); // Enable packet metadata for all test cases
AddTestCase (new Ns3TcpLossTestCase1);
AddTestCase (new Ns3TcpLossTestCase2);
Configure bugmail: http://www.nsnam.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the Ns-bugs