flatpak/xdg-desktop-portal

tests: several failures when running in gnome from non gnome terminal

pierre-labastie opened this issue · 2 comments

Operating System

Ubuntu 23.10, linux from scratch development

XDG Desktop Portal version

1.18

XDG Desktop Portal version (Other)

1.18.2

Desktop Environment

GNOME

Desktop Environment (Other)

No response

Expected Behavior

All tests pass

Current Behavior

Five tests fail:

test-portals-camera
test-portals-inhibit
test-portals-wallpaper
pytest test_remotedesktop
pytest test_globalshortcuts

Steps to Reproduce

  1. Open an uxterm from menu (may have to install it first)
  2. build with mkdir build && cd build && meson setup && ninja
  3. run ninja test
    ...

Anything else we should know?

Same issue also with the konsole terminal. Note that the unit associated to uxterm is of the form app-gnome-uxterm-xxxx.scope (or app-gnome-debian\x2duxterm-xxxx.scope on ubuntu), so that the app_id is non empty, and I guess all the failures come from that, because the app_id is supposed to be empty by all tests accessing the permission store.

I have a working patch for the C tests, but I don't know how to access the app_id in python. On the other hand, I am not sure what your policy is for tests: I think there is no problem when running them in the CI set up.

Note also that the scope unit for gnome-terminal starts with vte-spawn, hence it generates an empty app_id, and the tests pass in that terminal...

Confirmed, I get the same in kitty and thus run the test-suite in gnome-terminal or gnome-console. I haven't figured out yet how to guess whether appid is set from the tests yet, the easiest would be to just remove that particular set of asserts though.