[PATCH] Second pass (was Re: [PATCH] First pass at finishing the
last major feature on the TODO list (RequestName))
John (J5) Palmieri
johnp at redhat.com
Mon Oct 24 16:55:26 PDT 2005
Second pass at this and it looks like I have worked out most of the
kinks thanks to the test. I still haven't implemented the signal
checking since it is a bit harder being that they are async. Any
suggestions? Can I rely on the NameAquired, NameLost and
NameOwnerChanged signals to always come in the same order? In the code
it looks that way but is there a chance they can get reordered when
going over the bus?
What I did spend my time on is the queue checking which now sports a
nice ListQueueOwners method on the bus. The cool thing is the test data
came out correctly the first time I ran it :-). What the test does is
take test data which is just a list of structs at the top of the test
file. Each struct describes the action, input flags, expected output
and expected connections in the queue and their order. Each action in
the list builds on the last action and in this way we can get a
comprehensive test that covers most of the states that will ever be
encountered (I'm not saying all because I consider having four elements
in the queue and five elements being different states in which case
there are infinite states but in reality they are not much different in
terms of behavior).
I think I got a good portion of the states covered but I was always bad
a permutations and combinations so if someone wants to go through the
test data and add some more that would be great.
On Sun, 2005-10-23 at 18:08 -0400, Havoc Pennington wrote:
> On Sun, 2005-10-23 at 16:49 -0400, John (J5) Palmieri wrote:
> > I have my test case working and fixed a slew of logic bugs. I'm going
> > to add signal checking to the tests and submit a new patch on Monday.
>
> Cool. This is a pretty nontrivial patch...
>
> > One other thing that would be nice is to check to make sure the
> > connections are in the right order in the owners list after each name
> > request. I was thinking of adding a GetNameOwners method to the bus
> > which would return a list of owners, but wasn't sure if we wanted this
> > as part of the spec or as something that is just added when tests are
> > enabled? Any thoughts on that?
>
> Seems like a reasonable feature. Maybe try to be consistent in
> terminology, if we're calling it "queue" we could say GetQueuedOwners or
> something.
>
> Havoc
>
>
>
--
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dbus-request-name-2.patch
Type: text/x-patch
Size: 71062 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/dbus/attachments/20051024/6209ff5f/dbus-request-name-2-0001.bin
More information about the dbus
mailing list