Support chrooted/contained processes#37
Conversation
| static void init() | ||
| { | ||
| write(1, message, strlen(message)); | ||
| exit(0); |
There was a problem hiding this comment.
I think it's probably better to pipe the output of the process through grep -F "Injected", but it requires rethinking how to find the PID. I think I ought to do that.
Although an advantage is that it ends the test as soon as the injection is done.
|
Thank you for contributing! I will hopefully have more time to look at it soon, but one note about testing - it would be better if everything could be done directly from python. If possible, it would be better not to depend on |
|
Hi, just to give you an update, I think I'm unlikely to continue working on this. Regarding the suggestions for the tests. I investigated a little. Using You're free to take what you like and delete the parts that you don't, in case any of this was useful. |
This adds support for injecting libraries into processes in containers. Which is needed for kmaork/hypno#18.
It's draft right now for a few reasons. I've not hooked the tests into the github actions workflows. In fact I'm not sure if I've gone in the right direction with the tests, i.e. using docker compose ?
It looks a bit ugly but I suspect it's less awkward than trying to control containers from within the pytest tests.
Secondly, I've not yet tried incorporating your suggestion
I think that it shouldn't be too hard to iterate on with the tests set up though.
Also, if you like some of this and dislike other bits I'm completely unattached to it.