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

Allow tests to set the AppInfo to type HOST with a specific app id #1309

Merged
merged 5 commits into from
Apr 2, 2024

Conversation

swick
Copy link
Contributor

@swick swick commented Mar 18, 2024

This inverts the problem that #1279 and #1280 are trying to solve by passing in the app id that will be used for all client connections instead of querying for the app id that x-d-p found.

This is in particular useful because it removes the dependency on xdp_get_app_info_from_pid which I'm removing in #1281

@swick
Copy link
Contributor Author

swick commented Mar 18, 2024

/cc @smcv @whot

Copy link
Contributor

@whot whot left a comment

Choose a reason for hiding this comment

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

LGTM, thanks.

note that snakes don't have feet so they can't wear thongs ;)
(typo in commit message: pythong)

@swick
Copy link
Contributor Author

swick commented Mar 19, 2024

Fixed :)

@GeorgesStavracas
Copy link
Member

I originally thought that the test suite was borked, but actually I think the tests are up to something. Need to figure out why this PR is crashing some of the test runs.

@whot
Copy link
Contributor

whot commented Apr 1, 2024

@swick maybe try to rebase and force-push to retrigger the CI. I had issues in libwacom with ubuntu 22.04 and clang+asan for a while, that resolved itself last week and now it's all hunky and dory again. Could be the same issue here.

whot and others added 5 commits April 2, 2024 11:49
The only use of the cunescape() functions is in the xdp-utils sources so
let's couple those two together.
Tests can run in diverse environments, some of which would get picked up
by our code that tries to find the app id. For tests we need predictable
behavior. Introduce a new environment variable which can be set to an
app id from which a XdpAppInfo of type HOST will be used for all
connections.
Instead of querying x-d-p about the app id, we force the app id that
x-d-p uses for all client connections.
Instead of querying x-d-p about the app id, we force the app id that
x-d-p uses for all client connections.

The `app_id` fixture and PortalMock allow to override this value. The
`app_id` fixture can be used in tests to access the app_id that x-d-p
will see.
@swick
Copy link
Contributor Author

swick commented Apr 2, 2024

Thanks, that seems to have worked.

@GeorgesStavracas GeorgesStavracas added this pull request to the merge queue Apr 2, 2024
@GeorgesStavracas GeorgesStavracas added this to the 1.20 milestone Apr 2, 2024
Merged via the queue into flatpak:main with commit 486468e Apr 2, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Triaged
Development

Successfully merging this pull request may close these issues.

None yet

3 participants