From: Antti =?unknown-8bit?q?Kaijanm=C3=A4ki?= <antti.kaijanmaki@canonical.com>
To: ofono@ofono.org
Subject: Re: [PATCH 1/2] Allow users to specify dbus name replacement behaviour.
Date: Fri, 04 Apr 2014 02:45:18 +0300 [thread overview]
Message-ID: <533DF28E.9080209@canonical.com> (raw)
In-Reply-To: <1D42A55E-765D-45A5-843D-AA092474C7F2@holtmann.org>
[-- Attachment #1: Type: text/plain, Size: 2712 bytes --]
On 03.04.2014 20:55, Marcel Holtmann wrote:
>> Indeed, and this combined with commit 5f765259 one can easily run
>> a series of tests (let's say dialer UI, messaging..) with
>> different phonesim configurations changing the number of modems and
>> phonesim .xml files for each modem.
>
> this argument does not really fly with me. You can just
> disable/enable the phonesim modem over D-Bus and it allows you to
> connect to a total different phonesim instance with a new
> phonesim.xml.
Oh, didn't know that. That sounds great!
We were under the impression that the phonesim instances have to be
running before phonesim plugin loads and the modem .xml configurations
can't be changed on the fly.
This new information now removes the need to be able to restart ofono
just for updating the phonesim modem .xml configurations.
> Or go the route of plugins/stktest.c and tools/stktest.c that we used
> for unit testing SIM Toolkit.
The only problem that remains is that there seems to be no way of
changing the number of modems on the fly as they are read upon phonesim
plugin initialization from phonesim.conf.
Now looking at stktest.c I see it opens a socket to communicate with an
external process.
Would it be acceptable if we implement the following:
Upon phonesim plugin init we check if a configuration file exists at
/etc/ofono/phonesim-control.conf
The file would contain the following:
[control]
Port=715517
LoadDefaultConfig=0
Only if the file exists phonesim plugin would then create a _listening_
socket on the specified port.
If LoadDefaultConfig is 0 the phonesim plugin would not load
/etc/ofono/phonesim.conf.
That socket would be used to issue control commands:
ADD [sim name] [Address] [Port]
REMOVE [sim name]
RESET
ADD - adds a modem, fields are consistent with phonesim.conf
REMOVE - remove [sim name] modem
RESET - clear all modems,
if LoadDefaultConfig = 1 then reload the phonesim.conf
if LoadDefaultConfig = 0 then remove all modems
I would be intrigued to have LOAD [configuration file], but having it
possible to order a root process to read arbitrary files is probably too
much. :)
> And here as well. If you are allowed to own the D-Bus well know name,
> you normally can kill the current process and start a new one of your
> choice.
The idea was that we would not have to allow root access to the
automated tests to be able to change the phonesim configuration. If we
can figure out a solution how to change the number of modems phonesim
plugin exposes on the fly then by all means there is no need for the
original patches.
-- Antti
next prev parent reply other threads:[~2014-04-03 23:45 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-02 13:56 [PATCH 1/2] Allow users to specify dbus name replacement behaviour jussi.pakkanen
2014-04-02 13:56 ` [PATCH 2/2] Can set name replacement with command line arguments jussi.pakkanen
2014-04-02 18:39 ` [PATCH 1/2] Allow users to specify dbus name replacement behaviour Marcel Holtmann
2014-04-03 7:38 ` Jussi Pakkanen
2014-04-03 9:41 ` Antti =?unknown-8bit?q?Kaijanm=C3=A4ki?=
2014-04-03 17:55 ` Marcel Holtmann
2014-04-03 23:45 ` Antti =?unknown-8bit?q?Kaijanm=C3=A4ki?= [this message]
2014-04-04 0:09 ` Antti =?unknown-8bit?q?Kaijanm=C3=A4ki?=
2014-04-04 0:13 ` Denis Kenzior
2014-04-04 0:11 ` Denis Kenzior
2014-04-04 0:50 ` Antti =?unknown-8bit?q?Kaijanm=C3=A4ki?=
2014-04-03 21:40 ` Denis Kenzior
2014-04-04 0:00 ` Antti =?unknown-8bit?q?Kaijanm=C3=A4ki?=
2014-04-04 0:22 ` Antti =?unknown-8bit?q?Kaijanm=C3=A4ki?=
2014-04-04 0:25 ` Denis Kenzior
2014-04-04 1:16 ` Antti =?unknown-8bit?q?Kaijanm=C3=A4ki?=
2014-04-03 17:50 ` Marcel Holtmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=533DF28E.9080209@canonical.com \
--to=antti.kaijanmaki@canonical.com \
--cc=ofono@ofono.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.