The multinode function of "pass data between devices".Note: "The message data is stored in a cache file which will be overwritten when the next synchronisation call is made. Ensure that your scripts make use of (or copy aside) any MultiNode cache data before calling any other MultiNode API helpers that may clear the cache."
Does it mean follow example: roler1: .. steps: - lava-send ipv4 ip=192 - lava-send ipv4 ip=193 .. roler2: step2: - lava-wait ipv4 - ipdata=$(cat /tmp/lava_multi_node_cache.txt | cut -d = -f 2) .. After run, is content of roler2 ipdata 193?
Hi Jack,
On Mon, May 13, 2019 at 06:17:32PM +0800, jack lu wrote:
The multinode function of "pass data between devices".Note: "The message data is stored in a cache file which will be overwritten when the next synchronisation call is made. Ensure that your scripts make use of (or copy aside) any MultiNode cache data before calling any other MultiNode API helpers that may clear the cache."
Does it mean follow example: roler1: .. steps: - lava-send ipv4 ip=192 - lava-send ipv4 ip=193 .. roler2: step2: - lava-wait ipv4 - ipdata=$(cat /tmp/lava_multi_node_cache.txt | cut -d = -f 2) .. After run, is content of roler2 ipdata 193?
It's likely, but there's no guarantee on that - you've given the jobs no way to synchronise to be sure. Depending on timing between the two test devices, you could get either 192 or 193.
Cheers,
if mulitnode api don't privide the "parameter queue mechanism",how can realized multi client access simultaneously server resource? For example, a test scene that have a server roler and two client roler. how dows roler server know message is from which client? Need user write a program to implement it(queue mechanism)? roler server: steps: - lava-wait ipv4 - ipdata=$(cat /tmp/lava_multi_node_cache.txt | cut -d = -f 2) .. roler client1: steps: - lava-send ipv4 ip=192 .. roler client2: steps: - lava-send ipv4 ip=193 .. from roler server , ipdata can't be sured 192 or 193.
Steve McIntyre steve.mcintyre@linaro.org 于2019年5月13日周一 下午9:03写道:
Hi Jack,
On Mon, May 13, 2019 at 06:17:32PM +0800, jack lu wrote:
The multinode function of "pass data between devices".Note: "The message data is stored in a cache file which will be overwritten
when the
next synchronisation call is made. Ensure that your scripts make use of
(or
copy aside) any MultiNode cache data before calling any other MultiNode
API
helpers that may clear the cache."
Does it mean follow example: roler1: .. steps: - lava-send ipv4 ip=192 - lava-send ipv4 ip=193 .. roler2: step2:
- lava-wait ipv4
- ipdata=$(cat /tmp/lava_multi_node_cache.txt | cut -d = -f 2) ..
After run, is content of roler2 ipdata 193?
It's likely, but there's no guarantee on that - you've given the jobs no way to synchronise to be sure. Depending on timing between the two test devices, you could get either 192 or 193.
Cheers,
Steve McIntyre steve.mcintyre@linaro.org http://www.linaro.org/ Linaro.org | Open source software for ARM SoCs
Hi Jack,
On Mon, May 13, 2019 at 11:54:47PM +0800, jack lu wrote:
if mulitnode api don't privide the "parameter queue mechanism",how can realized multi client access simultaneously server resource? For example, a test scene that have a server roler and two client roler. how dows roler server know message is from which client? Need user write a program to implement it(queue mechanism)? roler server: steps: - lava-wait ipv4 - ipdata=$(cat /tmp/lava_multi_node_cache.txt | cut -d = -f 2) .. roler client1: steps: - lava-send ipv4 ip=192 .. roler client2: steps: - lava-send ipv4 ip=193 .. from roler server , ipdata can't be sured 192 or 193.
Simple - use different variables ipv4_1 and ipv4_2 for the two clients? In the test code running on the server you'll need to be working out what to do with each one anyway.
So, in the test action you'd end up with something like:
- test: role - server ... steps: - lava-wait ipv4_1 - lava-wait ipv4_2 - ipdata=$(cat /tmp/lava_multi_node_cache.txt | cut -d = -f 2) <do server test> ... - client1 ... steps: - lava-send ipv4_! ip=192 <do client test> ... - client2 ... steps: - lava-send ipv4_2 ip=193 <do client test>
Does that help you?
Cheers,
Hi,Steve your example: role - server ... steps: - lava-wait ipv4_1 - lava-wait ipv4_2 .. The server will be blocked at lava-wait event till client lava-send ipv4_1 .. message. If only one client run "lava-send ipv4_2 ip=193" then server can't exit block status because it be blocked at "wait ipv4_1" event.
Steve McIntyre steve.mcintyre@linaro.org 于2019年5月14日周二 上午12:59写道:
Hi Jack,
On Mon, May 13, 2019 at 11:54:47PM +0800, jack lu wrote:
if mulitnode api don't privide the "parameter queue mechanism",how can
realized
multi client access simultaneously server resource? For example, a test scene that have a server roler and two client roler.
how
dows roler server know message is from which client? Need user write a
program
to implement it(queue mechanism)? roler server: steps:
- lava-wait ipv4
- ipdata=$(cat /tmp/lava_multi_node_cache.txt | cut -d = -f 2)
.. roler client1: steps: - lava-send ipv4 ip=192 .. roler client2: steps: - lava-send ipv4 ip=193 .. from roler server , ipdata can't be sured 192 or 193.
Simple - use different variables ipv4_1 and ipv4_2 for the two clients? In the test code running on the server you'll need to be working out what to do with each one anyway.
So, in the test action you'd end up with something like:
- test: role
- server
... steps: - lava-wait ipv4_1 - lava-wait ipv4_2 - ipdata=$(cat /tmp/lava_multi_node_cache.txt | cut -d = -f 2) <do server test> ... - client1 ... steps: - lava-send ipv4_! ip=192 <do client test> ... - client2 ... steps: - lava-send ipv4_2 ip=193 <do client test>
Does that help you?
Cheers,
Steve McIntyre steve.mcintyre@linaro.org http://www.linaro.org/ Linaro.org | Open source software for ARM SoCs
Hi Jack,
On Tue, May 14, 2019 at 06:30:10PM +0800, jack lu wrote:
your example: role - server ... steps: - lava-wait ipv4_1 - lava-wait ipv4_2 .. The server will be blocked at lava-wait event till client lava-send ipv4_1 .. message. If only one client run "lava-send ipv4_2 ip=193" then server can't exit block status because it be blocked at "wait ipv4_1" event.
In that case, you need to make your tests more deterministic. Only start a test with two clients defined if you know that both clients are going to start. LAVA is designed to work with reliable, deterministic tests.
Hi Steve, I want to use multinode api to support multi-client applying the share resource,and server distribute resource according to client's request.So when and which client request can't be determine. I think if lava multinode api provide a addtional parameter(besides message id, it no need save to /tmp/lava_multi_node_cache.txt ),server block at same message id then according to message parameter to know which client make the requst and go on.
Steve McIntyre steve.mcintyre@linaro.org 于2019年5月14日周二 下午8:52写道:
Hi Jack,
On Tue, May 14, 2019 at 06:30:10PM +0800, jack lu wrote:
your example: role
- server
... steps: - lava-wait ipv4_1 - lava-wait ipv4_2 .. The server will be blocked at lava-wait event till client lava-send
ipv4_1 ..
message. If only one client run "lava-send ipv4_2 ip=193" then server can't exit
block
status because it be blocked at "wait ipv4_1" event.
In that case, you need to make your tests more deterministic. Only start a test with two clients defined if you know that both clients are going to start. LAVA is designed to work with reliable, deterministic tests.
-- Steve McIntyre steve.mcintyre@linaro.org http://www.linaro.org/ Linaro.org | Open source software for ARM SoCs
lava-users@lists.lavasoftware.org