Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

run: Avoid execve() when measuring test coverage #4681

Merged
merged 1 commit into from
Jan 17, 2022

Conversation

smcv
Copy link
Collaborator

@smcv smcv commented Jan 16, 2022

Normally, we want to save a process and get better signal handling
by replacing the flatpak run process with bubblewrap.

However, when we're doing profiling or measuring coverage, we want to
exit cleanly so that profiling data can be recorded, which is done in
an atexit() hook. In this situation, bypass the execve() optimization;
instead, start bubblewrap in the background, immediately wait for it,
and propagate its exit status.


This was useful when checking coverage for the new code in #4678.

Normally, we want to save a process and get better signal handling
by replacing the `flatpak run` process with bubblewrap.

However, when we're doing profiling or measuring coverage, we want to
exit cleanly so that profiling data can be recorded, which is done in
an atexit() hook. In this situation, bypass the execve() optimization;
instead, start bubblewrap in the background, immediately wait for it,
and propagate its exit status.

Signed-off-by: Simon McVittie <[email protected]>
@alexlarsson alexlarsson merged commit 88a928e into flatpak:master Jan 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants