Setting up Child Policy explicitly for a child PD which will announce a service.

Sid Agrawal siagraw at cs.ubc.ca
Tue Jun 27 22:39:28 CEST 2023


Hi,
I am trying to setup a scenario where the parent starts a child PD in the C
code, i.e., there is no <start> node for the child in the config file. It
is similar to the rm_nested test example [1].

But in my scenario, I would like to start a server in the child and have
the parent make RPC calls to it, and I need some help setting that up. I
think the answer should be in some configuration of the ChildPolicy used to
start the child, but I am missing something.

My code is here [2,3] and is a hybrid of the hello_tutorial and the
rm_nested test case. Like rm_nested, the parent starts a child with the
same binary and uses the failure to reach the RM service to indicate that
it is in the child. But then, in my scenario, I start a HelloServer in the
child, and the parent tries to establish a connection to this service.

I am seeing two errors:
1. An error that Genode complains that it wasn't expecting the child to
announce a service. I tried fixing that by defining announce_service() in
the Test_Child before starting the child, but that didn't fix it. TBH, I am
wondering what to add to that function.
2. The parent cannot find the "Hello" service to connect to. I think that
fixing (1) would fix two as well.

Any help pointing me in the right direction would be very helpful. Thanks
as always!

Best,
Sid
sid-agrawal.ca


[1]
https://github.com/genodelabs/genode/blob/master/repos/base/src/test/rm_nested/main.cc
[2]
https://github.com/sid-agrawal/genode/blob/76af718937e9723ae6cf2212a4ae549ef29aa85f/repos/osmosis_examples/src/app/lwc_sqlite_example/main.cc
[3]
https://github.com/sid-agrawal/genode/blob/76af718937e9723ae6cf2212a4ae549ef29aa85f/repos/osmosis_examples/run/sqlite_example_lwc.run
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.genode.org/pipermail/users/attachments/20230627/df647a95/attachment.htm>


More information about the users mailing list