-
-
Notifications
You must be signed in to change notification settings - Fork 208
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
Conversation
There was a problem hiding this 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
)
09265d2
to
f891634
Compare
Fixed :) |
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. |
@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. |
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.
Thanks, that seems to have worked. |
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