Test  Methodology


Timer and Syncroziation

To correctly generate the data (packet ) flow and  calculate the real throughput of the channel, it is desirable to have accurate methods to handling the timing.
e.g. as we prefer sends N packets per second, How do we ensure those packets are sending within 1 second.
Thus, timers are needed.  This is majorly accomplished by using "signal" in Linux ( refer to GNU C programmimg).
This provides a basic method to statistical the packets transmission and reception rate.

And, as this is a communication system.  Different nodes have different timing. How to syncronize them?
I cannot say I precisely syncronized all testing nodes. But, only in a rough way.
Each slave nodes are waiting for a "START" message to begin their test-prepartion. ( I have to admit this "START message" are sent one by one, thereby not arriving the
slave nodes at the same time.)
And Master set a 1-sec timer to wait for slave's test preparation.
Thus, The first timer in master node is 61-seconds. while all following timer are set as 60 seconds. (60 seconds is a basic test-period )
So, after about 1s, all slaving nodes are begin to transmit, and master node is also begin to reckoning the numbers of packets recived.
The system is tune to that degree for nearly 1-2ms error offset ( which means +/-1 packet mis-aligned for wrong test peroiod)

However, after long-term tests, there is a phenomena that slaving node timers are slower than master node. The reason is unclear.
A better way is to re-sync all the nodes before each test period with "signalling".
 

Automated Test Machine

All test behavior are co-ordinated through pre- and post-test coordination messages (signalling). The advantage that I need not re-set "test parameter" and re-start test
manullay.
At the beginning of each test, there is a negotiation period. During that period master node will  inform all the slave nodes about the test to be performed, the "test-begin, test-end,
and test-step, etc . such paremaeters.
 

Sockets handling

As I use Non-blocking sockets for the test system.