[Ns-developers] improving regression tests of ns-3
Gustavo Carneiro
gjcarneiro at gmail.com
Wed Mar 19 16:39:51 PDT 2008
On 19/03/2008, Mathieu Lacage <mathieu.lacage at sophia.inria.fr> wrote:
>
> hi,
>
> While trying to add a bunch of new tests to the regression testsuite in
> ns-3, it occured to me that we could add a stupid NetDevice/Channel
> implementation to provide cross-node connectivity and help testing of
> the higher-layers. This would allow us to avoid making the
> internet-node/udp-socket.cc test code depend on PointToPointNetDevice...
>
> So, I would like to add to src/node/ (the main reason to add them to
> src/node and not to src/devices/simple/ is that I want to re-use them
> from applications/ and internet-node/):
>
> - simple-net-device.h/cc
> - simple-channel.h/cc
>
> Both would work together and provide a multipoint broadcast medium
> without any kind of MAC/PHY/queuing models and no state managament. Just
> packet forwarding. Actually, 'Forwarding' might be a better prefix:
> ForwardingNetDevice, and ForwardingChannel.
In src/internet-node/udp-socket.cc you will find already some unit tests of
higher layers, UDP sockets in this case. I implemented it using
PointToPointNetDevices connecting some nodes. I think it works well, and to
be honest I don't completely understand why a new special netdevice is
needed just for unit testing. I mean, PointToPointNetDevice is
deterministic, so it should be more than enough for any kind of unit
testing...
--
Gustavo J. A. M. Carneiro
INESC Porto, Telecommunications and Multimedia Unit
"The universe is always one step beyond logic." -- Frank Herbert
More information about the Ns-developers
mailing list