[Ns-developers] improving regression tests of ns-3

Mathieu Lacage mathieu.lacage at sophia.inria.fr
Thu Mar 20 10:13:11 PDT 2008


On Thu, 2008-03-20 at 06:17 -0700, Tom Henderson wrote:
> >> the problem is that the module 'internet-node' is not supposed to depend
> >> on the 'point-to-point' module. Furthermore, for the sake of writing
> >> tests, I would like to test only what I am interested in, not some other
> >> random piece of code like PointToPointNetDevice. i.e., I would like to
> >> isolate the different components of the system to avoid testing
> >> unrelated pieces when I really want to test UdpSocket.
> > 
> 
> 
> I think that what you suggest is reasonable (a simple net device usable 
> across all modules, located in src/node) but a more useful TestNetDevice 
> or SimpleNetDevice might also include other modeling capabilities.  I 

Ok. Do you have a preference for the name ?

What you describe below (michele's delaybox) looks, however, pretty
generally useful. 

> can envision, for transport testing, that one would want to be able to 
> model also delay (and jitter) and dropped packets, independently 
> settable in forward and reverse directions.  These could be based on 
> random variables and still keep the device/channel otherwise stateless.

I have something for the transmission delay in
src/devices/wifi/propagation-delay-model.h

> 
> I would recommend to look at Michele Weigle's DelayBox for ns-2:
> http://dirt.cs.unc.edu/delaybox/

Looks cool. So, this puts together a propagation delay model, an error
model and a flow classifier ?

What is missing from our current codebase would be a flow classifier
then. Maybe something like this:

class FlowClassifier
{
public:
  virtual uint32_t Classify (Ptr<const Packet> packet) = 0;
};

class TcpFlowClassifier : public FlowClassifier
{
public:
  // methods to configure classification.
};

Another API would be to make the FlowClassifier::Classify method tag the
input packet with a 'flowid' tag instead of returning an explicit
uint32_t. Or it could do both.

And, then, what you would need is something which would take as input a
classified packet, and apply some delay+error model in a queue.

regards,
Mathieu



More information about the Ns-developers mailing list