Skip to content

tests: Check that flatpak-run fd-arguments do not leak to the command - #6594

Merged
smcv merged 1 commit into
flatpak:mainfrom
swick:wip/test-flatpak-run-fd-leak
Apr 10, 2026
Merged

smcv merged 1 commit into
flatpak:mainfrom
swick:wip/test-flatpak-run-fd-leak

Conversation

@swick

@swick swick commented Apr 10, 2026

Copy link
Copy Markdown
Collaborator

flatpak-run takes a number of arguments which are file descriptor numbers. Those file descriptors are supposed to set something up in the way the instance gets spawned, but should never make it to the wrapper command.

I thought this was unreliable, but I tested this in a loop for an hour and it never succeeded when it should not.

flatpak-run takes a number of arguments which are file descriptor
numbers. Those file descriptors are supposed to set something up in the
way the instance gets spawned, but should never make it to the wrapper
command.
@smcv

smcv commented Apr 10, 2026

Copy link
Copy Markdown
Collaborator

I've been trying to do a version of this that asserts that the fds that are open are exactly those that we expect. I'll push that when I get it working and we can compare notes.

@smcv smcv left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, let's have this, and we can back it out if it proves to be unreliable, or have my more systematic version as well (or instead) if we like that better.

@smcv

smcv commented Apr 10, 2026

Copy link
Copy Markdown
Collaborator

I've been trying to do a version of this that asserts that the fds that are open are exactly those that we expect

This is #6599.

@smcv
smcv added this pull request to the merge queue Apr 10, 2026
Merged via the queue into flatpak:main with commit 1364527 Apr 10, 2026
11 checks passed
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.

2 participants