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

Refactor common/flatpak-instance, add test coverage #4125

Merged
merged 5 commits into from Apr 6, 2021

Conversation

smcv
Copy link
Collaborator

@smcv smcv commented Feb 15, 2021

  • common: Move flatpak_run_allocate_id() to flatpak-instance

    This localizes knowledge of the internal structure of
    $XDG_RUNTIME_DIR/.flatpak into the flatpak-instance module.

  • instance: Factor out flatpak_instance_get_instances_directory

    The only functional change here is that we consistently use
    flatpak_get_real_xdg_runtime_dir(), instead of a mixture of
    the versions with and without realpath().

  • tests: Factor out test setup from test-exports

  • tests: Improve error handling for isolated directory setup

    If these simple libc function wrappers fail during setup, we want to
    crash out.

  • tests: Add basic test coverage for GC'ing unused instance directories


Required by #4126 and #4093.

@RyuzakiKK
Copy link
Contributor

This looks good to me.

This localizes knowledge of the internal structure of
$XDG_RUNTIME_DIR/.flatpak into the flatpak-instance module.

Signed-off-by: Simon McVittie <smcv@collabora.com>
The only functional change here is that we consistently use
flatpak_get_real_xdg_runtime_dir(), instead of a mixture of
the versions with and without realpath().

Signed-off-by: Simon McVittie <smcv@collabora.com>
Signed-off-by: Simon McVittie <smcv@collabora.com>
If these simple libc function wrappers fail during setup, we want to
crash out.

Signed-off-by: Simon McVittie <smcv@collabora.com>
Signed-off-by: Simon McVittie <smcv@collabora.com>
@alexlarsson alexlarsson merged commit f2b2a12 into flatpak:master Apr 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-for-review sandbox issue related to sandbox setup
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants