On Thu, 20 Sep 2018 at 12:33, chao yang yangchao.free@gmail.com wrote:
https://validation.linaro.org/static/docs/v2/glossary.html#term-multinode https://validation.linaro.org/static/docs/v2/multinode.html it said "A single test job which runs across multiple devices". I still don't quite understandt the purpose of MultiNode. Is that mean that a single test job's all test cases are parallel executed simultaneously on multiple devices?
A single test job submission creates multiple test jobs running on multiple devices, with support for synchronising the test cases across these nodes.
So, using MultiNode, a test writer can ensure that test cases in one node of a MultiNode job will occur at the same time as test cases in another node. This happens using the MultiNode API to synchronise the relevant nodes.
For example it have 10 test cases and 5 devices, when job is running, firstly the former 5 cases is distributed to 5 devices and parallel run (case 1 is run on device 1,case 2 is run on device 2,... device 5 is run on device 5). When a case is end(suppose case 2) ,then case 6 is scheduled to run on device 2... and so on.Is my understanding correct?
No. It is test shell definitions which are split across the nodes, not individual test cases. Test writers add API calls to those test shell definitions to force the test shell to wait until another node is ready.
The test job submission determines which test shell definitions get run on which node. You can use this to have the 5 test cases on all nodes or only some nodes, but if those 5 test cases are in a single test shell definition, every node with that test shell definition will run all 5 test cases in strict serial order..
You use the synchronisation calls to force node 0 to wait until node 1 is at the same stage of the test shell definition. All test cases in a single test shell definition on a single node occur in serial on that node. MultiNode allows those test cases to wait until another node is at a suitable stage to support running those test cases. For example, a test shell definition for a client will have test cases and other calls which rely on a server being available. That test shell definition is therefore assigned to a client role so that the node running that role can use the MultiNode API to wait for the server to be ready before starting the rest of the test shell definition. The server role is running on a node which sets up and configures the server software and when that software has been verified as running, the test shell definition assigned to the server role can use the MultiNode API to tell the client role that the server is ready.
Test cases need to be organised into test shell definitions which get assigned to one or more roles and it is the nodes which execute these roles which will run those test cases. At all times, each node runs every test shell definition in strict serial order. The MultiNode API allows those test cases to be executed on node 0 when a different test shell definition running on node 1 has declared that the test shell definition has determined that node 1 is ready to support the work which node 0 wants to execute.