Skip to content

Add an alternative version of bluetooth test that uses a new l2ping tool

Dmitry Petrov requested to merge kirkstone-bt-ping-test into kirkstone

This MR is the second part of alternative solution for [YT-72] EMC Bluetooth test.

Remaining MRs:

Background: earlier we decided to stick with bluez and obexctl for Bluetooth test. But when a new requirement/clarification appeared that counterpart should be set up without ssh, we realized that it's impossible to switch between master/slave mode for obexctl to provide feedback whether test data was successfully transmitted. So, we decided to rework the test using l2ping tools.

Main ideas and changes:

  • switched to the modified l2ping (l2pingd) that runs in background and keeps active connection to counterpart;
  • if a connection is lost or error occurs, the new l2pingd will try to restore the connection by itself;
  • to ping the counterpart, a SIGUSR1 is sent to l2pingd process;
  • the size of data to transfer is specified via "-s" parameter;
  • to verify the transferred data, the "-v" parameter is used;
  • wrapped the new test with EMC test suite. During the test, 5 pings will be sent to the counterpart and result will be returned;

I used a tanaro_immunity configuration file to verify the new code.

The test produces following output:

Notes:

  • In my environment, the new test failed 6 times (out of 100). This happened when the BT connection was reset and the counterpart was unavailable for a few seconds;
  • A small delay has been added to the preparation phase to ensure that l2pingd is started and the connection is established.
Edited by Dmitry Petrov

Merge request reports