tarpaulin icon indicating copy to clipboard operation
tarpaulin copied to clipboard

Unify process handling for ptrace

Open onalante-msft opened this issue 2 years ago • 3 comments

The setup tasks in process_handling::linux::execute can be achieved for std::process::Command through std::process::Command::pre_exec (as demonstrated by https://github.com/luser/spawn-ptrace). This means that the TestHandle::Id handle is no longer necessary, as the ptraced child process can also now be made into a RunningProcessHandle.

onalante-msft avatar Aug 08 '22 15:08 onalante-msft

Marked as draft since kill_used_in_test is failing with a segfault originating in rusty_fork.

onalante-msft avatar Aug 08 '22 15:08 onalante-msft

You should also add a CI target for x86 as well as the x64 ones just to make sure the new platform stays working

xd009642 avatar Aug 08 '22 15:08 xd009642

So you could scale this back to remove the spawn-ptrace functionality and keep the personality and x86 support as a way of breaking it up into another 2 PRs and getting something mergeable sooner. Depends how much time/effort you're willing to put into this work :sweat_smile:

xd009642 avatar Aug 10 '22 19:08 xd009642

I have been busy for the past few months, my apologies. I am going to continue this PR on https://github.com/onalante/tarpaulin/tree/ptrace after resolving the change conflicts.

onalante-msft avatar Oct 30 '22 22:10 onalante-msft

No worries we've all been there :sweat_smile:. I think I've probably done some parts of this recently already as part of fixing some personality issues a user was having on Mac.

xd009642 avatar Oct 30 '22 22:10 xd009642