zephyriot / zephyr-issues

0 stars 0 forks source link

E2E testing for non-interactive pairing #61

Open nashif opened 8 years ago

nashif commented 8 years ago

Reported by Javier B Perez:

E2E testing for non-interactive pairing

(Imported from Jira ZEP-20)

nashif commented 8 years ago

by Tomasz Bursztyka:

It's bluetooth related. Assigning to Johan (so he can assign it to relevant person).

nashif commented 8 years ago

by Mark Linkmeyer:

Inaky Perez-Gonzalez , per today's backlog grooming session, please determine what needs to happen next on this issue. Thx.

nashif commented 8 years ago

by Inaky Perez-Gonzalez:

Will review with Johan Hedberg to start planning.

nashif commented 8 years ago

by Inaky Perez-Gonzalez:

Johan Hedberg Tomasz Bursztyka at this point we are discovering to plan which features on automation are needed.

Can either of you describe which flows you would follow to test some of the features you are / have implemented in E2E mode (aka: one node connecting to another). This doesn't have to be a conclusive list, I want to get the ball rolling.

nashif commented 8 years ago

by Johan Hedberg:

You would have two control points of the stack: a bottom one and a top one.

The bottom would be our Bluetooth emulation support that's available in BlueZ (under emulator/* in the BlueZ source tree). It allows emulating one or more Bluetooth controllers. In the case of multiple controllers they'll be able to see and connect to each other which allows for connection-oriented test cases. There's already an existing abstraction for a two-controller setup that's used for testing BlueZ itself in emulator/hciemu.c.

The top control point would be the BTP (Bluetooth Test Protocol) that we developed for the PTS test automation. The Zephyr side of it is implemented as tests/bluetooth/tester/ in the Zephyr source tree.

As for the requirements of the system that would automate this: A Linux machine capable of running qemu with basic Bluetooth support in the kernel (at least the hci_vhci driver needed by the emulator). There's no need for real Bluetooth HW however.

If you're interested in how tests have been created against BlueZ you could look at tools/mgmt-tester.c or tools/l2cap-tester.c in the BlueZ source tree. The main difference is that instead of talking to Linux kernel interfaces (mgmt and L2CAP sockets for the previous examples) you'd talk using the BTP protocol to a Zephyr instance running inside qemu.

nashif commented 8 years ago

by Inaky Perez-Gonzalez:

Sounds good, thank you.

What about real HW; do you have any plans or thoughts?