Approach to system testing for Osmocom stack
holger at freyther.de
Sun Jan 28 22:41:33 UTC 2018
> On 21. Jan 2018, at 20:16, Holger Freyther <holger at freyther.de> wrote:
some more progress. I had to learn a bit about asyncio and in the end will
be forced to use a stream socket and will end up using the IPA and add
a reservation for JSON events. I will probably push my unfinished code to
gerrit but it is too early to review.
> small progress update. I will use "luasocket" to open a af_unix dgram socket
> from the testcase, a small json library, the template, log and maybe the
> process code from osmo-gsm-tester. I will give Python's asyncio a try as
> well. It has unix socket and subprocess support.
> Right now there a lot of loose ends but I should be able to make progress
> from here.
 There is a asyncio.start_unix_server to create a AF_UNIX socket but
only with SOCK_STREAM. The API has (thought not documented) a way to pass
a file descriptor but when passing a socket they will check if it is a
stream socket and if not fail. This is quite annoying in some ways.. First
I want reliable delivery (excludes UDP) and have messages/datagrams (don't
want to do an IPA style header..). Second thanks to the BSD socket API the
accept will behave exactly the same for TCP, SCTP, UNIX, Bluetooth, etc
and the python API allows to pass a socket factory.
More information about the baseband-devel