Rebased from ::gentoo's xdg-desktop-portal-1.20.0-sandbox-disable-failing-tests
.patch onto 1.22.1, and renamed version-agnostic because the autoupdate applier
never renames anything under files/.

One of their two hunks is dropped: the trailing-newline fix is already in
1.22.1, so only the pytest_files removals remain. Their reason stands here
unchanged -- these two want a pipewire connection, network access and /dev/fuse,
none of which a portage sandbox provides.

The third hunk is this overlay's own, added 2026-09-07 after running the suite
for the first time. Eight cases in test_notification.py fail with "the sound
data is invalid" / "invalid icon": the portal validates untrusted icon and sound
payloads by re-executing xdg-desktop-portal-validate-{icon,sound} under bwrap
with --unshare-ipc/net/pid, and a portage sandbox cannot nest those namespaces.
It is the same class as the two files above, not a defect in the package.

Skipped PER TEST rather than by dropping the file, which is what the two entries
above do: only 3 of the 21 tests in test_notification.py need bwrap, and
removing the file would forfeit the other 18.

--- a/tests/meson.build
+++ b/tests/meson.build
@@ -87,13 +87,11 @@
   'test_clipboard.py',
   'test_documents.py',
   'test_document_fuse.py',
-  'test_dynamiclauncher.py',
   'test_email.py',
   'test_filechooser.py',
   'test_globalshortcuts.py',
   'test_inhibit.py',
   'test_inputcapture.py',
-  'test_location.py',
   'test_notification.py',
   'test_openuri.py',
   'test_permission_store.py',
--- a/tests/test_notification.py
+++ b/tests/test_notification.py
@@ -424,6 +424,10 @@
             expected,
         )
 
+    @pytest.mark.skip(
+        reason="validate-icon/validate-sound re-exec under bwrap, which "
+        "cannot unshare namespaces inside a build sandbox"
+    )
     @pytest.mark.parametrize("template_params", ALL_VERSIONS_PARAMS)
     def test_icon_bytes(self, portals, dbus_con, xdp_app_info, template_params):
         image_bytes = SVG_IMAGE_DATA.encode("utf-8")
@@ -479,6 +483,10 @@
 
         assert "icon" not in added_notification
 
+    @pytest.mark.skip(
+        reason="validate-icon/validate-sound re-exec under bwrap, which "
+        "cannot unshare namespaces inside a build sandbox"
+    )
     def test_icon_fd(self, portals, dbus_con, xdp_app_info):
         svg_image_bytes = SVG_IMAGE_DATA.encode("utf-8")
 
@@ -600,6 +608,10 @@
 
         assert "sound" not in mock_notification
 
+    @pytest.mark.skip(
+        reason="validate-icon/validate-sound re-exec under bwrap, which "
+        "cannot unshare namespaces inside a build sandbox"
+    )
     def test_sound_fd(self, portals, dbus_con, xdp_app_info):
         fd = os.memfd_create("notification_sound_test", os.MFD_ALLOW_SEALING)
         os.write(fd, SOUND_DATA)
